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.
Good day,
I'm confused with development tools which I need to overwrite UART BSL on MSP430F5438a and MSP430F5419a. I've understood slau319l and slaa450c documents that I can overwrite standard UART BSL with the customized one using MSP430-BSL tool, actually using the BSL 00.07.05.04 itself but further analyzes of the BSL supported commands and BSL-Scripter commands ( slau655 ) lead me to the conclusion that the MSP430-BSL can program the rest of the flash memory but not the BSL itself and the tool necessary to program customized BSL is the MSP-FET.
I'd like to clarify/confirm the following questions:
Thanks in advance
Hi Alex,
Alex Falkovich said:Is it correct that factory supplied BSL (00.07.05.04 on MSP430F5438a and MSP430F5419a) cannot be used to overwrite itself with the customized one? In other words: MSP430-BSL cannot be used for writing custom BSL to the address 0x1000, can it?
No, you cannot use the BSL to directly overwrite the BSL. The reason for this is flash erasures are done as a block, so you have to erase your pre-existing BSL code that is currently running before you can program the new code in. And obviously, if you erase the flash you are currently executing from, it won't work, since now you don't have any code to run to load the new firmware in.
What you CAN do, if you absolutely MUST use the BSL to change the BSL code is first download a main application project that acts like a BSL, but resides in a separate block of flash from your BSL flash. After downloading this code, using the factory BSL, jump the program counter to this block of code which can now erase and modify the BSL flash space. Now you can use your new BSL (that resides in BSL flash) as expected.
This is similar to how the USB BSL on the F5529 operates. The BSL flash on the F5529 is not large enough for the full USB BSL, so it contains a stripped down version of the USB BSL. The BSL host (typically a PC) first uses this stripped down USB BSL to download a full USB BSL to RAM, and runs the full USB BSL to download the user firmware.
Alex Falkovich said:Is it correct that MSP-FETcan overwrite/write BSL over JTAG connection as long as the "JTAG Key" not corrupted (0x17FC to 0x17FF all 0x00 or 0xFF according to slaa450c )?
Yes, this is correct. The linker file in the project defines where in memory all the pieces of the current project will be stored. Modifying the linker file to point to BSL space instead of main flash space will force CCS or IAR to download the project to the BSL area. I recommend taking a look at some of the 5xx/6xx BSL example projects included in the SLAA450 zip download for examples on how this is done.
Alex Falkovich said:Can it be achieved with BSL-Scripter or Code Composer?
You can use any JTAG based programming environment, such as CCS, IAR, Elprotronic's FET-Pro430, or similar. Some environments (like CCS) will automatically detect that you are modifying the BSL and set the appropriate hooks to unlock BSL Flash, but some require you setting a check box or similar to note that you need the BSL flash unlocked. Check through the users guide of whatever programming software you are using.
For the reasons stated above, you cannot use BSL based tools to modify the BSL (without using the temporary BSL mentioned above). If the JTAG option is available, use it, it is much easier.
Alex Falkovich said:Are there any other conditions for the MSP430F54(38/19)a to be able to program BSL but the "JTAG Key"?
This is addressed in the previous answer about the hooks to unlock BSL flash for modification.
Alex Falkovich said:Is it a way to use Olimex MSP430-JTAG-TINY-V2 (with NoICE or CC) for the purpose?
I have not personally used this tool to program BSL, but I do not see why there would be any issues. All the changes that must be made for programming the BSL either occur in the development environment (modifying the linker file to put the code in BSL space), or on the device (unlocking the BSL space for modification). The JTAG interface between the two should not matter, as long as it supports MSP430 JTAG or SBW communication.
Please let me know if I missed anything or if you need additional clarity.
Thanks,
Mike
Hi V.Nijanthan,
I recommend taking a look at the BSL User's Guide, which contains all the information about how to interface with and use the BSL.
Mike
**Attention** This is a public forum