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.

TM4C129XNCZAD: PC / IRP corrupted (over the code address)

Part Number: TM4C129XNCZAD
Other Parts Discussed in Thread: UNIFLASH

Hi

I have a very large code on the TIVA (950KB without optimization, 830 with size optimization). the upper 16K of the flash are used as FLASH RAM.

recently I see that the program counter (and the IRP for most of the interrupts) goes beyond 0x100,000  (e.g 0x108a16).

I do not see any stress on the task stacks, no exception, and, actually - the upper priority tasks are running normally. one of the tasks does not have a call stack and goes to this pseudo-address when it gets the CPU.

all this happens only if I load the code from the debugger, but not when loaded from DFU or uniflash

registers

tasks

thanks!

  • recently I see that the program counter (and the IRP for most of the interrupts) goes beyond 0x100,000 

    Your screenshot of the registers shows the PC value of 0x1008a16. That address is actually inside the On-chip ROM of the device, and so is a valid address if your program calls ROM_ (or possibly MAP_) functions in TivaWare.

    Note that the data sheet current shows an incorrect start address for the on-chip ROM. See CCS/EK-TM4C1294XL: Memory Map Prevented reading 0X01009B7C

  • I see that the GEL file is correct5, yet cannot trace or understand where am I in the code in this area

  • I see that the GEL file is correct5, yet cannot trace or understand where am I in the code in this area

    Does your code call any TivaWare functions in the on-chip ROM, either explicitly by calls to ROM_ functions or via MAP_functions?

    one of the tasks does not have a call stack and goes to this pseudo-address when it gets the CPU.

    Does the task stop running correctly, or it just that when you sample the call stack when running under the debugger that you see the code in a call to a function in the on-chip ROM?

    There is no symbolic information to the CCS debugger for the contents of the on-chip ROM, and without testing not sure if the debugger or ROV will be able to show a call stack with no symbolic information.

    Do you use the TI or GNU ARM compiler?

  • Thank you, Chester.
    My code does call ROM_ and MAP_ functions.

    the code stops running correctly - the task that is pointing to this address is in eternal loop. all tasks above it are running correctly, including the interrupts.

    I am using TI CCS. the problem happens only when code is loaded by the debugger using JTAG. I am wondering if I limited the code loading in some way.

    FYI: I am using CCS 7.4, Tivaware 2.2.111

  • That is an old version of CCS you are using. The latest version is 10.3 and available here: https://www.ti.com/tool/CCSTUDIO-TM4X#downloads

    I no longer have a version of CCS 7.4. You can load your program using CCS with JTAG, then connect with UNIFLASH and  do a "Verify Image" to see if the flash contents are the same between the two methods.

    I don't believe you recorded the correct version of TivaWare you are using. The latest version is 2.2.0.295