I have a brand new FRDM-KL82Z board to develop an embedded electronics project.
One of my co-workers is using another unit of the same board, and he did a demo project in his Windows 7 computer to check that everything is OK. It works perfectly in his computer with both his board and my one, so I tried to open the same project from my computer but I'm not able to flash the program into de MCU, neither by flashing directly nor by debugging.
I've read the information in this, this and this link, but I didn't manage to solve the problem. First I explain how the problems occurs and the messages that MCUXpresso is showing. Later I explain what I've tried.
- I installed the drivers successfully (that's what the installer says).
- If I plug the board, the yellow LED is permanently ON.
- Every time I try to debug or flash the program, the yellow LED turns OFF, the red one turns ON and this is what I get from the IDE:
- I tried to reflash the bootloader copying the "k20dx128_bootloader_0x5000.bin" and the "k20dx128_frdm_kl82z_if_0x5000.bin" files into the virtual bootloader drive that pops up in my computer (one at a time, not both files at the same time). The yellow LED then keeps blinking rapidly but I don't know what it means. According to this file (Section 3, page 8), 2 seconds off + 8 rapid ON/OFF blinks means an error, but I don't get the 2 seconds off, just constant rapid blinking. After a few minutes I unplugged the board and plugged it again to enter normal mode, but the result is exactly the same.
After reading the posts I linked previously about OpenSDA and Windows 10, I disabled removable devices from the library search and started the process all over again: reflash bootloader, plug in, try to debug - but I still get the same message. I then tried to do exactly the same in my co-worker's Windows 7 computer, but it doesn't work for him neither.
I don't have and external debugger, so I don't know what to do to make it work with Windows 10.
Is there any solution to recover my board and make it usable from my Windows 10 computer with the standard USB connection? If not, what should I do - buy an external debugger such as the Segger J-Link?
the relevant article is How to Recover the OpenSDA V2.x Bootloader | MCU on Eclipse . I had to update all OpenSDA V2.x bootloader with a newer one using the approach described in that article. In essence, you need a JTAG/SWD programmer (P&E Multilink, Segger J-Link or another FRDM/Tower board) and reflash the bootloaser on your FRDM-KL82Z. You *cannot* update the bootloader through the USB port (drag&drop to the MSD device), you need a 'real' debug probe.
Using another FRDM board with Windows 10 is problematic too, as it very likely will erase that bootloader/app as soon as you connect it to your Windows 10 host if it does not have a fixed bootloader. But you can use that approach using a Windows 7 machine. Or you really have to buy a Segger or P&E debug probe. Or a NXP LPC-Link2 (see LPC-Link2 | MCU on Eclipse) or any of the LPC V2/V3 boards (see Using the LPCXpresso V2/V3 Boards to Debug an external Board | MCU on Eclipse )
I hope this helps,
Hi Erich, thanks for your response. I'm a coworker of josepgm.
We have a P&E Multilink Universal programmer and we have tried to flash the bootloader .bin file by creating a Dummy Project and selecting that file to flash, but with no result (P&E doesn't detect .bin files). Should we try with a .SDA bootloader file?
You could transform the bin file into a S-Record/S19 file, see Converting S19 Files into Binary Files with GNU objcopy | MCU on Eclipse and then you can program it with the P&E.
And no, you cannot load the .sda file, because technically it is a bin file.
I hope this helps,
Hi Erich, I've transformed the bootloader "OpenSDA 2.2 Daplink BOOTLOADER for K20DX_rev0241.bin" from
OpenSDA Serial and Debug Adapter|NXP to a .srec file with objcopy command.
But I get a flash error. Also tried to transform and flash other bootloader (k20dx128_bootloader_0x5000.bin) but same result.
I've tried to tweak here and there the P&E debug configuration, but with no result, so here I show it cause maybe there's something wrong I'm unable to see.
I'm connecting the P&E to the SDA/JTAG connectors. That's how it has to be done, right?
Thanks again for your help.
You need to specify the correct MCU.
I have described now all the steps in the following article:
I hope this helps,
Finally flashed the OpenSDA Bootloader 2.2. Then, just copied the latest DAPLink firmware (http://www.nxp.com/assets/downloads/data/en/ide-debug-compile-build-tools/OpenSDAv2.2_DAPLink_frdmkl... ) to the bootloader window and now I can debug only using the USB cable.