mbed-FRDM-KL25Z-Downloading

The following instructions demonstrate how to download the first program to your Microcontroller, and start it running.

Instructions

1. Save a program binary (.bin) to the FRDM-KL25Z

Download the "Hello World!" binary:

The source code for this program can be seen in the next section, Creating a program

Save the program binary file to your mbed Microcontroller Disk, just like you would with a normal USB disk. The Status LED will flash as the PC writes the file to the Microcontroller disk.

You must wait for the Status LED to stop flashing before pressing reset!

/media/uploads/chris/kl25z-layout.png

2. Press the Reset Button

When the Reset Button in pressed, the newest program on the mbed Microcontroller Disk will be loaded in to the Microcontroller FLASH memory. The Status LED will flash as this happens.

When the program is has been loaded onto the microcontroller, it will then start it running.

3. Hello World!

The Microcontroller is now running the program; flashing the blue LED forever! If you reset the Microcontroller, or disconnect and reconnect the power, the program will simply restart.

Where Next












Troubleshooting

Make sure you save the file to the mbed Microcontroller!

  • You can use your computer's file explorer to to check what is on the Microcontroller, as you would for a normal USB Disk
  • If the Status LED did not flash when saving to the Microcontroller, or after resetting the first time, you probably saved it elsewhere!
  • Some browsers default to saving files to your "Desktop", so this should be changed; see Choose-where-to-save-files-FAQ
  • Some Linux or old Mac PCs don't write data until you "Eject" the drive; see Mounting-with-sync

Don't try and "Open" or "Run" the program files. Always "Save" them to the Microcontroller.

  • Some applications (e.g. VLC Media Player) recognise the .bin extension; ignore them!

Make sure you set it running!

  • Remember to reset the Microcontroller to start it running after you download a new program
  • If the binary downloads to the micro, but nothing happens, make sure you chose the correct board binary

When you unplug the Microcontroller, you may get a "Device Removal" error message; don't worry!

  • You can ignore this, but you can also use "Eject" (Mac) or "Safely Remove Hardware" (Windows) to avoid this if you want

If you have any problems, or think this tutorial could be improved, please tell us in the Forum!


Please log in to post comments.