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.

boot.asm source for Tiva 1294 build?

I have an issue with a part that does not work.  We are trying to debug using disassembly and source to find out why the hardware is broken. CCSv6 displays source for the boot.asm in c:\ccsv6\tools\compiler\arm_5.1.6\lib\src.

However, the application was obviously built using boot.asm from c:\ti\tirtos_tivac_2_00_01_23\products\bios_6_40_01_15\packages\ti\targets\arm\rtsarm.

So, how do we tell CCv6 how to use the right file for both source debugging and interspersed disassembly/source? It would seem that the map file or the debug file should have the correct path, but obviously it does not.

  • If the application is built for TI-RTOS then I would expect the disassembly view and source correlation to automatically happen with the boot source file within TI-RTOS. Can you show a screenshot of what you see in the disassembly view?

    What does the link map file show - is the boot code coming from TI-RTOS or the compiler runtime library? Has the .out file or symbols for the .out file been loaded on to the target?

  • Here is a screen shot. You can see that the disassembler thinks it is at line 171 of boot.asm with an instruction "LDR r0, c_stack" when the actual machine code is loading 0xed88 into R1.

    Here is the relevant section from the map file:

                      00013c18    00000058     stk.aem4f : bind.oem4f (.text:BindFree)
                      00013c70    00000058     boot.aem4f : boot.oem4f (.text)
                      00013cc8    00000058     driverlib.lib : emac.obj (.text:EMACPHYConfigSet)
                      00013d20    00000058     stk.aem4f : igmp.oem4f (.text:IGMPTimer)

    You can see that the boot.asm code is somehow mangled into a file called boot.aem4f that *never* exists where a real person can actually go see what was really built into the system. This behavior is incredibly annoying when things go wrong. Unfortunately, "things going wrong" is not an infrequent occurrence.

    Can TI please, please, please change the XDC tool behavior to save *ALL* source code that is generated as well as *ALL* build scripts so we can go see what the system actually did when things don't make sense? There are many thousands of steps and decisions that are made during the build process and we as users have no way of figuring out what got screwed up.

    In the case of the file under consideration, we should see the actual file as mangled by the XDC tools and have a listing of the generated code.

    Yes the symbols were loaded. You can see that because CCSv6 actually knows that we are at _c_int00. It just thinks the source code is somewhere else.

    It also looks very much like none of the boot.asm files in my tree are what is actually used to build my image.  There are two versions in the ccsv6 tools path and two in the tirtos path and it appears that none of them is actually what is in my image.

    The closest version of boot.asm that seems to have been used appears to be the one from ti\tirtos_tivac_2_00_01_23\products\bios_6_40_01_15\packages\ti\targets\arm\rtsarm.  The code that exits the assembler preprocessor actually appears to start at line 159 (conditional assembly becomes TRUE at the .else) with actual code beginning at line 169. However, you can see from the disassembly that CCSv6 incorrectly thinks it is at line 171.

       .else   (Line 159)
        .if __TI_TMS470_V7M4__ & __TI_VFP_SUPPORT__

        .thumb
        ;*------------------------------------------------------
        ;* SETUP FULL ACCESS TO COPROCESSORS 10 AND 11,
        ;* REQUIRED FOR FP. COPROCESSOR ACCESS CONTROL REG
        ;* BITS [23:22] - CP11, [21:20] - CP10
        ;* SET TO 0b11 TO ENABLE FULL ACCESS
            ;*------------------------------------------------------
    cpacr   .set     0xE000ED88            ; CAPCR address
        MOVW     r1, #cpacr & 0xFFFF (Line 169)
        MOVT     r1, #cpacr >> 16
        LDR      r0, [ r1 ]

  • OK, once again, I have not found the right button to use to insert a screen shot. I'll have to go look for my last post on that subject.
  • OK, the screen shot should come through now.

  • Rats. Wrong file.  ANother try.

  • Raymond Mack said:

    We are trying to debug using disassembly and source to find out why the hardware is broken. CCSv6 displays source for the boot.asm in c:\ccsv6\tools\compiler\arm_5.1.6\lib\src.

    However, the application was obviously built using boot.asm from c:\ti\tirtos_tivac_2_00_01_23\products\bios_6_40_01_15\packages\ti\targets\arm\rtsarm.

    So, how do we tell CCv6 how to use the right file for both source debugging and interspersed disassembly/source?

    I can reproduce this with TI-RTOS examples. It looks like the source look up path in CCS defaults to the boot.asm in the compiler's library folder even for TI-RTOS projects which it should not. I will submit a bug for this.

    There are a couple of ways to add additional source lookup paths to CCS. One way is to go to menu Run->Debug Configurations, select your debug configuration in the left pane (it will be the name of your project or target config file) and go to the Source tab in the right pane. Click on Add, select File System Directory and browse to the rtsarm folder within TI-RTOS. The click on "Up" to make that appear before RTS Library Source in the list. Now the debug session should reflect the correct source lookup.

    Some additional ways (with specific contexts) to add source lookup paths is documented in the Tips and Tricks for CCSv6 presentation found here (see section titled "Debugging" starting at slide 43).

    Hope this helps!

  • Aarti:

    Thanks for confirming the issue and getting it in the queue to get fixed. Thanks also for the work arounds.

    Ray
  • Tracking number for this bug is SDSCM00051773.