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.

TM4C129XNCZAD: How to import and use TI demo/example code

Part Number: TM4C129XNCZAD

Tool/software:

About 9 months ago I took over a project in a small company.  Fortunately I have been able to solve all major problems reported in the field, and now I'm getting down to fine points.  For that I want to go back and learn from some of the demo projects.  Since it's a small company, there's no one I can ask specific questions about these tools.  And since I'm an EE, not computer science, my programming background is very narrow.

Can you give me some pointers about how to get started using a demo project?  I was able to import the project and now it's active.

Will it build successfully immediately on import, or do I need to adjust any settings?  When I click the build button, nothing happens.

I have been using the TM4C129X Development Board as a pass through to program the board our company produced.  How do I change it to program the development board?

And finally, I assume the board has serial ports.  How do I connect to them?  I'm starting with the uart_echo project.  I want to change to interrupt driven communication, not polling to turn off the RS485 transmitter when done with a message.

Thanks very much.

  • Hi Mark,

    Can you give me some pointers about how to get started using a demo project?  I was able to import the project and now it's active.

    There are some training videos for TM4C MCU. Although the board used in the training material is for TM4C123, TM4C123 is very similar to TM4C129 for many of the peripherals. 

    https://software-dl.ti.com/trainingTTO/trainingTTO_public_sw/GSW-TM4C123G-LaunchPad/TM4C123G_LaunchPad_Workshop_Workbook.pdf

    https://www.youtube.com/watch?v=Xs0IoL_L2Ts

    Will it build successfully immediately on import, or do I need to adjust any settings?  When I click the build button, nothing happens.

    There is no CCS setting you need to change once you import a project. Since you are using the DK-TM4C129X EVM, you would import the example projects from C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\dk-tm4c129x. For example, you could import the simple blinky project from C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\dk-tm4c129x\blinky. These pre-built projects have the correct CCS settings. Once you imported a project, simply click the 'debug' icon. See below. It will build the project, connect the debugger to the target device, load the firmware to the flash and then run the firmware all in one click. You should see the LED blinking on the board. 

    I have been using the TM4C129X Development Board as a pass through to program the board our company produced.  How do I change it to program the development board?

    As explained above, if you want to play with the DK-TM4C129X EVM board, just click the 'debug' button. It will load the example code to the target device on the EVM board. What you did before was to use the DK-TM4C129X EVM board as a debug probe to debug/program your custom board. Now, you will just use the DK-TM4C129X board itself. 

    And finally, I assume the board has serial ports.  How do I connect to them?  I'm starting with the uart_echo project.  I want to change to interrupt driven communication, not polling to turn off the RS485 transmitter when done with a message.

    The DK-TM4C129X board has an on-board ICDI debug probe. Look closely at the TM4C123 chip on the board that is next to the USB debug port. The ICDI has two major functions. First, it acts as a debug probe by bridging the USB to JTAG. Secondly, it routes the target device's UART0 port to the ICDI chip. When you plug the cable to the USB device port on the port, you should see the Stellaris Virtual Serial Port. Just open a terminal window (e.g. Putty, TeraTerm)  on your PC with the COM port number that is displayed on the Windows Device Manger and you should see whatever you type on the terminal window echoed back the MCU when you run uart_echo. 

  • Fortunately I now have a coworker also using ccs and I was able to get some help.  I'm going to post the instructions I needed.

    To open and use an example, in ccs click File, Import.

    Under Code Composer Studio, select CCS Projects, then Next.

    Choose "Select search-directory:" and click Browse.

    Navigate to

    C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\dk-tm4c129x

    Once you double click on the project you want, single click the ccs subfolder, then click Select Folder.

    You should now have a window as in the image below.  Click Finish.  (see notes below)

    Now you can click Project, Build, and it should build properly.

    NOTE 1: If you try to select the parent folder instead of the ccs subfolder, it will not work.

    NOTE 2: If you copy the example folder somewhere else on your hard drive and then try to import using the above procedure, the project will not build immediately after import.  Modifications will be necessary.

  • I have now imported the example code and I can build it without any problem.  When I try to program the development kit board, it seems like the programming software is still looking for a target board outside the development kit board.  How do I program the development kit board?

  • When I try to program the development kit board, it seems like the programming software is still looking for a target board outside the development kit board.

    I'm not clear what you meant that the programming tool is looking for a target board outside the development kit board? What do you mean?

    If you imported a example project for the DK board then the project contains a target configuration file called target_config.ccxml.  If you left-click the file, it will bring up the target configuration which selects Tiva TM4C129XNCZAD as the target device which is is the one on the DK-TM4C129X EVM. See below blinky example. 

  • I did as you said, and I can see that that processor is selected, as it should be.  See the screenshot below.

    What I mean is that in the current configuration we are using the TM4C129X board as a programming device.  I have never actually debugged with it, but maybe the previous programmer did.  When I click Flash in the tool bar, it does not program the development board, it programs our custom made board for our instrument.

    I know that it's possible to program the development board because some of the boards power up with our custom screen.  Some of the boards have not been programmed with our firmware, because they still power up with the little app that would display the weather in various cities of the world.

  • What I mean is that in the current configuration we are using the TM4C129X board as a programming device.  I have never actually debugged with it, but maybe the previous programmer did.  When I click Flash in the tool bar, it does not program the development board, it programs our custom made board for our instrument.

    If you are currently using the DK-TM4C129X board as a programmer for an external custom board then you would need to first remove any wires between the two boards and also restore J3 jumper on the DK board to its original settings so you can debug the target device on the board itself. Refer to the user's guide for details. 

    2.1.4 Debugging and Programming
    • ICDI: The DK-TM4C129X has a built in debugger, which can be used by connection to a computer
    using the included USB micro-B to USB-A plug cable from the microUSB-B connector (J4) located in
    the upper right of the board to a USB port on your computer. The on-board ICDI can also be used to
    debug external boards using the ARM standard 20-pin connector (J1) and pulling all the shunts from
    J3.
    • External debugger: an external debugger can be used through the ARM standard 20 pin connector J1.