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.

Code runs through debugger but not when flashed

I am using CCS 5.5 with an LM3S6618. I have been working with existing projects in CCS, created by somebody else, with no problems for quite some time. However, I have not been successful in creating a new project from scratch.

When I create a new project, I can write code and run it through the debugger just fine. But when I write the .out file (it's not .bin?) with LMFlash, nothing happens, the code does not run. Attaching to it in the debugger seems to show that it is stuck at 0x00000000.

I even followed the TI CCS tutorial video on YouTube with no success.

I create a new project by:

  1. Creating a new project.
  2. Choosing the LM3S6618 target and the In-Circuit Debug Interface
  3. Adding the Stellarisware path to includes.
  4. Adding driverlib\ccs-cm3\Debug\driverlib-cm3.lib to the link line.
  5. Typing code in the generated main.c.

I don't modify any other project settings or the linker command file or lm3s6618_startup_ccs.c. It runs in the debugger but not when flashed.

I am therefore unable to create a new project from scratch with CCS.

I watched the video tutorial specifically because I thought I may have missed a configuration step or build tool setup somewhere. It appears I did not.

Please advise.

  • After comparing all the build settings between a working project and nonworking (I did this but missed what I was looking for), I discovered that the following post-build step had to be added to generate a .bin from the .out file:

    "${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/armofd.exe" "${CG_TOOL_ROOT}/bin/armhex.exe" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe"

    I realize that compiling code to an image and flashing it to a chip is a very rare use case, and I completely understand why TI chose to not make this part of the default build configuration nor visibly document it in any way and leave it out of all tutorials. Good thinking.