Page 1 of 1

Mod5234 upgrade to 2.6

Posted: Sun Aug 12, 2012 7:59 pm
by gary.richardson
I tried to bring a MOD5234 program to the latest version of the tools 2.6.0.025. Wasn't too bad, a few items to fix. The part I am stuck on is the program will work when compiled in debug mode, but if I load the release version I get:

Trap occured
Vector=Format Error FMT =00 SR =2700 FS =00
Faulted PC = 02013746
D0:000000D3 000000D4 000000D5 000000D6 000000D7 000000A0 000000A1 020046EC
A0:000000A3 000000A4 000000A5 020F01A4 41902000 020023FA 000000A2 020F019C

When I follow the "Using m68k-elf-addr2line to figure out line numbers from hex address" post from Forrest, I get a function name of OSCtxSw.
/********************************************************************/
/** Procedure : OSCtxSw **/
/** **/
/** The procedure is installed as an interrupt handler and called **/
/** using a TRAP instruction within the uC/OS scheduler to swap **/
/** contexts at the task level. **/
/******************************************************************* */

Since I can't get any information in debug mode since it works, does anyone have a suggestion for why release mode would fail. Seems like stacks and memory usage would be less so ...

Re: Mod5234 upgrade to 2.6

Posted: Mon Aug 13, 2012 2:08 pm
by pbreed
IT's possible that the change we made to allow C++ RTOS objects is chanign the way things start or get initialized

So please try the following...


In nburn\system\software_init.s

Take the line...
jsr UCosSetup;

comment it out

/* jsr UCosSetup; */

This will get called again later and I suspect that the flag it uses to make sure it only runs once may be corrupted...