I've been attempting to do some programming of the internal flash on a MCF51JM128 MCU. After several frustrating attempts I tried using AN3942 and the accompanying software as a starting point.
I compiled the project and ran it on a DEMOJM board. It worked fine except for one thing. The flash was programmed from address 0x910 not 0x1000 as it was supposed to. I noticed that the linker command file specifies that the code starts at 0x410, so I tried an experiment and changed it so that the code would start at 0x500 instead. Now when the code is executed it programs the flash at address 0xA00 instead. It seems like there is some sort of offset being added (or subtracted) from the intended programming address and it is dependent on where the start of the code is situated.
Has anyone any ideas on this? Better yet has anyone got some simple proven & reliable flash erase and flash programming routines for the coldfire v1 devices?