Sometimes, when I load uV2 and start the debugger and press F5 (run) I get this error message: MONITOR ERROR 6: CANNOT WRITE BREAKPOINT When this happens, the program is not running, but if I press F5 again, all is well. I don't disable the global interrupt enable (IEN) anywhere in my app. I can set breakpoints anywhere in my app (after main() is called from the startup ASM code) and the debugger seems to work just fine. Every time I exit and re-enter the debugger (usually with a re-build in between) and restart debugging, I no longer get the error message. Anyone know why I might be getting the error message just once, not always, but when I get it, it's always right after I start debugging right after starting uV2? I've tried to find ways to make it repeatable, like pressing RESET, cycling power, exiting and re-entering uV2, in various combinations and sequences, but I can't seem to make it repeatable. It does seem to happen every time I start debugging with uV2 for the first time each day. I don't think there's anything unusual about my pcb hardware. It's pretty standard... flash ROM at CS0-, shadow RAM (for the debugger) at CS1-, and program RAM at CS2-. There's no glue logic on the bus, although I do have a DUART (Philips SC26C92) on CS3-. Don't know if this matters or not, but I'm using the debugger in BSL mode, and based my project on the Phytec KC167CR sample monitor and BLINKY projects. Curious... Dave.
Hi Dave, today I had this problem too. After hours of spending time I found one solution for me that worked: Deleting the projects .opt file let the error disappear. The situation was: I had a project on a c164 target board with RAM from 0x00000-0x20000. Downloading Firmware to RAM and debugging with MON166 was always possible. From now to then the "MONITOR ERROR 6: CANNOT WRITE BREAKPOINT" appeard. My CVS showed no relevant changes. But the older project spapshots did work. So the solution was deleting the option file. best regards