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.

Question about bootloader for F28M35

I need to update the firmware of F28M35 through the CAN periphral as the new release edition is published for our products. So I wish that the device can boot from flash in most usual case, but it can receive the new boot image data from CAN periphral and instead of the old data in the flash when new edition comes out. Addition, users can't change the boot mode pin configuration.


According to the reference document, I think I can add my codes to bootloader and make a choice before mbrom_start_app(entry_point_address).


I still have some problem in the boot process. As spruh22 mentioned, after reset the NVIC should be placed in zero address. Then it should execute the resetISR(), and jumps the _c_int00 in the "startup_ccs.c" file. I watched the map file, the address of _c_int00 is 0x0020XXXX, which is not fixed. I am confused that does the _c_int00 be the bootloader program? And if it is not, is the bootloader program stored in the 0x000001DC in the M-Boot ROM and when it was executed since the resetISR() had jumped to _c_int00 after reset? If it is, why it changed the address and when it is copied to this address?

Thanks a lot!

  • Leon,

    which sections of the TRM you are referring to in the above? The boot ROM sections of the TRM talk about the loaders in ROM and CAN boot is one of the options supported by the ROM code. The boot loaders in ROM support loading of application image to RAM only.

    as I understand from your post above, you would let the device boot to flash, then after that the application in flash takes care of upgrading the flashed image and you want to use CAN peripheral to get the new application image?

    as of now we don't have any flash based or RAM based example that could do this. We might have some example that calls back into the ROM functions or completely execute from flash and do the boot load, by end of august.

     

    Best Regards

    Santosh

     

     

  • Santosh


    Thanks for your reply.


    I read the Chapter 6 "ROM Code and Peripheral Booting" of TRM. I don't know the difference between the boot ROM and boot loaders. Is that "_c_int00" the start address of the boot loaders? And when the Boot Rom program run?

    Your understanding is correct. To achieve this target, I have two ways:

    One is when device's Boot Rom (or bootloader) starts, it waits for a period for the CAN periphral, if CAN send protocol data before time elapsed it will update the image of flash, else it will boot from flash.

    The other is when it always starts the program, and in the program it can receive the updated image data from CAN periphal and write data to the flash. So it can start the new application next time.


    According to this, I have to know:


    1 How to write the image data to flash, is the LM Flash Programmer used for Stellaris serials also suited F28M35? Or use the F021 API to update flash in the second way?

    2 As I have to finish the function in the end of this month.Is there some options to achieve the goal? May I finish the second way by myself? I thought I need to know how to use the F021 API, how to configure the address of the image data, and how to let the program run to the proper address after update?

    Best Regards

    Leon

  • It seems that I have known a little more about the boot process.

    The ResetISR located in 0x00000004 will guide the PC to Boot Rom program, which is a bootloader program and copies another bootloader to the right address or received the data from periphrals. The Boot Rom program will transfer the control to second bootloader after it finishs its task.

    The second bootloader will also start from the ResetISR which is relocated in the new address, and usually point to "_c_int00" in startup_ccs.c file. The "_c_int00" program will finish the c runtime enviroment setup and transfer the control to "main", which is the user's program.

    But in the debug mode, it will directly jump to the entry of "main".