The document SPRUGO0a is complete, but confusing. It does not make it immediately clear just how simple it is to flash your code using SCI communication. You do not need to write anything to Flash your code, you do not need to call the Boot Rom API, you do not need to include Boot API symbols in your code, or do anything in your application to communicate with the SCI port for loading. You do not need to write a RAM-based boot loader, or copy anything flash-related to RAM at run-time The Boot ROM inside the TMS320F28035 already does everything you need to place your code into flash memory. Here's what you do:
- Take your program that you want to flash (for example program.out) and prepare it for SCI bootloading with the HEX2000 utility:
C:/ti/ccsv5/tools/compiler/c2000_6.1.1/bin/hex2000 -boot -sci8 -b program.out
HEX2000 will create a binary file called program.b00. This is the file that you will dump into the F28035 serial port. - Power up F28035 with pins set this way:
- TRST = 0
- GPIO37 (a.k.a. TDO) = 0
- GPIO34 (a.k.a. CMP2OUT) = 1
- Use a terminal program on your PC (I use RealTerm v2.0.0.70), but first send the character A (or a) to establish the baud rate. No other characters will do! If the F28035 understands you, it will echo the same character back. If it does not understand you, reset at step 2 then try a lower baud rate. 38400 baud or lower works for me.
- Now dump the file program.b00 to the F28035. It will echo back every character. This will look like garbage. Ignore it (or compare it for accuracy).
- When the file has finished sending, the F28035 will begin executing your program, based on the start address embedded in the .b00 file.
- Now keep GPIO37 = 1 all the time, so at reset your program will run instead of the bootloader. Later if you want to reflash a new program, reboot with GPIO37=0 again and the serial bootloader will be waiting for you.
This is the simplest way to upload and run a program. Hope this helps someone.