Codeskin - C2Prog - Flashing with the Serial Port

This page explains how to program the flash on your Segbot serially and without debugging using CodeSkin's software C2Prog. The software is available to download for free on their website. Simply navigate to the Programmer section of the site and download.

CodeSkin.com

If you do not have a Java Runtime Environment version 1.5 or newer installed on your computer, you will need to download that before you can use C2Prog. You can find the correct version of JRE at Oracle's website.

JRE Downloads Page

Generating the Intel-Hex File

If you do not have a version of CCS installed and setup, you can download a generated .hex file for the Segbot here. After you have this downloaded, continue to the C2Prog section below.

In order to flash using the serial port, you need to generate an Intel-Hex file using the post build options of the build properties of your Code Composer Studio Segbot project. To do this in CCSv3.3, go to the Build Options of your project, find the final build options, and enter this line:

hex2000 -romwidth 16 -memwidth 16 -i -o .\Debug\test.hex .\Debug\test.out

Your build options window should look like this:


For CCSv4.2, go to the Build Properties of your project, find the Build Steps tab, and enter the following line in the Post-Build Step Command line:

"${CG_TOOL_ROOT}/bin/hex${CG_TOOL_SUFFIX}.exe" -i "${BuildArtifactFileName}" -o "${BuildArtifactFileBaseName}.hex" -order MS -romwidth 16

Your Build Properties window should appear like this:


In both CCSv3.3 and CCSv4.2, Texas Instrument's hex2000.exe file will be called to generate the hex file necessary for programming the F28335 serially. The next step is to prepare the F28335 to boot into SCI-A mode, rather than boot from flash. Depending on the age of your controlCARD, you will either need to simply change some switches on the card, or in the case of older cards, remove a resistor from the card. To be sure, make sure you prepared the card according to this page.

The final step is quite straightforward. Make sure that the Segbot is powered and connected (to the USB), and open C2Prog. C2Prog will prompt you if you want to search for updates. Click Yes. Next, click Select File and find the hex file that was generated by your post build options, or the hex file you downloaded. Click the Programming Configuration box to open the programming options. Set up the options appropriately for the F28335 and crystal on your controlCARD. New cards will be 30 MHz but older cards may be either 20 or 24. If your card is not 30 MHz, you will have to make the appropriate changes and generate a new hex file. C2Prog should appear as follows:


Next, either type in the name of the COMM port, or find it by clicking the Configure Ports button, of the serial port for the Segbot. After you have selected the correct port, click Program and C2Prog will program the flash on the F28335. If it cannot find the target, make sure you have selected the correct COMM port. Once the flashing completes, close C2Prog, disconnect and power off the Segbot, and the device should be correctly flashed.

Home ♦ Updates ♦ Videos ♦ Contact Information 

Precision. Accuracy. Speed.

University of Illinois at Urbana-Champaign Logo Control Systems Instructional Laboratory
University of Illinois
at Urbana-Champaign
1406 W Green
Urbana, IL 61801-2307