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.

F28M36P63C2: Starting TI-RTOS application flashed with bare-metal bootloader

Part Number: F28M36P63C2

I am integrating a bare-metal flash bootloader with a TI-RTOS application. I want to make sure I have made all the changes necessary to relocate the TI-RTOS application in flash memory and run it after it has been burned to flash by the bootloader.

The bootloader successfully flashes and runs a simple bare-metal test application.  When I use the bootloader to load my TI-RTOS application I believe it is successfully flashed but the application fails to successfully run.

On power-on the M3 processor BOOTROM jumps to 0x00200030 and executes the bare-metal bootloader.  When the bootloader is finished loading the application into flash it looks in flash memory where it is expecting to find the application code's reset vector table and uses the second 4-byte value from the table as the address to which it will branch to start the application code.

I have made the following changes to the placement of the TI-RTOS application code on the M3 processor:

  • Modified my linker command file to allow space for the bootloader and relocate the application in flash memory
  • Moved the application flash memory Reset Vector Table address so that the bootloader should pick up _c_int00 from the table as the start address of the application code.
  • Moved the BOOT_FLASH memory segment from 0x00200030 to a spot in the new application code area

On the C28 I've made the following changes:

  • Modified my linker command file to allow space for the bootloader and relocate the application in flash memory
  • Changed the BEGIN linker command file memory segment to the new application code area

  • Can you give any more detail on how application is failing to run? Are you able to step through the code to find out? Is it branching to the application successfully at least or is it getting lost before then?

    Whitney
  • At this point I know the application is not running (or has failed) after the bootloader simply because it is not blinking LEDs on the control-CARD. I have not yet attempted to figure out how to make the TI Debugger do a post-mortem on the situation.

    I guess before I go there I'd like to know exactly what should be changed in my application code in order to successfully move it in flash and RAM memory to allow for a bootloader which starts up on processor reset and then jumps to the start of the application code. Can you summarize the changes required to a standard TI-RTOS application on the F28M36P63C2 part?

    If helpful I can share my linker command and other files, but I'd prefer not to do that publicly.
    Thanks,
    Chris
  • Any progress in your debug?

    If you're running an application standalone from flash and want to connect the debugger to see where it is getting stuck, you can typically launch a debug session with your usual target config, but before you connect to the device, go to Tools->GEL Files and right click the .gel to remove it. That way when you do connect to the device the GEL won't run and reset it, leaving you to be able to see what kind of state it's in. You can also go to Run->Load->Load Symbols to apply the symbols for your project for debug information without totally reloading it and again causing a reset.

    I can't think of anything special you should need to do to put TI-RTOS in flash. It should just be a matter of updating your cmd file. Depending on what exactly you're trying to do, the wild card notation on this page might be helpful:
    processors.wiki.ti.com/.../BIOS_FAQs

    I don't mind taking a look at your cmd and map files. If you hover over my user name you should be able to request friendship. You should be able to send me a PM after I accept the request.

    Whitney