Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 1 month ago.
[SOLVED] Freescale FRDM-KL25Z soft-bricked?
I might have run into a fairly serious problem here... Excuse the large ammount of text but I want to thoroughly explain the whole situation and what has led to it. After successfully flashing an Mbed firmware onto a Freescale FRDM-KL25Z board and running a few test programs I decided to try out a proper IDE, the online compiler was just a pain in the neck. So I found CooCox CoIDE, it looked quite interesting so I gave it a try. After fiddling around I attempted to compile one of my programs exported directly from the online compiler, while I had to tweak the settings a little bit, because it wouldn't compile, I managed to get it done. After that I copied the resulting .bin file onto my board (I just dragged it, just as I'd done when using the online compiler), and yup, everything's fine. The program's been running correctly.
Now... In attempt to improve my workflow I wanted to see how the built-in CMSIS-DAP flashing functionality of that IDE could help me. At first I couldn't get it running, because whenever I tried to flash something it complained about the CMSIS-DAP adapter not being connected. After looking around on the web for a little bit I found this thread here http://www.coocox.org/forum/viewtopic.php?f=2&t=5060 Somebody there has provided a .dll for that, which just needed to be placed in a certain folder. After trying it out it did work, I was able to flash a program with a click of a button using CMSIS-DAP. The program was running as well.
Now, this is where the trouble begin to appear. After doing that a couple more times (flashing that is, and possibly also erasing flash, not sure) it started to give me a USB connection error. At first I thought it was nothing serious, because I had an instance of Putty running, having a serial debug connection with the board, so I thought it was simply conflicting. Unfortunately it was not the case, after closing Putty and re-opening CooCox CoIDE it gave me that error again. Though I could still see the status LED blink a little bit whenever I pressed the flash button, so it definitely had some sort of connection going on. I think I might have noticed the fact that I was no longer getting any serial output in Putty anymore but I might as well have after what follows. I decided to flash the binary by dragging and dropping it manually. It did swallow the file, the board restarted but didn't do anything. I was still not getting anything in Putty, just as if the program wasn't running at all. In order to verify that I modifed the code to turn on the LED (not the status LED, but the one which you can mess around with). Again, after compiling the program I dragged the binary, the device restarted but. The the LED did not turn on. No, I didn't forget to press the button in order to boot it up. It was simply not working. So I decided to verify whether it was just a problem with the bin spewed out by CooCox CoIDE (or rather GCC). I tried the online compiler again, same thing. At that point I wasn't sure what to do, so I randomly just put the USB cable into the other port and noticed that it wasn't turning on, though the connected I2C perfipheral was, I could see its LED on. Literally, the board's status LED didn't turn on. I put the cable back in the SDA port - same. The status LED was off. I wasn't seeing the MBED storage device in explorer either. I tried booting into firmware flashing mode. Weird stuff. The status LED blinked as it's supposed to be for the first few seconds but then it started to blink in a 8-flashes pattern. It would simply blink 8 times quickly (so quickly it was kind of difficult for me to count it) and then stop for a second or two. Then it would repeat. I tried reflashing the Mbed firmware, it swallowed the file but after restarting the device nothing has changed. I checked the log in the bootloader mode and it had only one line saying "Programming...".
So, that's the whole story, I'm genuinely out of ideas what to do here... Is my board bricked? Is there anything I could do? It would also be worth mentioning that I'm not really experienced with embedded devices, in fact this is the first one I've ever got my hands on. Any sort of help would be highly appreciated, thank you.
EDIT: Okay, I flashed DEBUG-App-Pemicro-108 and the appropriate MSD DEBUG. My board is ressurected!
8 years, 1 month ago.
Seems like you solved your issue :-)
Got questions, CoIDE did not work out of the box via exporting. CAn you specify what did you need to tweak? You can fix it in the mbed templates for CoIDE , look at https://github.com/mbedmicro/mbed. In workspace_tools/exporters are exporters and templates.
I haven't used the latest CoIDE, so that might be it that they changed something. I had no problems flashing with CMSIS-DAP neither. I will download the latest version to see what happens :)
As I said, I only downloaded CMSIS-DAP.dll someone provided on the forum which I gave the link to.posted by 16 Apr 2015