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.

TMS570LC4357: _memInit_() clobbers registers - Needs to be forced inlined

Part Number: TMS570LC4357

Found (at least) one of the reasons for observing bizzare behaviour: _memInit_() is overwriting a value that had be stored in R5.

I can see what's going on. The C compiler expects the function to store the registers it clobbers on entry and restore on exit, of course it would! However, partilar function wipes all RAM, so therefore pointless to store on the stack, therefore doesn't. This does mean that is MUST be run in-line, such that the compiler can see the registers it clobbers and avoids using them. 

But how do you force a function to be inlined? I'm looking at the ARM Assembly Language Tools document (spnu118x.pdf) but it doesn't say how to force an inline.

So how do I get around this?