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.
Hello,
I'm working on a bootloader that can update the application code as well as the bootloader image itself. I started from the spna190.zip codebase. As is well documented, to reprogram flash sector 0 the flashAPI section containing the F021 API, etc must be located to run from RAM. I may have started from a old version of spna190.zip, because I found that 3 additional changes were needed to successfully erase and reprogram the bootloader:
1. In bl_flash.c, the call to Fapi_enableMainBankSectors(0xFFFE) must be replaced with an argument of 0xFFFF to permit sector 0 erase.
2. in bl_link.cmd, section bl_flash.obj (.const) must be added into the flashAPI section. This is because the flash_sector[] data table (constant data) is used by bl_flash.c. The execution will hang in bl_flash.c on the following line unless the .const section is also located in RAM :
while(FAPI_GET_FSM_STATUS != Fapi_Status_Success);
3. bl_ymodem.c calls memcpy. This means that memcpy must also be located in RAM. I created my own version of memcpy in bl_ymodem to avoid moving some of the runtime library to RAM.
My question: I have this working now, but is there a more up-to-date version of the spna190.zip file that supports bootloader image reprogramming (that has been tested & works?) I want to be sure I haven't missed anything.
Thanks,
Keith