Im running yagarto toolchain + eclipse + openocd on SAM7X256EK. Everything worked nice for a week or so. But after that breakpoints cease to function. And as always, I did not do anything:-)
But it just does not stop on breakpoints. Only if I insert breakpoint to main.c. Any other breakpoint is no good. And right after startup (beginning of the main.c where init and stuff is) it does no accept bkpts either… Im confused.
your code gets loaded to address 0x0 - there’s only RAM at that location if the REMAP command is active. Because REMAP acts as a toggle command, you could be writing to flash or ROM (depends on GPNVM Bit 2) after issuing the write to 0xffffff00, if there’s some code in your flash that already does the remapping.
Do you have code in your flash? Could you try erasing the flash, and see if setting breakpoints works then? Alternatively, you could try without the write to 0xffffff00 and see if it works. I couldn’t find a way of determining which memory is currently mapped at 0x0, but then I didn’t work with the SAM7X a lot yet.
Flash is emty. I used samba to blank it and to program GPNVM bits to force booting from flash (flash is filled with 0xffffffff as sould). So loading to ram seems to be ok. I agree that remap bit. I disabled it, but the result is pretty similar, Im afraid. And if I use hw breakpoints, everything seems to be better, except Im limited to 2 bkpts.
Yes, I had different problems all together. Still few of them remaining.
The worst problem was that jtag speed parameter was too high. I tested everything (loading, connecting, breakpoints) with telnet. I had to use 40 as jtag_speed (homemade USB interface) while using fast_memory_access. After reaching 40, openocd stopped complaining about this and that while loading/reading.
As telnet interface proved: sw_bkpts are functional. As setting bp in telnet requires specifying if the bp is in arm or thumb mode made me a bit sucpicious bout eclipse debugger. And yes, it seems to be that eclipse debugger stops only on kind of ARM aligned breakpoints (every second line in assembly output). After I comilied everything in ARM (and reducing jtag speed) my board seems to work (bkpts, remap toggling and everything). Does somebody else have experience about thumb breakpoints with eclipse? Hw bkpts seem to work for both, arm and thumb (but limited to 2 bkps only, which is a bit annoying).