The FRDM-KE17Z comes loaded with a “tsi_v5_selfmode” demo that leverages the on-board touch pads. Touch the
touch pad E1 or E2, the RGB LED (D3) will turn on. Release the touch pad E1 or E2, and the RGB LED (D3) will
turn off.
Get Software
Installing software for the FRDM-KE17Z
2.1 Jump Start Your Design with the MCUXpresso SDK!
The MCUXpresso Software Development Kit (SDK) is complimentary
and includes full source code under a permissive open-source license for all hardware abstraction and
peripheral driver software.
No problem! The MCUXpresso SDK includes support for other tools such as IAR, Keil and command-line GCC.
2.3 PC Configuration
Many of the example applications output data over the MCU UART so you'll want to make sure that the driver
for the board's virtual COM port is installed.
Before you run the driver installer, you MUST have the board
plugged in to your PC.
With the serial port driver installed, run your favorite terminal application to view the serial output
from the MCU's UART. Configure the terminal to 115200 baud rate, 8 data bits, no parity and 1 stop bit.
To determine the port number of the FRDM-KE17Z's virtual COM port, open the device manager and look
under the "Ports" group.
Not sure how to use a terminal application? Try one of these tutorials:
Build, Run SDK Demos
Build and Run SDK Demos on the FRDM-KE17Z
3.1 Explore the SDK Example Code
The MCUXpresso SDK comes with a long list of demo applications and driver examples. To see what's
available, browse to the SDK boards folder of your SDK installation and select your board, the FRDM-KE17Z (
<SDK_Install_Directory>/boards/frdmke17z).
To learn more about specific example code, open the readme.txt file in an example’s directory.
3.2 Build, Run and Debug SDK Examples
If one or more of the demo applications or driver examples sounds interesting, you're probably wanting to
know how you can build and debug yourself. The
Getting Started with MCUXpresso
SDK guide provides easy, step-by-step instructions
on how to configure, build, and debug demos for all toolchains supported by the SDK.
Use the guide below to learn how to open, build and debug an example application using the MCUXpresso IDE.
Using a different toolchain?
Create a New Project Using MCUXpresso Config Tools
4.1 Get MCUXpresso Config Tools
Let's create our own project and make a simple SDK-based application. NXP provides
MCUXpresso Config
Tools,
which is an intuitive, simple project generation utility that allows creation of custom projects based on
the MCUXpresso SDK.
Open the utility by clicking on the MCUXpresso Config Tools executable for your computer's operating
system. Select "Create a new configuration and project based on an SDK example or hello world project" and
click "Next" to create a new project. Then select your FRDM-KE17Z SDK installation path, select the
toolchain you needed, select the SDK example to clone, select the base project directory (workspace) for
your
new project and name your new project. Click on the "Finish".
4.3 Open Your Project and Start Your Design
Your new project will be located in base project directory(workspace). Use the toolchain of your choice to
open the project and start your code design.
Tera Term Tutorial
Tera Term is a very popular open source terminal emulation application. This program can be used to
display
information sent from your NXP development platform's virtual serial port.
Download Tera Term from SourceForge. After the download, run the installer and then
return to this webpage to continue.
Launch Tera Term. The first time it launches, it will show you the following dialog.
Select the serial option. Assuming your board is plugged in, there should be a
COM port automatically populated in the list.
Configure the serial port settings (using the COM port number identified earlier) to
115200 baud rate, 8 data bits, no parity and 1 stop bit. To do this, go to
Setup -> Serial Port and change the settings.
Verify that the connection is open. If connected, Tera Term will show something like
below in it's title bar.
You're ready to go
PuTTY Tutorial
PuTTY is a popular terminal emulation application. This program can be used to display information sent
from your NXP development platform's virtual serial port.
Download PuTTY using the button below. After the download, run the installer and then
return to this webpage to continue.
Launch PuTTY by either double clicking on the *.exe file you downloaded or from the
Start menu, depending on the type of download you selected.
Configure In the window that launches, select the Serial radio button and enter the COM
port number that you determined earlier. Also enter the baud rate, in this
case 115200.
Click Open to open the serial connection. Assuming the board is connected and you
entered the correct COM port, the terminal window will open. If the configuration
is not correct, PuTTY will alert you.
You're ready to go
Run a Demo Application Using IAR
This section describes the steps required to build, run, and debug example applications provided in
the MCUXpresso SDK.
1. Build an Example Application
Perform the following steps to build the hello_world example application.
Open the desired demo application workspace. Most example application workspace files can be
located using the following path:
Other example applications may have additional folders in their path.
Select the Desired Build Target from the Drop-down Menu.
For this example, select hello_world – debug.
Figure 1. Demo Build Target Selection
To build the demo application, click Make, highlighted in red in Figure 2.
Figure 2. Build the Demo Application
The build completes without errors.
2. Run an Example Application
To download and run the application, perform these steps:
FRDM-KE17Z with DAPLink interfaces, visit Windows serial configuration
and follow the instructions
to install the Windows® operating system serial driver. If running on Linux®
OS, this step is not
required.
Open the terminal application on the PC, such as PuTTY or TeraTerm, and connect to the debug COM
port. Configure the terminal with these settings:
115200 baud rate, depending on your board (reference BOARD_DEBUG_UART_BAUDRATE
variable in the
board.h file)
No parity
8 data bits
1 stop bit
Figure 3. Terminal (PuTTY) configuration
In IAR, click the Download and Debug button to download the application to the target.
Figure 4. Download and Debug button
The application is then downloaded to the target and automatically runs to the
main() function.
Figure 5. Stop at main() when Running Debugging
Run the code by clicking the "Go" button.
Figure 6. Go Button
The hello_world application is now running and a banner is displayed on the terminal.
If it does not
appear, check your terminal settings and connections.
Figure 7. Text Display of the hello_world Demo
Run a Demo Using Keil® MDK/μVision
This section describes the steps required to build, run, and debug example applications provided in
the MCUXpresso SDK.
The hello_world demo application targeted for the FRDM-KE17Z Freedom hardware platform
is used as
an example, although these steps can be applied to any demo or example application in the MCUXpresso
SDK.
1. Install CMSIS device pack
After the MDK tools are installed, Cortex® Microcontroller Software Interface Standard
(CMSIS)
device packs must be installed to fully support the device from a debug perspective. These packs
include things such as memory map information, register definitions and flash programming
algorithms. Follow these steps to install the appropriate CMSIS pack.
Open the MDK IDE, which is called µVision. In the IDE, select the "Pack Installer" icon.
Figure 1. Launch the Pack Installer
After the installation finishes, close the Pack Installer window and return to the μVision IDE.
2. Build the Example Application
Open the desired example application workspace in:
To build the demo project, select Rebuild, as shown in Figure 2, highlighted in red.
Figure 2. Build the Demo
The build completes without errors.
3. Run an Example Application
To download and run the application, perform these steps:
FRDM-KE17Z with the DAPLink interface, visit Windows serial
configuration and follow the
instructions to install the Windows operating system serial driver. If running on Linux OS, this
step is not required.
Connect the development platform to your PC via USB cable using OpenSDA USB connector.
Open the terminal application on the PC, such as PuTTY or TeraTerm and connect to the debug
serial port number . Configure the terminal with these settings:
115200 baud rate, depending on your board (reference BOARD_DEBUG_UART_BAUDRATE
variable
in the
board.h file)
No parity
8 data bits
1 stop bit
Figure 3. Terminal (PuTTY) configurations
In μVision, after the application is built, click the Download button to download the
application to the target.
Figure 4. Download Button
After clicking the Download button, the application downloads to the target and is running. To
debug the application, click the Start/Stop Debug Session button, highlighted in red.
Figure 5. Stop at main() when run debugging
Run the code by clicking the Run button to start the application.
Figure 6. Go Button
The hello_world application is now running and a banner is displayed on the terminal.
If this does
not appear, check your terminal settings and connections.
Figure 7. Text Display of the hello_world Demo
Run a demo using Arm GCC
This section describes the steps to configure the command line Arm GCC tools to build, run, and
debug demo applications and necessary driver libraries provided in the MCUXpresso SDK. The
hello_world demo application is targeted for the FRDM-KE17Z Freedom hardware platform which is used
as an example.
NOTE
GCC Arm Embedded 8.2.1 is used as an example in this document. The latest GCC version for this
package is as described in the MCUXpresso SDK Release Notes.
1. Set Up Toolchain
This section contains the steps to install the necessary components required to build and run an
MCUXpresso SDK demo application with the Arm GCC toolchain, as supported by the MCUXpresso SDK.
There are many ways to use Arm GCC tools, but this example focuses on a Windows operating system
environment.
1.1 Install GCC Arm Embedded Toolchain
Download and run the installer from GNU
Arm Embedded Toolchain. This is the actual toolset (in other
words, compiler, linker, and so on). The GCC toolchain should correspond to the latest supported
version, as described in MCUXpresso SDK Release Notes.
1.2 Install MinGW (only required on Windows OS)
The Minimalist GNU for Windows (MinGW) development tools provide a set of tools that are not
dependent on third-party
C-Runtime DLLs (such as Cygwin). The build environment used by the MCUXpresso SDK does not use the
MinGW build tools, but does leverage the base install of both MinGW and MSYS. MSYS provides a basic
shell with a Unix-like interface and tools.
Download the latest MinGW mingw-get-setup installer from
MinGW.
Run the installer. The recommended installation path is C:\MinGW, however, you may
install to
any location.
NOTE
The installation path cannot contain any spaces.
Ensure that the "mingw32-base" and "msys-base" are selected under Basic Setup.
Figure 1. Set Up MinGW and MSYS
In the Installation menu, click Apply Changes and follow the remaining instructions to complete the installation.
Figure 2. Complete MinGW and MSYS Installation
Add the appropriate item to the Windows operating system path environment variable. It can
be found under Control Panel->System and Security->System->Advanced System Settings in the
Environment Variables... section. The path is:
<mingw_install_dir>\bin
Assuming the default installation path, C:\MinGW, an example is as shown in Figure
3. If the
path is not set correctly, the toolchain will not work
NOTE
If you have C:\MinGW\msys\x.x\bin in your PATH variable (as required by Kinetis
SDK 1.0.0), remove it to ensure that the new GCC build system works correctly.
Figure 3. Add Path to Systems Environment
1.3 Add a New Environment Variable for ARMGCC_DIR
Create a new system environment variable and name it ARMGCC_DIR. The value of
this variable
should point to the Arm GCC Embedded tool chain installation path, which, for
this example, is:
C:\Program Files (x86)\GNU Tools Arm Embedded\8 2018-q4-major
See the installation folder of the GNU Arm GCC Embedded tools for the exact path name of your
installation.
Short path should be used for path setting, you could convert the path to short path by running
command for %I in (.) do echo %~sI in above path
Install CMake, ensuring that the option Add CMake to system PATH is selected
when
installing. The user chooses to select whether it is installed into the PATH for all users or
just the current user. In this example, it is installed for all users.
Figure 6. Install CMake
Follow the remaining instructions of the installer.
You may need to reboot your system for the PATH changes to take effect.
Make sure sh.exe is not in the Environment Variable PATH. This is a limitation of
mingw32-make.
2. Build an Example Application
To build an example application, follow these steps.
Open a GCC Arm Embedded tool chain command window. To launch the window, from the Windows
operating system Start menu, go to Programs >GNU Tools Arm Embedded and select GCC
Command Prompt.
Figure 7. Launch Command Prompt
Change the directory to the example application project directory which has a path similar to
the following::
Type build_debug.bat on the command line or double click on the
build_debug.bat
file in Windows Explorer to build it. The
hello_world.elf is generated under .\debug folder.
3. Run an Example Application
This section describes steps to run a demo application using J-Link GDB Server application.
FRDM-KE17Z supports OpenSDA
The OpenSDA interface on your board is pre-programmed with the J-Link OpenSDA firmware.
Follow these steps to download and run the demo applications:
Connect the development platform to your PC via USB cable between the OpenSDA USB connector
and the PC USB connector. If using a standalone J-Link debug pod, connect it to the SWD/JTAG
connector of the board.
Open the terminal application on the PC, such as PuTTY or TeraTerm and connect to the debug
serial port number. Configure the terminal with these settings:
115200 baud rate, depending on your board (reference BOARD_DEBUG_UART_BAUDRATE
variable in
board.h file)
No parity
8 data bits
1 stop bit
Figure 8. Terminal (PuTTY) configurations
Open the J-Link GDB Server application. Assuming the J-Link software is installed, launch the
application by going to the Windows operating system Start menu and select
Programs -> SEGGER
-> J-Link <version> -> J-Link GDB Server.
After it is connected, the screen looks like Figure 9.
Figure 9. SEGGER J-Link GDB Server Screen After Successful
Connection
If not already running, open a GCC Arm Embedded tool chain command window. To launch the
window, from the Windows operating system Start menu, go to Programs -> GNU Tools Arm Embedded
<version> and select GCC Command Prompt.
Figure 10. Launch Command Prompt
Change to the directory that contains the example application output. The output can be found in
using one of these paths, depending on the build target selected:
Run the arm-none-eabi-gdb.exe <application_name>.elf command. For this
example, it is arm-none-eabi- gdb.exe hello_world.elf.
Figure 11. Run arm-none-eabi-gdb
Run these commands:
"target remote localhost:2331"
"monitor reset"
"monitor halt"
"load"
The application is now downloaded and halted at the watch point. Execute the
monitor go command
to start the demo application.
The hello_world application is now running and a banner is displayed on the
terminal. If this
does not appear, check your terminal settings and connections.
Figure 12. Text display of the hello_world demo
Run a Demo Using MCUXpresso IDE
NOTE
GCC Arm Embedded 8.2.1 is used as an example in this document. The latest GCC version for this
package is as described in the MCUXpresso SDK Release Notes.
This section describes the steps required to configure MCUXpresso IDE to build, run and debug example
applications. The hello_world demo application targeted for the FRDM-KE17Z hardware platform is
used as an
example, though these steps can be applied to any example application in the MCUXpresso SDK.
1. Select the workspace location
Every time MCUXpresso IDE launches, it prompts the user to select a workspace location. MCUXpresso IDE is
built on top of Eclipse which uses workspace to store information about its current configuration, and in
some use cases, source files for the projects are in the workspace. The location of the workspace can be
anywhere, but it is recommended that the workspace be located outside of the MCUXpresso SDK tree.
2. Build an Example Application
To build an example application, follow these steps.
Drag and drop the SDK zip file into the Installed SDKs view to install an SDK. In the window that
appears, click OK and wait until the import has finished.
Figure 1. Install an SDK
On the Quickstart Panel, click Import SDK example(s)…
Figure 2. Import an SDK Example
In the window that appears, expand the KE1x folder and select MKE17Z256xxx7. Then,
select frdmke17z and click Next.
Figure 3. Select FRDM-KE17Z Board
Expand the demo_apps folder and select hello_world. Then, click
Next.
Figure 4. Select hello_world
Ensure Redlib: Use floating point version of printf is selected if the example prints floating
point
numbers on the terminal for demo applications such as adc_basic, adc_burst,
adc_dma and adc_interrupt.
Otherwise, it is not necessary to select this option. Then, click Finish.
Figure 5. Select Use floating point version of printf
3. Run an example application
For more information on debug probe support in the MCUXpresso IDE, see Community.
To download and run the application, perform the following steps:
FRDM-KE17Z with DAPLink interfaces, visit Windows serial configuration and
follow the instructions to
install the Windows operating system serial driver. If running on Linux® OS, this step is not
required.
Connect the development platform to your PC via a USB cable.
Open the terminal application on the PC, such as PuTTY or TeraTerm, and connect to the debug serial
port number. Configure the terminal with these settings:
115200 baud rate, depending on your board (reference BOARD_DEBUG_UART_BAUDRATE variable
in
board.h file)
No parity
8 data bits
1 stop bit
Figure 6. Terminal (PuTTY) Configurations
On the Quickstart Panel, click on Debug frdmke17z_demo_apps_hello_world [Debug] to launch
the debug session.
Figure 7. Debug hello_world case
The first time you debug a project, the Debug Emulator Selection dialog is displayed, showing all
supported probes that are attached to your computer. Select the probe through which you want to debug
and click OK. (For any future debug sessions, the stored probe selection is automatically used, unless
the probe cannot be found.)
The application is downloaded to the target and automatically runs to main().
Figure 9. Stop at main() When Running Debugging
Start the application by clicking Resume.
Figure 10. Resume button
The hello_world application is now running and a banner is displayed on the terminal. If this is not the
case, check your terminal settings and connections.