TMS570LC4357: Issue with calling systemInit() after jumping to application

Part Number: TMS570LC4357


Hello, me again!

So I've had application working for a while, but with the addition of the saftey-lib self tesing added to boot, the start-up is much more complex. I've found that when jumping to application I get a data abort within systemInit(), specfically in periphInit().

Is there an issue calling this function twice during execution? Once during boot start-up, then again in the application (of course a different one)?

I have solved this in a different way - In boot, instead of jumping with a:

((void (*)(void))entryPointAddress)(); 

I store the entry point address at a specific memory location then perform a software reset. 

Then in the _c_int00(), case SW_RESET: I check that address and jump straight to the app. It will then perform all the usual _c_int00() stuff.

This means that all the start-up stuff is only performed once. It seems much more reliable, but maybe less intuitive/logical.