element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Freedom development platform
  • Products
  • Dev Tools
  • Freedom development platform
  • More
  • Cancel
Freedom development platform
Blog Running a Hello World demo on FRDM-KW41Z using Kinetis Design Studio IDE
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Freedom development platform to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: bheemarao
  • Date Created: 6 Nov 2016 6:38 PM Date Created
  • Views 796 views
  • Likes 0 likes
  • Comments 0 comments
  • hello_world
  • frdm-kw41z
Related
Recommended

Running a Hello World demo on FRDM-KW41Z using Kinetis Design Studio IDE

bheemarao
bheemarao
6 Nov 2016

This blog describes the steps required to configure Kinetis Design Studio(KDS IDE to build run and debug example applications The helloworld demo application targeted for the  FRDM-K64FFRDM-K64F Freedom hardware platform is used as an example though these steps can be applied to any example application in the KSDK

 

Steps involved:

1. Importing the project into workspace

2. Build and Run an example application

 

Preliminaries:

 

1. Download KW41Z Connectivity Software

The KW41Z Connectivity Software package integrates the Kinetis Software Development Kit v2.0 and all the wireless connectivity stacks required to develop your solution using IEEE 802.15.4 and/or Bluetooth Low Energy.

Click below to download the KW41Z Connectivity Software appropriate for your computer's operating system.

Click Here

After installation you can find Connectivity Example Codes at below folder location:

C:\NXP\MKW41Z_ConnSw_1.0.2

 

2. Install Your Toolchain

NXP offers a complimentary toolchain called Kinetis Design Studio (KDS)

https://nxp.flexnetoperations.com/control/frse/download?element=7490587

The KW41Z Connectivity Software includes support for other tools such as IAR

(https://www.iar.com/iar-embedded-workbench/freescale/)

 

Importing the project into workspace

 

Open Kinetis Design Studio Version: 3.2.0, it prompts the user to select a workspace location. KDS IDE is built on top of Eclipse, which uses workspace to store information about its current configuration; you can choose your own location.

image

Select "File -> Import" from the KDS IDE menu. In the window that appears, expand the "Project of Projects" folder and select "Existing Projects Sets". Then, click the "Next" button.

image

As we have installed the KW41 connectivity software at below location: point the browse option to this location or copy the path and paste it as shown in picture

“C:\nxp\MKW41Z_ConnSw_1.0.2\boards\frdmkw41z\demo_apps\hello_world\kds”

image

After pointing to the correct directory, your "Import Working Sets and Projects" window should look like the figure below. Click the "Finish" button.

image

The workspace will look like figure shown below:

image

You can browse for “hello_world.c” and find below lines of codes

 

BOARD_InitPins();
 BOARD_BootClockRUN();
 BOARD_InitDebugConsole();

    PRINTF("hello world.\r\n");

    while (1)
    {
        ch = GETCHAR();
        PUTCHAR(ch);
    }

 

The code initialises the board pins, Initialize LPUART0 pins below, Call CLOCK_Osc0Init to setup OSC clock,

Set MCG configuration, MCG includes three parts: FLL clock, PLL clock and Internal reference clock(MCGIRCLK). Initialize debug console

 

DbgConsole_Init(BOARD_DEBUG_UART_BASEADDR, BOARD_DEBUG_UART_BAUDRATE, BOARD_DEBUG_UART_TYPE, uartClkSrcFreq);

image

It uses LPUART0 and BOARD_DEBUG_UART_BAUDRATE = 115200

 

There are two project configurations (build targets) supported for each KSDK project:

• Debug – Compiler optimization is set to low, and debug information is generated for the executable. This target should be selected for development and debug.

• Release – Compiler optimization is set to high, and debug information is not generated. This target should be selected for final application deployment.

 

Choose the appropriate build target, "Debug" or "Release", by clicking the downward facing arrow next to the hammer icon, as shown below. For this example, select the "Debug" target.

image

Build and Run an example application

 

Now connect the KW41Z board to your machine USB port and click on hammer button to build the project to check whether the project is compiling and building without errors.

image

You can see the result in console window as shown below:

image

Now we will proceed to execute this project by clicking on debug configuration as shown:

Make sure to connect the development platform to your PC via USB cable between the OpenSDA USB and the PC USB connector.

Make the selection as shown

image

The application is downloaded to the target and automatically run to main(): You will see the execution window as shown below:

image

Now open an serial hyper terminal window to test this application:

My board is connected to com44 port as shown in device manager:

image

I am having putty serial terminal application with me, open with below set up configuration:

image

Now go back to the KDS execution window and Start the application by clicking the "Resume" button

image

The hello_world application is now running watch what appears on serial terminal

image

Happy “Hello world” image 

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube