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.
Hi there,
I have a need to remove all of the firmware on my device and replace it with new firmware (which is a subset of the old firmware).
I have written code to load the various functions I need to RAM and perform a mass erase. This all works fine and I can verify it.
I also have the new code in RAM to be written back to flash. Writing these instructions to flash is trivial, but I am finding it tricky to work out where to put the instructions, or, where to update the pointer to the first instruction.
Basically, the code is in flash but doesn't run.
I have seem something about the address 0x17FA - this stores the address of the first instruction? Is it here that I need to put the memory address of my newly written flash? There are various signatures as well, do I need to update these in some way? I have already accidentally bricked a device!
I do not have the BSL still running on the device - I have completely deleted it if that makes a difference.
Cheers,
Tom
Tom,
According to the memory map of the MSP430F5438 device, address 0x17FA resides in the Bootloader (BSL) flash memory so it is not recommended to operate in that address range unless you are writing a custom BSL.
TI provides software such as the MSP Bootloader and MSPBoot to help with custom memory programming projects. If you have deleted the default BSL image you can reprogram it using the MSPBoot image provided by TI.
Best regards,
Matt
Tom,
I found a document that helps customers Create a Custom Flash-Based Bootloader (BSL) which has more detailed information on how the first instructions of the BSL sequence and the actual application code are handled.
I am going to reach out to our experts in BSL implementation to see if they have any additional recommendations or information.
Best regards,
Matt
Hi Tom,
What I understand from your explanation, the BSL that you created is part of your application, is that correct?
If yes, and you would like to run this BSL application after start up of the device, you can set the reset vector (at address @0xFFEF) with the location of BSL application. However there is no direct way to overwrite the reset vector using pragma definition (i tried on my side and the compilation will fail).
I found another thread that asked this overwriting the reset vector: http://e2e.ti.com/support/microcontrollers/msp430/f/166/t/481953
Let me know if this helps.
**Attention** This is a public forum