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.

Problems to debug a GCC code for Cortex a8 on CCS 5.5



Hi,

I am using the CCS 5.5 (Version: 5.5.0.00077) in order to load and debug some programs which are compiled for Cortex-A8 target with GCC compiler. The code is built outside the CCS environment using Scons tool.

I get several messages like when trying to watch some variables into my code:
Error: unresolved location: unknown Reg ID 0x55
Error: Cannot read from an optimized out location

Additionally inserting some printf in the code results to "€€€€€" in the CCS Console window.

Is there a way to debug simply a GCC-code into CCS and be able to watch all variables?
Is there a way to make printf usable?

Thanks,

Spencer

  • Which GCC compiler is used for the build? Is it the toolchain included with CCS or an external tool chain?

    It sounds like the code was built with optimization turned on. Depending on the level of optimization, variables could be optimized out, or placed in registers instead of memory, all of which will make it difficult to visualize in CCS. If you have access to the build environment, you could try rebulding with optimization turned off and see if that helps.

    For printf support, I believe we have tested this with Linaro GCC toolchain but I am not sure if it will work natively with other toolchains. Please see http://processors.wiki.ti.com/index.php/Semihosting

     

  • Hi,

    Yes we are using for this project an external tool (Scons) to build our source files outside the CCS environment.

    Into CCS we are loading the generated out-file.

    The compiler which is used is: GGC 4.7.3 20121207

    Compiler options used for Cortex-A8 are: "-g -march=armv7-a -mtune=cortex-a8 -mlittle-endian -O1 -ftree-vectorize -ffast-math -mabi=aapcs -fshort-enums -mfpu=neon -mfloat-abi=hard --asm -mvectorize-with-neon-quad"
    (in fact the same options than production code, with additional -g for debugging mode.)

    Thanks,

    Spencer

  • Spencer DANNE said:
    Compiler options used for Cortex-A8 are: "-g -march=armv7-a -mtune=cortex-a8 -mlittle-endian -O1 -ftree-vectorize -ffast-math -mabi=aapcs -fshort-enums -mfpu=neon -mfloat-abi=hard --asm -mvectorize-with-neon-quad"

    You are building with -o1. As Aarti mentioned above, the variable is getting optimized away.

    ki