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.

CODECOMPOSER: Eliminated Variable Still Appears As A Debuggable Symbol

Part Number: CODECOMPOSER
Other Parts Discussed in Thread: AM263P4

Tool/software:

Hello,

I'm using CCS 12.8.1.

In the following snippet from an AM263P4 program, unused_var is discarded since it is not referenced:

However, it still gets a DWARF symbol in the ELF file albeit with address 0x0:

The debugger is none the wiser and allows this non existent variable to be selected thus incorrectly dereferencing the entry point.

I think this eliminated variable should not be selectable in the debugger.

  • Hi Kier,

    What compiler and what compile options are you using?

    Thanks,

    Oliver

  • Hi Oliver,

    I'm using Compiler v 3.2.2. Here are the options with some project info removed:

    Compiler:

    -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ccs1280/ccs/tools/compiler/ti-cgt-armllvm_3.2.2.LTS/include/c" -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function


    Linker:

    -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -Wl," -Wl, -Wl,-i"C:/ti/mcu_plus_sdk_am263px_09_02_00_56/source/drivers/lib" -Wl,-i"C:/ti/mcu_plus_sdk_am263px_09_02_00_56/source/board/lib" -Wl,-i"C:/ti/ccs1280/ccs/tools/compiler/ti-cgt-armllvm_3.2.2.LTS/lib" -Wl,--reread_libs -Wl,--diag_suppress=10063 -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl, -Wl,--rom_model