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.

__TI_auto_init fails in RM44 when "restrict" Keyword is use

Other Parts Discussed in Thread: HALCOGEN

I am in the middle of porting code from a TMS570 device to an RM44 device.

I get data abort (dabort.asm) from the in the run_cinit(); function, which is called by __TI_auto_init.

I found that the use of the keyword restrict in a function in my code was the trigger for this behavior. 

I am using CCS 6.0.1.00040; Halcogen 04.05.00 (same results with 04.05.00); and  Compiler version 5.2.2

The same code runs without a problem on the TMS570, and is all C code - no C++.

Finally, if I remove restrict, the problem goes away, even through the function with the offending keyword has not been called at this point in the process.

I would like to know the cause for this behavior, as judicious use of restrict could improve performance in some time critical passages.

Thanks in advance to anyone with insights.

  • Hi Richard,

    That's interesting. Can't imagine why this keyword would result in a data abort.

    I'd say for now, ignore 'restrict' and just focus on the data abort. What instruction causes it? What memory location was accessed by that instruction, and why was it accessed? The typical procedure for understanding a data abort.
    Do you know how to determine the answer to these questions?

    -Anthony
  • After digging further, the root cause was a memory map issue that was hit when restrict was used, but unrelated to restrict.