Hi guys,
I have my code defined in the uVision interface as LARGE and the memory model as SMALL, however, if I try to run the program with the memory model LARGE the program does not run (if everything goes fine the program output some messages in the serial port and it also flip some output ports with some inputs in the right ports).
I wrote a program to test the external RAM (32 Kbytes: FM1808-70-S from RAMTRON) and I verified its operation by removing the RAM too. The program works OK: when the RAM is in the board, the program ckeck everything but if I remove the RAM the program fail to operate (showing the error message in the code).
I have the the following settings in the "Options for Target":
Memory Model: Small Code Rom Size: Large 64 K program Operating System: None
Off-Chip Code Memory: Start: 0 Size 65536
Off-chip Xdata memory: Start: 0 Size 65536
I read somewhere that I should also set the "BL51 Locate" tab options, but I have no idea how to do that, nor what to set in there.
Can anyone give me some hints on why the LARGE model does not work? I'd really appreciate detailed information that I can follow ....
I am attaching the RAM testing code, just for your information ....
void Testing_RAM (void) { volatile unsigned char xdata *RAM_Test_ptr; RAM_Test_ptr = (char xdata *) 0x0000; // Initial RAM for (t1 = 0; t1 < 0x7F; t1++) { for (t4 = 0; t4 < 0xFF; t4++) { t3 = *RAM_Test_ptr; // Saving previous for (t2 = 0; t2 < 0xFF; t2++) { *RAM_Test_ptr = t2; if (t2!=*RAM_Test_ptr) printf ("\nRAM error"); *RAM_Test_ptr = t3; RAM_Test_ptr++; } } printf ("\nRAM OK\n"); }