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.

Application and Bootloader linker command file

I am trying to put bootloader and application code in the main memory of MSP430 5438 A.

 

I just need ideas and suggestions if what I am doing or thinking is right.

 

I am using the default linker file which comes with the CCS4 for the bootloader. The only change I did was to reduce the flash memory and removed FLASH2 memory, basically the memory above 10000.

 

for the application linker file , I had the FLASH from 10000. I reserved some ( 63 * 2) bytes in the end of the flash for the application interrupt vectors. 

 

Now question I have when the interrupt comes, in the bootloader ISR i will have a flag whether to pass the interrupt to the application or not.  If I have to pass the interrupt to application can I just say jump to the memory location reserved for that interrupt vector in the application flash area and that will automatically call the application ISR?

 

  • Hi,

       Is this related to your previous post I answered?  I ask, because my reply was based on the assumption you were not using a 5xx device.

    These devices have a BSL which is located in a protectable section of BSL Flash.  This means you can put your custom BSL in the reserved memory location, and not have to worry about the ISRs and other device reliability issues I pointed out.

    I would strongly recommend going in this direction, and reading SLAA450 which provides reusable source code for the existing BSL.

    The document is relatively new, so if anything is unclear, or if you have any questions, don't hesitate to post.

  • No I am using a 5438 A device and the reason I cannot use the BSL is because we cannot have the hardware functionality to toggle the pins.! And from what I see is that a lot of people have done what I am trying to do. Its just that I cannot see any examples of the bootloader and application linker files. 

     

    It would be great if I can see some example of this.

     

    Thanks

    Harsh

  • Another problem I have is we are not using IAR workbench. I want to do this in CCS4.

     

    All the examples I have seen are in IAR.

    Can't TI provide something which is entirely in CCS4??

     

    Harsh

  • >I cannot use the BSL is because we cannot have the hardware functionality to toggle the pins.!

    Just in the interest of providing information:  The 5xx BSL can be customized to the extent that the startup criteria is also customizable.. so you are not bound to the pin toggle sequence to start the BSL.  In the other thread I described using a special reserved keyword which is only written to after the Application code has been verified as correct.

    A custom BSL could simply check this keyword, and start the BSL if it is blank, otherwise it would proceed with normal application startup.  The BSL could also be started later for an upgrade via a call in from your running application.

    You are correct however, our current BSL is only given as an IAR project (buildable with the free download however)

**Attention** This is a public forum