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.

Dynamic Memory Analysis

Other Parts Discussed in Thread: HALCOGEN

I've got a setup involving:

CCSv5 + XDS100v2 + TMS570LS202016 running FreeRTOS (via HalCoGen).

Unforunately, the last-minute addition of some code is now blowing memory allocation and throwing data aborts.

Can anyone recommend any good toolchains for performing dynamic memory analysis: i.e. getting the 'actual' memory map at runtime, to see how much stack/heap is allocation vs available? Unfortunately the application (and FreeRTOS) uses malloc, so the static memory map lacks a lot of runtime reality.

Any suggestions?

 

Mat

  • Mat,

    You can use the following assembly function in your data abort ISR to see the error address. With the error address and other information (such as link register), you should be able to figure out what causes the abort.

    Read_DFSR:
        MRC p15, #0, r0, c5, c0, #0
        MOV     pc, r14         

    Read_IFSR:
        MRC p15, #0, r0, c5, c0, #1
        MOV     pc, r14         

    Read_DFAR:
        MRC p15, #0, r0, c6, c0, #0
        MOV     pc, r14         

    Read_IFAR:
        MRC p15, #0, r0, c6, c0, #2
        MOV     pc, r14

    Thanks and regards,

    Zhaohong