µTasker Forum
µTasker Forum => NXPTM M522XX, KINETIS and i.MX RT => Topic started by: alager on March 04, 2011, 01:27:39 AM
-
Mark,
I just tried updating the web files (using ftp) while running the simulator, and the simulator dies with an "access violation" on this line in M5223X.c.
fnRAM_code(); // execute from SRAM
I erased the flash_M5223x.ini file, to start from scratch, but it still fails.
Any ideas on what I should look at?
Thanks,
Aaron
EDIT: By the way I'm using the last VC2010 project files for 1.3 that you posted here: http://www.utasker.com/forum/index.php?topic=1111.0 (http://www.utasker.com/forum/index.php?topic=1111.0)
I also get the same error if I telnet to the simulator and do a "factory restore" int he admin menu, or "save" in the LAN configuration menu.
-
Hi Aaron
I would try increasing the size of PROG_SIZE as used by static unsigned long ulProgSpace[PROG_SIZE/sizeof(unsigned long)]; in the simulator case. Maybe the VS version that you are using requires a bit more space for the routine(?)
Regards
Mark
-
Mark,
That wasn't it. I upped it from 100 to 400, no change.
I did notice that I'm getting a warning that I didn't get before:
1> M5223X.c
1>c:\projects\utasker_sp8\trunk\hardware\m5223x\m5223x.c(2012): warning C4789: destination of memory copy is too small
1>c:\projects\utasker_sp8\trunk\hardware\m5223x\m5223x.c(2016): warning C4789: destination of memory copy is too small
case 1:
iInts |= CHANNEL_1_SERIAL_INT; // simulate interrupt
ucTxLast[1] = UTB_RB_1; // back up the data written so that it can't get lost when rx data uses the simulated register {27}
break;
case 2:
iInts |= CHANNEL_2_SERIAL_INT; // simulate interrupt
ucTxLast[2] = UTB_RB_2; // back up the data written so that it can't get lost when rx data uses the simulated register {27}
break;
not sure if that is a red herring or not.
Also, here are more details on the output of the error:
First-chance exception at 0x004eb380 in uTasker.exe: 0xC0000005: Access violation.
Unhandled exception at 0x004eb380 in uTasker.exe: 0xC0000005: Access violation.
The program '[5292] uTasker.exe: Native' has exited with code -1073741819 (0xc0000005).
Autos
*ptrWord 4294967295 unsigned long
fnRAM_code 0x004eb380 ulProgSpace void (void)*
- ptrWord 0x00514600 unsigned long *
4294967295 unsigned long
ucCommand 64 '@' unsigned char
ulWord 0 unsigned long
I'm lost on this one, if you have any more ideas, let me know.
Thanks,
Aaron
-
Hi Aaron
No further ideas about the reason for this problem but there is no real need to call the RAM based code when simulating.
Try the following, which simply calls the original routine and so shouldn't have any difficulties that running out on RAM seems to cause:
CFMCMD = ucCommand; // the command
#ifdef _WINDOWS
fnFlashRoutine(); // execute the source code when simulatiung
#else
fnRAM_code(); // execute from SRAM (on the target)
#endif
uEnable_Interrupt(); // safe to accept interrupts again
Regards
Mark
-
That worked! ;D
Thanks,
Aaron
-
For what it's worth, I got the same results (both the problem and the working solution) under similar conditions, Win7, VC2010.
An earlier test with WinXP and VC2010 didn't have this problem but had other problems with an apparently old version of FTP ;) that I worked around by sending the files one by one.
John