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 Cloning the BLE projects from KW40Z connectivity software and executing it using IAR tool [Demonstrating the cloning of Bluetooth example project using FRDM-KW40Z NXP Freedom Development Platform]
  • 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: 4 Jul 2016 12:35 PM Date Created
  • Views 633 views
  • Likes 1 like
  • Comments 0 comments
  • kinetis w series
  • ble + 15.4
  • cloning ble project
  • ble/802.15.4 integrated transceiver
  • wireless mcu (arm cortex-m0+ based)
  • frdm-kw40z
Related
Recommended

Cloning the BLE projects from KW40Z connectivity software and executing it using IAR tool [Demonstrating the cloning of Bluetooth example project using FRDM-KW40Z NXP Freedom Development Platform]

bheemarao
bheemarao
4 Jul 2016

Here in this document we shall explore the KW40Z connectivity software package and flow through the process of cloning the Bluetooth example projects i.e reusing the existing projects and modifying it as per requirement which saves design and coding cycle of the project.

 

Steps involved:

  1. Install KW40Z_Connectivity_Software_1.0.1.exe
  2. Cloning a project: run the Project Cloner application (ConnSw\tools\project_cloner\project_cloner.exe)
  3. Building the Binaries using IAR tool

 

Step -1: Install KW40Z_Connectivity_Software

 

The KW40Z Connectivity Software package integrates the Kinetis Software Development Kit v1.3 and all the wireless connectivity stacks required to develop your solution using IEEE 802.15.4 and/or Bluetooth Low Energy. Download the software Enablement package and tools required to build and run the connectivity solutions for KW40Z / KW30Z / KW20Z.

Download and install “KW40Z_Connectivity_Software_1.0.0” software from the link [http://www.nxp.com/webapp/Download?colCode=KW40Z-CONNECTIVITY-SOFTWARE&Parent_nodeId=1433195919005714784795&Parent_pageType=product]

After installing this software you will find the resources at  “C:\Freescale\KW40Z_Connectivity_Software_1.0.1\ConnSw”

image

 

This folder contains all the necessary Bluetooth driver information’s, example projects, platform library, tools, framework and board related header files

 

Step -2: Cloning a project

Navigate to the below path “C:\Freescale\KW40Z_Connectivity_Software_1.0.1\ConnSw\tools\project_cloner” And run the project cloner application

image

 

Now we need to select the path for “codebase path” as shown below

image

 

We need to select “C:\Freescale\KW40Z_Connectivity_Software_1.0.1\ConnSw” as its path

Next select the example application to be cloned (Clone example app), and the desired configuration (Clone Configuration).

image

 

Here i have selected “bluetooth_alert_notification_server" as project needed to be cloned

Next in clone configuration select “frdmkw40z_bare_metal” as shown below

 

image

Under cloned app name provide name of your choice i have given it as “bluetooth_alert_notification_server-clonned”

image

 

And select the destination folder where the project needs to be saved

I am saving this project under a folder “C:\Users\brao\Desktop\cloned conn project”

 

By default the Project Cloner will clone only application files (board specific files and example app files). To clone all the files, select the Clone full codebase radio button.

image

Now press the Clone Project button to start the cloning process. The log window will display “Cloning completed” when the process ends.

image

You can see the process starts and logged information can be seen as shown:

image

You can see the cloned project in folder “: C:\Users\brao\Desktop\cloned conn project\bluetooth_alert_notification_server-clonned”

image

 

Step-3: Building the Binaries using IAR

 

Here we show the required steps for obtaining the binary files for usage with the boards.

 

After you select the configuration you want to clone, locate the destination folder and follow the steps bellow

 

Note: In order to be able to build any of these packages you need a copy of the IAR Embedded Workbench for ARMRegistered version 7.40.2 or higher. This connectivity software package does not include support for any other toolchains.

 

Now open IAR IDE tool

image

image

 

Open the cloned IAR workspace “bluetooth_alert_notification_server-clonned.eww” from below location

“C:\Users\brao\Desktop\cloned conn project\bluetooth_alert_notification_server-cloned”

image

After opening in IAR the project folder looks as below:

image

The KSDK platform libraries are RTOS dependent, so appropriate libraries must be built for the selected RTOS. For any connectivity application, the following Kinetis SDK libraries must be built with the IAR Embedded Workbench for ARMRegistered in order to enable the complete board support and RTOS kernel support:

Select the KSDK platform (bare-metal) library project

image

Build the KSDK platform library project.

image

It builds with zero error

image

Next Select the “bluetooth_alert_notification_server-clonned” project and build it as did earlier

image

It builds with zero error and an executable *.out is generated

image

 

Debugging the cloned project:

Make the appropriate debugger settings in the project options window:

 

image

 

The projects are configured with “CMSIS-DAP” firmware as the default debug configuration. Please make sure that your board’s OpenSDA chip contains a CMSIS-DAP firmware or that the debugger selection corresponds to the physical interface used to connect to the boards.

Now connect the board and Click the “Download and Debug” button to flash the executable onto the board.

image

 

You can see below project execution on IAR tool

image

 

You can start debugging the project by clicking on single stepping (step over, step into, step out) or directly you can click on “go” to execute the project

image

The Alert Notification application implements a GATT client or server for the following profile and services:  Alert Notification Profile v1.0

  • Alert Notification Service v1.0
  • Battery Service v1.0
  • Device Information Service v1.1

The application behaves as a GAP central node. It enters the GAP Limited Discovery Procedure and searches for Alert Notification Clients to connect to. After connecting with the peripheral, it waits for notifications to be configured.

 

After flashing the board, the device is in idle mode (all 4 LEDs flashing). To start scanning, press the SW4 button. When in GAP Limited Discovery Procedure, LED1 is flashing. When the central node connects to the peripheral, LED1 turns solid. To disconnect the node, hold the SW4 button pressed for 2-3 seconds. The node then re-enters GAP Limited Discovery Procedure.

 

When in connection and if notifications are configured, pressing the SW3 button triggers a new alert notification (“New mail”) to be sent to the GATT client. Holding the SW3 button for 2-3 seconds triggers a new unread alert status notification (missed call) to be sent to the same GATT client.

 

 

 

Happy Executing the clone example package on KW40Z (wireless MCU)...  image image image 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