The FRDM-K64F is one of the most powerful development boards available from NXP. It includes a K64F micro-controller and, with the proper configuration, allows to develop and test for a big variety of MCUs and peripherals. As such, it has been widely used ever since its announcement back in early 2014. Here you can find the first steps to follow to get your board running in no time!
When I first got my hand on this board in 2015, there were two IDE available: CodeWarrior and Kinetis Design Studio. The former needed a license and enabled development with most (at that time) Freescale board, the latter was free and based on Eclipse and only allowed development for the Kinetis family of MCU. Today, KDE has been discontinued and MCUXpresso, based on Eclipse, is now available for free.
You can of course develop in any platform of your preference, but we will be using MCUXpresso since it includes everything we need and it is really easy to get your hands on. So let’s get started!
IMPORTANT: For this tutorial we assume your FRDM-K64F board uses the PE Micro OpenSDA firmware for programming and debugging. If this is not the case, or you don’t know which version your board has installed, make sure you visit our post on how to update your board’s firmware.
How to Set-up the Development Environment
1.Install MCUXpresso IDE (“The IDE” from now on). During the process, you will be asked to choose the installation directory. Write it down, we will be referring to this directory as “<install_dir>” during the rest of this tutorial.
2. Plug the FRDM-K64F to any USB port. Use the device manager to check if the OpenSDA drivers were installed correctly. Otherwise, download and install from the OpenSDA site.
Note: When entering the OpenSDA site, they make reference to all their debugging tools; but do not worry, the development board includes both, the programming and debugging circuit.
3. Download the latest Kinetis SDK from the NXP site. You have to select the board model (FRDM-K64F) from the list and click on Build SDK. After that, the assistant will ask you to add additional components to your personalized SDK; we will ignore these options for the moment and just hit Download. Save the generated ZIP file to “<install_dir>/sdk/frdmk64f.zip”.
4. To install the SDK you will need to go back the IDE and drag and drop the downloaded ZIP file into the Installed SDK window.
If this window is not visible, you will need to go to Window->Show View->Other and search for the Installed SDK view using the search bar; then proceed to drop the zip into the screen that will appear.
How to Create and Run Your First Application for FRDM-K64F
5. Now we will need to import the sample project that comes with the SDK. To do this we can use the “Import SDK example(s)…” option available on the IDE. (See step 4 if you cannot find the view).
6. Once created the project, use Project->Build All (Ctrl+B) to build the project.
To run, click on Project->Debug As and choose “PE Micro Probe”. A window will ask you con confirm configuration if it is the first time running the project. Accept and once the programming step is over hit F8 to launch the program.
Don’t forget to check our Hello World on the FRDM-KL43Z board.