In this demo, I am using OpenSDA / OpenSDA V2 firmware provided from Segger, this firmware supports all ARM based Freescale boards which comes with on-board OpenSDA and Implements SWD debug protocol and virtual COM port functionality.
By default the board comes loaded with MSD application driver by which you can reprogram the board with available different binaries.
The FRDM-K64F platform features OpenSDAv2, the Freescale open-source hardware embedded serial and debug adapter running an open-source bootloader. OpenSDAv2 comes preloaded with the CMSIS-DAP bootloader – an open-source mass storage device (MSD) bootloader and the CMSIS-DAP Interface firmware (aka mbed interface), which provides a MSD flash programming interface, a virtual serial port interface, and a CMSIS-DAP debug protocol interface.
Now since we need to develop a new project and debug / run it on boards, the board should be loaded with different application driver i.e Debug application driver OpenSDA V2 which is supported by Segger, P&E Micro.
OpenSDAv2 is a serial and debug adapter circuit which includes an open-source hardware design, an open-source bootloader, and debug interface software. It bridges serial and debug communications between a USB host and an embedded target processor
There are two alternative firmware files available for the FRDM-K64F (which runs OpenSDAv2)
- P&E OpenSDAv2 which emulates a P&E OpenSDA/Multilink
- Segger OpenSDAv2 which emulates a Segger J-Link
To install the firmware:
Go to http://www.segger.com/opensda.htmland come down to “Getting started with OpenSDA V2” section and download the firmware scroll to the end of the page with the OpenSDAv2 section and download the firmware.
(The firmware can be downloaded here: Firmware download)
- Unpack the content of the zip file (JLink_OpenSDA_V2.bin).
3. Connect the board to the PC via SDA USB while keeping the reset button of the board pressed.
4. The board enumerates as BOOTLOADER as shown below:
5. Copy the file “JLink_OpenSDA_V2.bin” which was extracted earlier and paste this into the BOOTLOADER drive (you can drag and drop too)
6. After the file is copied, the green OpenSDAv2 LED will blink faster. Unplug the board and power it again
7. After power-cycling the hardware, the OpenSDA platform will enumerate as J-Link on the PC.
KDS Debug configuration:
Now as our board is loaded with J-link driver we need to configure the same in KDS debug settings. This is done as shown below:
Steps to create new project
- Create a New project in KDS
2. Provide Project Name
3. Select Device “MK64FN1M0XXX12” from the filter as shown
Kinetis K > MK60 > MK64F(120MHz) > MK64FN1M0XXX12
4. Now select the option “Use Processor Expert for configuration” and click finish
Now we need to create New Segger Debug Configuration
Select Menu Run > Debug Configurations as shown below:
Now select ‘GDB Segger J-Link Debugging’
Double Click Or: use 'New' icon as shown
Ensure application file and project are selected by clicking Browse button as shown:
Under Debugger tab Specify device name “MK64FN1M0xxx12” and click on apply and close the Debug configuration window as shown below:
Now our project setting is configured for Segger debug driver.
Proceed further as per your project requirement.