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 v.4.2.4.00033 and LM3S9B96 debugging problems

Hi there,

I had opportunity to read

Using SYS/BIOS with Stellaris

® ARM® Cortex™-M3 Microcontrollers

and at the first point I was very happy that it describes exactly the same microcontroller that we are using.

But the problem I've reported during the debugging session.(software seems to be flashed and connection has been established) ( but - I see that not all breakpoints are hit and step/step over instructions jump somewhere in the strange places in C code )

Of course I use In-Circuit Debug Interface as mentioned in tutorial above.

Do you have any guesses why debugger acts so strange and C code is not in synch with the Program Counter?

Best Regards,

Karol

  • Basicly, as attached. "a" variable is not seen in locals and the test() function breakpoint is never reached.

    JTAG frequency has been set by default as 1000000 Hz.

  • Hello Karol,

    Karol Sabat said:
    Do you have any guesses why debugger acts so strange and C code is not in synch with the Program Counter?

    One common cause for the symptoms you see is trying source-line level debug for optimized code. Are you trying to debug optimized code? Did you build with full symbolic debug?

    Thanks

    ki

  • Hi Ki-Soo,

    Thanks for the hint, but I've tried it in the first place and that helped in case of the stepping trough the code(step in/step over), but debugger still seems to not see my changes(includding added "a" variable).

    My current compiler line looks like :

    "C:/ti/ccsv4/tools/compiler/TMS470 Code Generation Tools 4.9.3/bin/cl470" -mv7M3 --

    code_state=16 --abi=eabi -me -O0 -g --gcc --define=ccs --define=PART_LM3S9B96 --diag_warning=225 --ual -z --stack_size=256 -m"test7.map" --heap_size=3000 -i"C:/ti/ccsv4/tools/compiler/TMS470 Code Generation Tools 4.9.3/lib" -i"C:/ti/ccsv4/tools/compiler/TMS470 Code Generation Tools 4.9.3/include" --reread_libs --warn_sections --rom_model -o "test7.out" $(ORDERED_OBJS)

    You may see that the optimization is set to O0, but the first break I may set is the

        BIOS_start();

    So that looks like the code added above is still ignored.

    Any guess why it's like this ? (of course I'm not a newbie in the embedded world so of cource clean and rebuild have been used constantly).

    Best Regards,

    Karol

  • Please close this issue. I was testing few IDEs and Your compiler is more smart than gcc and others:) If you will look at the main() assembly code in the picture above then you will see that test() function was not assembled, cause it's not returning anything and is using only local variables. When I've added printf() function inside of the test() function then code has been assembled and all started to work as expected.  Cheers,K.