Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.
Intro to C2000 Bootloader
This article is meant to describe the use of the C2000 bootloader. Generally the bootloader of the different C2000 devices is explained in the Boot ROM Reference Guide (C2000 Reference Guide (SPRU566)) or the Technical Reference Guide of the specific device family. How to use the bootloader should be explained here in a more practical way.
The C2000 bootloader can be accessed in two different ways by setting/resetting the TRST pin of the device during power up:
- Stand-alone boot if TRST = 0
- Emulation boot if TRST = 1
This article mainly covers the use of the stand-alone boot. Nevertheless, the boot procedure is the same for both ways. Only the steps how to access the emulation boot is different. Please refer to Emulation Boot for more information.
Loading an Application to RAM
With the following procedure you are able to send program data to the device RAM memory via the SCI. This procedure can easily be tested with a C2000 Experimenters Kit or any EMV that has an XDS100v2 emulator which provides a serial connection interface to the device.
- The programs .out file that you want to load first needs to get prepared to be able to send it to the SCI bootloader. With the HEX2000 utility the object oriented .out file needs to be converted to an binary file in the proper format. The tool can be found in the c2000 compiler folder of CCS, e.g. C:\ti\ccsv5\tools\compiler\c2000_6.2.5\bin. Copy the HEX2000 tool into the same folder as your program.out file.
- Open CMD and direct to this location. Now you can run the tool with the following command: hex2000 -boot -sci8 -b program.out.
HEX2000 will create a binary file called program.b00 in the same folder. This is the file that you will dump into the device serial port.
- Power up your device with pins set this way:
TRST = 0
GPIO37 = 0
GPIO34 = 1
These settings tell the device bootloader to load what it receives on the SCI port into the RAM. On the C2000 ControlCard and experimenter kit there are jumper and switches to make this configuration.
- Open a terminal program on your PC (RealTerm v22.214.171.124 or HyperTerminal should work fine, I had no success with TerraTerm). First send the character A (or a) to establish the baud rate. No other characters will do! If the device understands you, it will echo the same character back. If it does not understand you then try a lower baud rate (38400 baud or lower should work).
- Now dump the file program.b00 to the F28035. It will echo back every character.
- When the file has finished sending, the device will begin executing your program, based on the start address embedded in the .b00 file.
- Now keep GPIO37 = 1, so at reset your program will run instead of the bootloader. Later if you want to reprogram it, reboot with GPIO37=0 again and the serial bootloader will be waiting for you.
Loading an Application to Flash
The bootloader stored in the device boot ROM is only capable of loading code into the RAM. To store the code into the device flash this primary bootloader can be used to load a secondary Bootloader into the RAM that is capable of writing the code into the Flash memory. For this secondary bootloader there is currently no example code available.
Flash the Device using C2Prog
C2Prog is a flash programming tool for TI C2000™ and MSP430™ MCUs. Rather than relying exclusively on JTAG as the communication interface between the programming tool and the MCU, C2Prog also supports reflashing over RS-232, RS-485, TCP/IP, USB and Controller Area Network (CAN). The programmer is, therefore, well suited for deployment in the field where the JTAG port is typically not accessible.