I'm trying to use a custom board based on the FRDM KL25Z with Mbed, using the 32 pin QFN variant of the same MCU with an 8Mhz oscillator.
I am using the FRDM KL25Z emulating a Segger J-Link to program the external MCU but have had great difficulty in getting the chip to even toggle a pin when using Mbed. When reading back the memory contents it matches the binary file so programming is successful.
To make sure it is not a hardware issue I programming the external chip using the NXP MCUXpresso IDE and KL25Z SDK, with this configuration it worked first time and the pin successfully toggled.
I have spent hours searching online and comparing the mbed and NXP SDK source code and have been unable to find a solution. Why does the NXP SDK work but not mbed? As most of the code for the project has already been written on Mbed using the KL25Z development board it would difficult to switch over.