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.

MSP432,build code at dedicate address , use IAR

I try build a customer Bootloader.

I need build application code and put it in a dedicate segment address. Code files should use .BIN.

I will not use BSL API, just coding by hand.

I will put two set code in different address, and bootloader can controlled to run one of them at one time.

If any sample can found?I think it should be include how to modify .icf, how re-write vector table, how run code which saved in different segment address. 

  • Hi Tan Sun,

    I'm also developing a custom boot loader. Please allow me some time to clean up my code and I'll send you a simple version of this boot loader and its application.

     The memory map looks like this:

      Thanks,

       David

  • Hi Tan Sun,

     Please find attached both projects.

    Application Project

    Boot Loader Project

     Hopefully this helps.

       David

  • Hi David,

    Thanks for your support.

    We were checked on it, any feedback, will let you know.

    Thanks!

  • BTW,

    If any comment for this code? How do I run it up? Any port used when I update code? We can reference it for PC's software coding.

    Thanks!
  • Hi Tan Sun,

     My apologies for not adding any kind of explanation.

    Boot Loader Project - Goes from 0x00000000 to 0x00001FFF

    - Coming out from reset, it will check if the application is valid and it will also check if there was not a transfer from the application

    - If both conditions are met, it will give the control to application. In other words, it will jump to the Application reset vector located at 0x00002004.

    - if any of these conditions is not met, the boot loader will toggle P2.2 for 100 times and then it will try again (force a reboot)

    Application Project - Goes from 0x00002000 to 0x0003FFFF

    - As soon as it gets the control, the function "ResetISR" will get called and then the VTOR register is updated "configureVectorTableAddress"

    - main will run and will configure the TimerA (1 second interval) to toggle P2.2.

    - P2.2 will toggle for 20 times and then it will transfer the control back to the boot loader

    There are a few things that you will need to be aware:

    1. appTransferKey is variable that is shared between both applications and it is used to transfer the control from the application to the boot code

    2. APP_SW_Is_Valid verifies that the sw key was programmed correctly. The sw key is located at the end of the application flash, please take a look at app_status.c/.h

    3. Make sure that you do not overwrite the boot or the application when downloading each project. This is configured inside the .board files (ex. msp432_simple_application_project)

    Hopefully this makes sense.

      David

  • Hi Tan Sun,

    Is this debug effort still ongoing? If not, can I close out this thread.

    Thanks,

    David
  • Hi  David,

    Thanks for your code.

    Debug is ongiong, but we have closeed the address issue,  now code can allocate in right address. Next will keep optimize code of communicate and reliability.

    Thanks!

**Attention** This is a public forum