This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

USB Bootloader Utility

Other Parts Discussed in Thread: MSP430WARE

I have following two utilities to upgrade the MSP430 firmware.
 1. MSP430 USB Firmware Upgrade Example v1.3.0
 2. MSP430 USB Firmware Upgrade Example 2.0
With both of these utilities, it is only possible to upgrade the firmware using CMD no: 18 (Mass erase) but our aim is to use CMD 16: (Erase segment) for upgrading the firmware as I do not want to upgrade information memory each time. Following are our concerns:

1. MSP430 USB Firmware Upgrade Example v1.3.0 (on Visual Studio)
I took the TI code and tried to build it. It gave following error
                Error 30 error LNK1181: cannot open input file 'hidparse.lib'          D:\SourceCode\BSL430_DLL\LINK             BSL430_DLL
                With this error I are not able to proceed to check if I can really use CMD 16.

2. Python_Firmware_UpgraderGUI.exe (MSP430 USB Firmware Upgrade Example 2.0) at ‘C:\ti\msp430\MSP430ware_1_60_02_09\usblib430\Host_USB_Software\Python_Firmware_Upgrader’
Here also only CMD 18 is used. I need your support to change the python file because I don’t have any expertise.

Can you please guide me, how can we proceed OR can TI provide some utility to upgrade FW using CMD 16?

  • Hi Deep Anand,

    Maybe you don't need to change the utilities if your worry is information memory. As mentioned in Section 3.5.2 of http://www.ti.com/lit/pdf/slau319, the Mass Erase command doesn't erase information memory. 

    A Mass erase is also triggered with an incorrect password, but this operation doesn't erase info memory either.

    Looking at the Python script, I see:

    self.bsl5Target.logger.info("Mass erase...")
    try:
    #Mass erase initiated due to incorrect password
    self.bsl5Target.BSL_RX_PASSWORD('\xff'*30 + '\0'*2)
    self.updateBar()
    except bsl5.BSL5Error:
    pass # it will fail - that is our intention to trigger the erase
    time.sleep(1)
    self.updateBar()

    # after erase, unlock device
    self.bsl5Target.BSL_RX_PASSWORD('\xff'*32)
    self.updateBar()

    # download full BSL
    sys.stderr.write('Download full BSL...\n')
    bsl_version_expected = (0x00, 0x07, 0x08, 0x38)

     

    So, it seems like a mass erase is triggered by sending an incorrect password, not by sending the Mass Erase command per se.

     

    Regards,

    Luis R

  • Hello Luis,

    Thanks for the rely!

    Sorry that I did not put my exact query in my last post. Actually I have allocated some code memory to be used as information memory and I don't want to erase it each time. Due to this I require to use CMD 16: (Erase segment) for upgrading the firmware and want support for that.

    Further to your reply, in section 2.4.4.4 of the same document, that you refered (http://www.ti.com/lit/pdf/slau319), it is also written that mass erase command erases the entire flash memory area (main memory plus information memory), please clearify but anyways I am not going to use it.

    Thanks & Regards,

    Deep Anand

  • Hi Deep Anand,

    Section 2 of SLAU319 talks about the ROM BSL which resides in other devices such as F2xx. Section 3 talks about the Flash BSL which resides in F5xx, so this is the section you should follow.

    I assume you have more than 512B for your constant data, correct? If not, maybe it would be better to use info memory.

    But if you do, you'll need to provide the correct password in order to avoid mass-erasing the device.

    * In the Python script, you need to modify the parameters for self.bsl5Target.BSL_RX_PASSWORD().
    Then, you need to send multiple BSL_ERASE_SEGMENT commands for each 512B segment that you want to erase. All the supported BSL commands for the python script are in bsl5.py.

    * As for the VS project, the error is caused by missing files from WDK.

    You need WDK to build BSL430_DLL as mentioned in the Readme (SourceCode\BSL430_DLL\BSL430_DLL_README.txt)l but note that this Readme was written some time ago before WDK 8.x, so you need to install WDK 7.1.0.

    Try this link: http://msdn.microsoft.com/en-us/windows/hardware/hh852365.aspx

    After installing WDK, follow the instructions in the Readme document to specify the include and library paths.

     

    Regards,

    Luis R

**Attention** This is a public forum