Getting Started with Axiom ARM Boards
You can download support software for your Axiom ARM board here:
- Download and install the latest Kinetis Design Studio IDE
- Download the latest Axiom ARM Support Software
After installing, open the Kinetis Design Studio under Windows
Connect Your Board to your PC
- Using the supplied Micro-USB cable, connect one end to the USB port on your development board marked either SDA or OpenSDA. The other end of the USB cable should be plugged into your PC.
- If this is the first time connecting to the board, your PC should start installing its drivers, wait for this to finish. This will add a new COM port under windows, which you will use in the following step. Note the number that it adds, for example COM23.
- Launch your Serial Terminal program (for example TeraTerm). Under Setup change the Serial Port to match the port that was added when you plugged in the board. Also set the baud rate to 115200. The rest of the settings should already be set to Data: 8-bit, Parity: none, Stop: 1-bit, Flow Control: none.
- Unplug the USB cable from the board and plug it back in. You should see a text menu on the terminal, if you don't press the RESET button on the board. If you still don't see anything or if the text is garbage, try changing the Serial Port settings in your terminal program.
Creating Your First Application
Follow these steps to get started developing your first application:
- Launch the Kinetis Design Studio IDE from on your PC
- You'll be prompted to choose a location for your projects. Choose any location on your PC, this is where your software projects will be saved. You can change this every time you start KDS.
- When IDE opens, select the File menu and choose New then Kinetis Project
- For the name of your first project, enter: Hello
- Leave the default location and press the Next button. You'll be prompted to select a board or processor. Choose the Processor based on the Axiom development board you using the table (see below)
- Press Next. For Kinetis SDK choose: None.
- Check the Processor Expert box.
For Project Mode choose Standalone and Press Finish.
Axiom Board Processor AXM-0702-CMM-K60D Kinetis K -> MK60 -> MK60D ->MK60DN512xxx10
You should now have a "hello" project started in the IDE. As it is now, the software won't do anything so lets add code to tell your board to say "hello".
- Cllick your Hello project on the left to expand it then click the Sources folder.
You should see 3 files: Events.c, Events.h and main.c. Lets add more.
- You can drag files from any windows folder into the Sources folder then select "Copy files" to add them to your project.
- Another way is to use Import. Right click the Sources folder and choose Import. Choose General then File System then click Next.
- Select Browse to the right of the From Directory box and find the directory where you installed the "Axiom ARM Support Software" and select the sub-directory: Source\Lib. Click OK.
- You should see a list of files on the right with check boxes next to them. Check the box next to the following files: Common.h, Print.cpp, Print.h.
- Also check the box next to your boards support files from the table below.
|Axiom Board||Support files|
- Now click Finish and you should see these files listed under your project Sources folder.
- Double click common.h to open it for editing.
Add a Define Line to the top of the common.h file using the table below based on your Axiom Board. For example:
|Axiom Board||Define Line|
- Now double click main.c to open it for editing. The main file is automatically generated and contains areas that should not be changed as well as areas where you can add your own code.
Find the following comment about halfway down:
/* User includes (#include below this line is not maintained by Processor Expert) */
Add the following code under it:
Now find the following comment further down a bit in main.c
/* Write your code here */
Add the following code under it:
- From the Project menu, select Build All
- If there are any errors, you will see them under Problems at the bottom. If this is the case, double click on the problem and fix it before continuing. It's usually a typo.
- Once your project successfully builds without problems, you can download and execute it on your board which we'll do next.
Loading and Debugging your Application
- The first time you debug an application, you tell the IDE what method to use. From the Run menu select Debug Configurations.
- Click GDB OpenOCD Debugging and then under this click Hello_Debug_OpenOCD.
- On the right will show a window containing the debug settings, leave everything default and just click the Debug button on the lower right.
- A Launching window will pop up and you should see several text messages scrolling by as you application is loaded onto the development board and executed.
The debugger will halt program execution at following line in your main.c file:
- From the Run menu select Resume. This will contine executing your application, which in this case is sending the string "Hello " over and over again out the boards virtual serial port.
- To stop execution, select the Run menu again and choose Terminate.
- To start again, select the Run menu and choose Debug History and select Hello_Debug_OpenOCD.
- You can also use the toolbar shortcut buttons for all of the above commands.