The KW40Z connectivity software stack has several demo application available, and one of them is the OTAP client. This application allows the user to reprogram the device in a wireless fashion. This can be done by both using another device with an OTAP server application, or with the Kinetis BLE Toolbox mobile application, using the OTAP tool.
To create a binary file for the KW40Z, follow these next steps:
- Using IAR Embedded Workbench, open the application you want to send through OTAP.
- Right click the main project, and open the Options... menu.
- In the options menu, go to the Output Converter submenu. In the Output Converter submenu, check the "Generate additional output" box, and choose Motorola as the Output format.
- In the options menu, go to the Linker submenu. Now, in the Config tab, replace the symbols in the Configuration file symbol definitions box with these:
- In the Linker submenu, go to the Input tab. In the Keep symbols box, add the symbol 'bootloader' (without the quotes).
- In the Input tab, in the Raw binary image box, in the File option, add the following path:
- In the Raw binary image box, add the following options to the Symbol, Section and Align boxes:
- Press OK. Compile the project. The output file (*.srec) should be in the main project folder, inside the debug folder.
- You can now use this binary file to reprogram your device with OTAP.