Due to the U.S. Thanksgiving holiday, please expect delayed responses during the week of 11/22.

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.

TMS320F280041C: Custom bootloader over CAN bus

Part Number: TMS320F280041C
Other Parts Discussed in Thread: C2000WARE

In the past I developed a custom bootloader over CAN bus for non-TI micro. Now I need to port this code to TI micro. Below are my questions:

  1. I need main APP programming file to be a binary file. How do I make CCS to create *.bin file in addition to *.out file? or How do I convert *.out file to *.bin file?
  2. How do I make a linker place main APP after a bootloader, which will be a separate project, say at 0x5000 address relative to where it is now? What changes to the code and/or properties do I need to make for the main APP code to work at that address? I assume interrupt vector table has to be relocated at least but I do not know how.
  3. What code do I need to execute to jump from bootloader to main APP?
  4. What is the best example to look at to see writing to and reading from flash on TMS320F280041C micro?

Alex

  • Hi Alex, 

    1. The C2000 hex utility can be used to create a binary file of the application. The --binary flag can be used. For more details on how to use the hex utility, please refer to section 12 of https://www.ti.com/lit/ug/spru513p/spru513p.pdf 

    2.  You can change where in memory a project is linked to by modifying the "SECTIONS" portion of the linker command file. I am not sure what you mean when you ask what sections of the application you would need to change. To get some more details about where in memory certain sections of the program are placed, you can refer to the .map file found in the folder that is named after your build configuration. 

    3. The jump from bootloader to application can vary depending on how you implement it, it would at least need a branch instruction from bootloader to application. C2000Ware has an example of a custom bootloader (referred to as a flash kernel) over SCI that goes through an ExitBoot routine that takes care of jumping from bootloader to application. You can find it at flashapi_ex2_codestartbranch.asm in the flash kernel example for F28004x. The path to the example in C2000Ware is driverlib\f28004x\examples\flash. 

    4. There are a couple of examples - flashapi_ex1_program_autoecc and flashapi_ex2_sci_kernel. The first example covers how to write to and read from flash, and the second example demonstrates how a custom bootloader/flash kernel can write an image into flash. Please note that this example writes a hex formatted file into flash, not binary. For more information on the SCI flash kernel, you can refer to https://www.ti.com/lit/an/sprabv4d/sprabv4d.pdf

    Thanks, 

    Anu