I am trying to use mon51 with a custom board based on Atmel-WM T89C51CC01 (32k Neumann RAM at 0x8000). uV2 finds the connection with the monitor and downloads my code without any error messages. After "$= 0x8000" I see my code (0x8000 LJMP STARTUP1(C:8448)). But "g, main" simply does not work, the program stucks at 0x8000. After a single step it performs the jump, but after the next one(0x8448 MOV R0, #0x7f) I find myself at 0x8000 again. What I already tried: (1) In T89C51CC01 one should clear ENBOOT in AUXR1 to disable FM1 from 0xf800-0xffff. So I installed mon51 to 0xe000 (install.bat 2 e0 0). (2) I followed the steps in APP. 152 (3) I performed the RAM test recommended by Keil (MON51: TESTING VON NEUMANN MEMORY AREAS). It works fine from 0x8000 to 0xf800. Does anyone has a board with the same controller and memory configuration? It would be good to see and try out a program that already worked on a real HW. Thanks for any help, Gergely
I've had this problem before. It is almost always an indication that the monitor data area is not von Neumann memory. You can easily test this. Take a look at the following KB article. http://www.keil.com/support/docs/2104.htm Sometimes getting the monitor configured is a pain in the @$$, but it has been my experience that it is a problem with the memory areas not being von Neumann. Jon
I have done it already, it was (3). From 0x8000 till 0xf800 everithing is all right (above comes FM2). That is why I installed mon51 at 0xe000. Thanks anyway. Don't you happen to have a working "Hello World" uV/uV2 project for mon51 target :)? Gergely
Don't you happen to have a working "Hello World" uV/uV2 project for mon51 target :)? I thought we did butg I didn't find it. Anyway, it's pretty simple. Just remove the code that initializes the serial port. But try something even simpler. For example:
void main (void) { while (1) { P1 ^= 0xFF; } }
Not really the program itself is important, but its configuration in uV/uV2. But unfortunately the problem is bigger than that, because without any code only with the default (garbage) memory content the result is the same. So I set PC to 0x9000 (0x9000 00 NOP), "Step Into", and I am at 0x8000 again :((((. I suspect that you are right Jon with the monitor data area. But what can I do if the Keil memtest works, and I also wrote some code to detect any faulty memory locations (stuck bits or mirroring)?