I am trying to get started with a FRDM-KL25Z. I have downloaded the quick start guide, and am racing document FRDM-KL25Z Quick Start Guide (Rev 1.0).pdf. Looking at Page 2 of 2 — Introduction to OpenSDA. I am connecting it to a MacBook Pro.
In order to see the device on the Mac, I have to hold down the board's start button while inserting the connection. Otherwise, the device does not show up on the Mac. Even with that, it does not show up in Finder, but only on the desktop. It is called “BOOTLOADER”
When I drag one of the .srec files to the boot loader directory, nothing happens. I tried the blinky_blue.srec file and blinkey_red.srec files and others, but nothing happens.
Since the boot loader shows up as only its own icon on the Mac desktop, I am unable to properly eject it before disconnecting, and I always get an error message when disconnecting.
What am I doing wrong, and how can I get this going so I can load a program and run it?
If you hold down the button when inserting the cable you are activating the debugger's boot loader (the K20 on the board) and not the boot loader to the KL25.
You probably need to reprogram the boot loader to the board - you can get the latest version from P&E - see P&E Microcomputer Systems (Latest MSD & Debug applications - there is one for the FRDM-KL25Z).
The board should show up as a disk when connected ("KL25Z" and not "BOOTLOADER") and supports debugging.
I don't know whether there is a driver for debugging on a MAC (there are ones on the site for Windows and Linux). For MAC debugging you may need to use Rowley Crossworks, which has a MAC version - unless there is an Eclipse based one that will run on a MAC. This will however need the CMIS-DAP OpenSDA version which can be easily found on the Internet (rather than the P&E one)
If you can see the device on the desk top you can load code to it with drag-and-drop but you need to load a BIN file and not an SREC (as far as I know). Loading an SREC may, in the worst case, lock the chip so that it is no longer usable (if the pattern in the 0x400..0x410 area happens to unfortunately match the lock pattern).
P.S. You can get further binaries to try with at http://www.utasker.com/SW_Demos.html#KL20
See also Having fun with the FRDM-K25Z which shows how your board can be simulated.
Thank you for your helpful response. I will start looking into the products you described. I was wondering about the difference between a .srec file and a .bin file as the mpeg.org site produces .bin files. All the examples that came with the download are .srec files. If I change the ".srec" extension to ".bin" does that make it a .bin file or does it have to be recompiled?
You can convert an SREC file to a BIn using GCC's "objcopy" https://sourceware.org/binutils/docs/binutils/objcopy.html
objcopy --input-target=srec --output-target=binary prog.srec prog.bin
Don't change the extension alone since that won't cause the content to become correct (similarly, changing a .txt extension to .jpeg will also not change a text file into an image).
Thank you for your help today.
In the past hours, I have tried again and again to get a connection to this FRDM-KL25z board. I've connected the USB to the left-hand plug (viewing from the top), and to the right-hand plug. Nothing. The only thing that gets the attention of the board is to hold down the reset button and plug into the right-hand connector. That brings up BOOTLOADER, which according to the above, is not what I want.
Clearly the demo program is running as the led changes color with the position of the board, and changes brightness with the slider.
In the literature, I don't see any reference to a driver needed for a Mac connection, and it does make that connection to the boot loader without a driver. I am wondering if the board is any good.
So, I'm at a standstill.
You need to connect to the USB socket with the K20 near to it (mounted diagonally on the board). This is the debugger interface and your PC sees it as a hard drive "BOOTLOADER" when you hold the reset switch down when powering the board - and the small green/yellow LED next to the K20 flashes at about 1Hz. This BOOTLOADER allows programming different debugger SW to the small K20 (OpenSDA). This USB mode doesn't require a driver since it uses USB-MSD.
I don't know what the pre-installed demo program does (running on the larger KL25 chip). It may have USB device operation but may also not - if not you will never see anything connecting to the other USB socket. I would assume that the demo code doesn't support USB device and then this would be normal.
If you go into the BOOTLOADER drive it has 4 files:
In LASTSTAT.TXT there is some text showing the status - "Ready"
After loading new debugger code to here it may show error messages, etc. Unfortunately there is no information about whether there is a debugger SW already loaded or which one. However, the green/yellow LED will normally be on when you connect to the USB socket without holding down the reset button and it should again appear as a hard drive - this time with the name FRDM-KL25Z and with 6 files on it.
If the BOOTLOADER appears (reset held on insertion) but FRDM-KL25Z doesn't (when inserted without reset held) it probably means that there is no debugger loaded or you overwrote it with one of the SREC files you tried. The debugger will also use USB-MSD and so also needs no driver to appear as a hard drive.
Did you try updating the boot loader via the "BOOTLOADER" hard drive?
I have attached the P&E that I use. If you drag and drop it on the "BOOTLOADER" hard disk and power up again (without holding the reset switch down) you should see the board appear as "FRDM-KL25Z". Once this is the case you can then use this to load binary files to the actual KL25 on the board.
if the board shows up as BOOTLOADER, then no firmware is loaded, so you cannot debug it or load s19 files.
I don't have a Mac, but I believe you might face the same issue as Windows 8.x users (see Illustrated Step-by-Step Instructions: Updating the Freescale Freedom Board Firmware | MCU on Eclips...). Can you try to get access to a windows machine and follow these steps?
My understanding is that your Mac tries to write files to the board, which confuses the board. You need first to get to a v1.11 bootloader in my opinion before you can use it.
You may need to log on to see the attachement (although you should be logged on if you can post). I see it with Safari (on Windows). Maybe you need to use Firefox if it is a Safari/MAC issue. You can also get the file from the P&E link that I gave.