Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
usb-blackcat help..
#6
(09-12-2011, 10:35 PM)drewmerc Wrote: what version blackcat software are you using? update to latest
or open sb5100.bcs in notepad and compare it to the one below (sb5100.bcs is in the scripts folder)

Code:
# Script file for BCM3349 (SB5100) - 334817F
# This script is automatically executed when BlackcatUSB
# reads the CPU ID that the SB5100 uses. Which is 0x334817F.

MyDevice = "Motorola SB5100"    #Name of device
BootSize = 32768        #Size of bootloader (in bytes)
ImgFile = "images\Motorola.gif" #Location of the logo

JTAG.MemoryAddress(0x0)
JTAG.MemoryType("RAM")
JTAG.MemorySize(0x800000)
CFGMEM = JTAG.MemoryInit()
JTAG.MemoryAddress(0x1FC00000)
JTAG.MemoryType("CFI")
CFGFLASH = JTAG.MemoryInit()

#removed this to gain performance. If you have reading issues, uncomment
#SetParam(3,0)            #Sets read delay to 0
SetParam(4,1)            #Sets read mode to 1
SetParam(2,220)            #Sets the AMD flash delay to 200

Legacy.SetFlash(CFGFLASH)
MYFIRMNAME = Legacy.GetFwName()

t1 = Tab.Create(MyDevice)
Tab(t1).AddGroup("Bootloader",10,10,420,54)
Tab(t1).AddGroup("Firmware",10,70,420,70)
Tab(t1).AddText("MSG1","This changes the default bootloader",20,36)
Tab(t1).AddButton("ReadBoot","Read",250,30)
Tab(t1).AddButton("WriteBoot","Write",340,30)
Tab(t1).AddText("FWTITLE","Currently installed:",18,100)
Tab(t1).AddText("FW",MYFIRMNAME,18,114)
Tab(t1).AddButton("SaveFirmware","Save",250,106)
Tab(t1).AddButton("WriteFirmware","Change",340,106)
Tab(t1).AddImage("LOGO",ImgFile,45,240)

CreateEvent(ReadBoot)    #This reads the bootloader
    Status("Reading the SB5100 Bootloader")
        Tab(t1).ButtonDisable()
    MyData = Memory(CFGFLASH).Read(0,BootSize,False)
    Prompt = "Choose filename to save bootloader"    
    SaveFile(MyData,Prompt,"SB5100.Bootloader.bin")
    Status("Successfully read bootloader from Flash")
        Tab(t1).ButtonEnable()
EndEvent

CreateEvent(WriteBoot)
        Tab(t1).ButtonDisable()
    Prompt = "Choose a bootloader to write into Flash"    
    MyData = OpenFile(Prompt,"Bootloader files (*.bin)|*.bin")
    if (MyData = Nothing)
        goto    WriteBootExit
    endif
    if not (Len(MyData) = BootSize)
        Status("Error: File is not the size of the bootloader")
        goto    WriteBootExit
    endif
    Memory(CFGFLASH).Write(MyData,0,BootSize)
    Status("New bootloader successfully written")
WriteBootExit:
        Tab(t1).ButtonEnable()
EndEvent

CreateEvent(SaveFirmware)
    Status("Saving the SB5100's Firmware")
        Tab(t1).ButtonDisable()
    FwStart = Legacy.GetFwLocation()
    FwLen = Legacy.GetFwLen()
    FwLen += 92                      #Need to add 92 bytes to cover the fw header
    MyData = Memory(CFGFLASH).ReadVerify(FwStart,FwLen)   #ReadFlashVerify
        if (MyData = Nothing)
        Status("Error: data read was corrupted")
            Tab(t1).ButtonEnable()
        Exit Event
    endif
    Prompt = "Choose filename to save the firmware"
    SaveFile(MyData,Prompt,MYFIRMNAME)
    Status("Successfully read firmware from Flash")
        Tab(t1).ButtonEnable()
EndEvent

CreateEvent(WriteFirmware)
    Status("Programming the SB5100's Firmware")
        Tab(t1).ButtonDisable()
    Prompt = "Choose a firmware to install"    
    MyData = OpenFile(Prompt,"Firmware files (*.bin,*.p7)|*.bin;*.p7")
    if (MyData = Nothing)
        WriteErr = "User cancelled opperation"
        goto    ExitWriteFwErr
    endif
    If (HWORD(MyData,0) = 12418)        #Remove header if .p7 fw
        Writeline("Removing .p7 firmware header")
        HeadLen = HWORD(MyData,2) + 7    #increases Headlen by 7
        NewLen = Len(MyData) - HeadLen
        Resize(MyData,HeadLen,NewLen)    #Removes the p7 header
    endif
    FwLen = Len(MyData)
    FwStart = Legacy.GetFwLocation()
    If (FwStart = 0)
        WriteErr = "Error: Firmware destination not found"
        goto    ExitWriteFwErr
    endif
    If (FwLen > 600000)
        goto    BeginWrite
    endif
    If not Ask("File is smaller than a typical firmware. Write Anyways?")
            WriteErr = "Cancelled firmware update"
        goto    ExitWriteFwErr
    endif
BeginWrite:
    Memory(CFGFLASH).Write(MyData,FwStart,FwLen)
    Status("New firmware successfully installed")
    MYFIRMNAME = Legacy.GetFwName()
    Tab(t1).SetText("FW",MYFIRMNAME)
        Tab(t1).ButtonEnable()
        Exit
  ExitWriteFwErr:
    Status(WriteErr)
        Tab(t1).ButtonEnable()
EndEvent


that didint fix it eather....
Reply


Messages In This Thread
usb-blackcat help.. - by GBABY4201 - 09-12-2011, 02:50 AM
RE: usb-blackcat help.. - by drewmerc - 09-12-2011, 02:56 AM
RE: usb-blackcat help.. - by GBABY4201 - 09-12-2011, 03:00 AM
RE: usb-blackcat help.. - by GBABY4201 - 09-12-2011, 07:54 PM
RE: usb-blackcat help.. - by drewmerc - 09-12-2011, 10:35 PM
RE: usb-blackcat help.. - by GBABY4201 - 10-12-2011, 12:34 AM
RE: usb-blackcat help.. - by drewmerc - 10-12-2011, 12:54 AM
RE: usb-blackcat help.. - by GBABY4201 - 10-12-2011, 12:57 AM
RE: usb-blackcat help.. - by drewmerc - 10-12-2011, 01:45 AM
RE: usb-blackcat help.. - by GBABY4201 - 10-12-2011, 03:08 AM
RE: usb-blackcat help.. - by drewmerc - 10-12-2011, 03:54 AM
RE: usb-blackcat help.. - by GBABY4201 - 11-12-2011, 02:28 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)