That explanation makes sense. I was trying to get GCC working with the FRDM, whether it was with mbed or not, and that was the example program provided by the blog I was using as reference. I'm glad to know what the actual issue was though :)
However, this still seems like a bug to me - the PEMicro firmware has no problem being loaded after a bad application, but the mbed firmware does not load. So based on what you are saying, I would guess that the PEMicro firmware unlocks the flash on load but the mbed firmware does not. Even if you upload a bad application, you should be able to reflash with new firmware to restore the device to a good setting - which is possible with the PEMicro firmware but not the mbed firmware. There are actually several threads with people who are having trouble loading the mbed firmware, and this could be a fix for all of those people who are not going to be able to figure out that the chip flash is locked.
Thanks for taking a look!
James
There is a bug in the MBED firmware for the FRDM-KL25Z that can prevent the firmware being loaded depending on what application was installed on the FRDM prior to attempting to load the mbed firmware. This could possibly be the result of a use-before-initialize bug or some other bug in the mbed firmware. Tested on Windows XP SP3.
The referenced led_toggle_flash.bin program is a simple LED blink program compiled using GCC ARM, following this guide.
pwm_led.srec is part of the FRDM-KL25Z_QSP quickstart package provided by Freescale.
To reproduce:
To restore the mbed firmware after this:
Cheers,
James Eady