Hi all,
I am facing a problem with CCSv6.1.3.00033 (on Linux Ubuntu 14.04). I am trying to debug SPL following the training http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_uboot_linux_debug_with_ccsv5 on AM437x Starter Kit (http://www.ti.com/tool/TMDXSK437X, rev. 1.2A). I performed following steps:
- Clone the u-Boot source code from GIT repository (git://git.ti.com/ti-u-boot/ti-u-boot.git, branch ti-u-boot-2015.07, version 2cc2dbc8).
- Compile u-Boot using command ‘make clean && make ARCH=arm CROSS_COMPILE=arm-none-eabi- am43xx_evm_config && make ARCH=arm CROSS_COMPILE=arm-none-eabi-‘ (using gcc from CCSv6 installation /opt/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin//arm-none-eabi-gcc).
- Import project to CCSv6 as ‘C/C++ -> Makefile Project with Existing Core’.
- Setup target configuration with Connection = ‘Texas Instruments XDS100v2 USB Debug Probe’ and Board or Device = AM4378.
- Launch the configuration and connect to the CortexA9 target.
- Load memory with ti-u-boot/spl/u-boot-spl.bin file, start address 0x402f4000 (according to CONFIG_ISW_ENTRY_ADDR value in u-boot-spl.cfg), type-size 32b.
- Load symbols from ti-u-boot/spl/u-boot-spl (code and data offset left empty).
- Set Set PC to SPL memory address (0x402F4000) and disable thumb mode CPSR.T=0.
After these steps, I am able to step through source codes in edit view (F5, F6). I am able to step through assembly code in Disassembly view (Shift+Ctrl+F5, Shift+Ctrl+F6) and define HW breakpoints in Disassembly view on lines including instructions or labels.
But, I cannot define a HW breakpoint in source codes edit view. Breakpoints could be defined only in the vectors.S file but not in the other source files. For example, if I step into start.S file and define a breakpoint at line 42, the breakpoint is created but it is disabled. I get an error “No code is associated with …” if I try to enable it (see screenshot ccsv6_starts_breakpoint_error.png below for further details). Does not matter if the source file is assembly or C file (the same issue can be observed for example with ti-u-boot/board/ti/am43xx/board.c file line 659, common/spl/spl.c line 270, …). Same behavior could be observed also if the breakpoint is created on the symbol line (for example ‘42 mrs r0, cpsr’) inside the Disassembly view. The symbols seems to be loaded correctly and also the path to the file displayed in the Disassembly window when the mouse pointer is put over the symbol line seems to be valid (see second screen shot ccsv6_starts_breakpoint.png below for further details).
At very first debug session, the message “No source code available for …” was reported for the SPL start address in the source code view together with ‘Locate file’ button as far as I remember. The correct content is displayed in the source edit view after the vectors.S file directory was located using the ‘Locate file’ option.
I found several issues reported on e2e.ti.com related to this topic, for example:
- https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/466698/1683231 - This seems to be very close to the issues I am facing now. The issue is related to the relocation, but Rafael mentioned the similar problems can be observed also for MLO(SPL) non-relocated code in the first reply. Nevertheless, I went through all the issues triggered by Rafael (SDSCM00052474, SDSCM00052475, SDSCM00052476) and all of them should be fixed in CCS 6.3.1 release.
- https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/137281; https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/134993 - This is also similar to the behavior I see, but the training does not mention I need to create a link to source files. Moreover, the link between symbol lines in the Disassembly view and source files seems to be correct and the bug is fixed in current CCS release.
- https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/170550; https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/180916/708582 - The issues are related to symbol names and breakpoints in disassembly view, this works in my case. Moreover, the associated bug SDSCM00042271 was fixed in CCS 5.2.1 release.
- https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/143491 - The issues is related to the links between the code edit and disassembly views. I am not sure if this works or not in my case since I am not able to insert the HW breakpoint in the code edit view.
Does anybody know where did I made a mistake? Any help is appreciated.
Thanks
Tomas
ccsv6_starts_breakpoint_error.png:
ccsv6_starts_breakpoint.png: