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.

TMS320F28335: Custom Bootloader

Part Number: TMS320F28335

Dear all,

Good Evening...!!!

I am working on flash programming of F28335. My agenda is to create a custom bootloader which can check for code on the spi port for a duration and if no code found, will go for prior application boot. 

I made two application codes:

    1. Application one is having all the flash api's and spi configuration related code(Kept purposely in Flash Sector H)

    2. Application two is my actual firmware(Used Flash A to G)

Questions:

   1. How to switch from one application to another and where to switch(Do both applications need a main function)

   2. How to find the location of main function of 2nd application (if two separate main function is part of both application)

Thanks in advance...!!!

Regards,

RS

  • first of all you can swap both applications

    Sector A can have the flash api and SPI configuration. Because the device boots up and checks for 0x80000 which is sector A. In this application you can check for SPI port.

    from here you can jump to second application.

    The second application can be kept in sectors B to H.

    you keep separate projects for both applications. so both of them will have main function.

    In general lot of things happen before main function. so main is not the first code that executes in an application. to get the first instruction address you can look for code_start in map file. from application you can jump to this address (you can create a function pointer for this).