I had a lot of trouble getting started with this dev board so I thought I would summarize what I did to get the onboard led to blink.
Step 1: Download the IDE
I will be using the Kinetis Design Studio for this post which you can download here for free and install it.
You will also need the Kinetis SDK from here. Until recently there wasn’t support for this dev board in the original SDK, but it appears to have been updated to work with this board. When I installed mine I had to install a special KL03Z SDK.
Step 2: Create a Project
Go to File -> New -> Kinetis Design Studio Project
Name your project and click Next
Select the FRDM-KL03Z under Boards -> Kinetis
Click Next, then check the box for ProcessorExpert, Then hit Finish
Step 3: Configure the Project
I followed this guide up to the configuring pins part. This is to make the project compile without warnings or errors. There is also a link on this page on how to install the sdk if you have trouble with that part.
Step 4: Add McuOnEclipse to the IDE
We are using Processor Expert to make the code generation easier, but there is no function to delay or wait that I could find. So I googled around a bit and found McuOnEclipse which adds a wait function which we will use to blink the led.
Step 5: Add the Wait Component to Your Project
In the top bar select Processor Expert again and then click Show Views
Click on the tab for Components Library
Scroll down to Wait -> right click -> Add to Project
For more info on how to generate the Processor Expert code for the Wait command see this post.
Step 6: Write the Code
Very simple code to toggle the led on and off.
Under your Project expand the Sources folder and open the main.c file
Then just write this code where the comments say to write your code
Step 7: Install the SDA Debugger Firmware if you haven’t already
Go here and follow the install instructions. I used this version:
- OpenSDA (E.g. FRDM-KL25Z boards): Download JLink_OpenSDA_2015-04-23.zip
Step 8: Configure the debugger
The steps can be found on page 24 of the attached pdf. I am having trouble finding the original download for this pdf so I just attached it.
When uploading code just plug the board in with usb without holding down the reset button.
There is probably a better way to do this but it took me a long time to get to this point and wanted to make sure if I forget how to do it I have all the links in one place to follow.