Tool/software: Code Composer Studio
We are building bare metal software for the TDA2P using the GNU Arm Embedded Toolchain (developer.arm.com/.../gnu-rm) and custom makefiles.
To debug the code we want to use CCS 8.0.0.16 and an XDS560v2 debugger. Connecting to the target and uploading the ELF is working fine and the debugger stops at the entry point of the main function.
We are using a project-less debug session, so I have to manually locate the file containing the main fucntion.
The problem is that setting breakpoints only works for the file where the main function is included. I can use 'Step Into' to step into functions from other source files without problems.
The file is found and stepping through the code is working fine, but setting breakpoints does not work as expected. Every breakpoint is greyed-out imediatelly, i.e. set to inactive. If I try to activate the breakpoint I get the following message:
"No code is associated with "FILENAME", line XXX in any loaded symbols."
This is my code:
line 186: McSPIChannelDisable( <- I set a breakpoint here line 187: u32_base_addr, line 188: u32_channel);
In the Disassembly window I see the following:
186 McSPIChannelDisable( <- Inactive breakpoint is set at this line 9e004f80: 68B9 ldr r1, [r7, #8] 9e004f82: 69B8 ldr r0, [r7, #0x18] 9e004f84: F000FD26 bl #0x9e0059d4
When I try setting a breakpoint in the disassembly view at address 9e004f80 (the line folowing the function call) I can see an active breakpoint at the exact same source code line (186) where I previously tried to set a breakpoint. But working that way is not an option as it is very time consuming.
These are our compiler and linker calls (includes and object file names have been removed for readability).
arm-none-eabi-gcc.exe -mthumb -std=gnu99 -fno-short-enums -g3 -MD -MP -DSOC_TDA2PX -D__TI_ARM_V7M4__ -mcpu=cortex-m4 -march=armv7e-m -c -o spi.o spi.c arm-none-eabi-gcc.exe -specs=rdimon.specs -T linker/linker_ipu1.lds -static -fno-short-enums -mcpu=cortex-m4 -march=armv7e-m <all objects> libs/ti.csl.aem4 libs/csl_uart_console.aem4 -lrdimon -lc -lm -o elf/out.elf


