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.

CCS: Use file extension .elf in the CCS debug configuration

Tool/software: Code Composer Studio

Hi,

I created a CCS project using the GCC toolchain and a custom makefile. The final build target contains the file extension .elf while CCS expects .out as the suffix. This leads to an error when starting a debug session: CCS cannot find and load the application since the file suffix is wrong.

It works though when I hard-code the path to the ELF file in the following dialog:

I don't want to hard-code the file path, but I want to construct it based on available variables like the build directory and the project name.

Questions:

  • Is there any documentation available about variables I can put in this field? 
  • Can you help me to generalize that field? I don't want to hard-code the filepath. I tried ${BuildDirectory}/{ProjName}.elf but that results in below error message and makes the debug configuration unusable. CCS will not open the debug settings dialog if it finds an error there. This is annoying.

Thanks

  • Richard,

    I will see if I can get a solution working that uses variables. I don't believe all the variables are available from that dialog as it is somewhat disconnected from the project system.

    One simple solution would be to just have a post build step that copied the .elf to .out.

    John
  • Another thing to note is that CCS is fine with .elf.  Here I have my project configured to generate the output with .elf as the extension instead of .out and it builds and loads it fine.

    Would it be possible to share your project?  I am not sure how self contained it is.  You can send it to me via email if you like.

    John

  • One variable that you could use is workspace_loc if your project is inside your workspace

    ${workspace_loc}/myproject/Debug/myproject.elf
  • Hey,

    thanks for helping me so quickly. I am using an external makefile, hence setting compiler options in CCS don't apply. As far as I understand, the debug launch configuration is something completely different than the build configuration. They don't share variables. Would be nice to see which variables are actually available.

    I stumbled across this when writing some instructions how to debug Contiki example applications in CCS, because that seems to be completely unknown and customers usually debug with gdb on command line which is very painful. You may want to look at the powerpoint attached to this post and tell me if this could be done simpler. For creating own applications, I think customers should rather put the application code into the project folder as well as the makefile and leave Contiki in a separate folder in the file system. Then they would also need to add include paths to the compiler options so that CCS can resolve them automatically.

    Thanks for your help. After all, I think, the absolute path to the ELF file in the launch config is not such a big issue.