Build Process
Special build requirements must be implemented when building applications that are to participate in OTA upgrades:
Certain lines must be included in the makefiles for the applications - see Section 49.14.1
The server and client applications must then be built - see Section 49.14.2
The (initial) client application must now be prepared and loaded into Flash memory of the client device - see Section 49.14.3
The server application must now be prepared and loaded into Flash memory of the server device - see Section 49.14.4
Modifying Makefiles
In the makefiles for all applications (for server and all clients), replace the following lines:
$(OBJCOPY) -j .version -j .bir -j .flashheader -j .vsr_table
-j .vsr_handlers -j .rodata -j .text -j .data -j .bss -j .heap
-j .stack -S -O binary $< $@
with:
$(OBJCOPY) -j .version -j .bir -j .flashheader -j .vsr_table
-j .vsr_handlers -j .ro_mac_address -j .ro_ota_header -j .rodata
-j .text -j .data -j .bss -j .heap -j .stack -S -O binary $< $@
Parent topic:Build Process
Building Applications
The server and client applications must be built with the makefiles adapted for OTA upgrade (see Section 49.14.1). A build can be conducted from MCUXpresso as for any ZigBee PRO application - refer to the MCUXpresso Installation and User Guide (JNUG3136).
The resulting binary files must then be prepared and loaded into Flash memory as described in Section 49.14.3 and Section 49.14.4.
Parent topic:Build Process
Preparing and Downloading Initial Client Image
The first time that the client is programmed with an application, the binary image must be loaded into Flash memory on the client device using a Flash programming tool such as the Flash Programmer within MCUXpresso (normally only used in a development environment) or the DK6 Production Flash Programmer (JN-SW-4407).
After this initial image has been loaded, all subsequent client images will be downloaded from the server to the client via the OTA Upgrade cluster.
Parent topic:Build Process
Preparing and Downloading Server Image
The server device is programmed by loading a binary image into Flash memory using a Flash programming tool such as the Flash Programmer within MCUXpresso (normally only used in a development environment) or the DK6 Production Flash Programmer (JN-SW-4407).
When a new client image becomes available for the server to distribute, this image must be loaded into the server.
In a deployed and running system, this image may be supplied via a backhaul network.
In a development environment, it may be loaded into Flash memory using the Flash Programmer within MCUXpresso.
However, this Flash Programmer only allows programming from the start of Flash memory. Therefore, the server application must be re-programmed into the Flash memory as well as the new client image. The server application binary and client application binary must be combined into a single binary image using the DK6 Encryption Tool (JET) before being loaded into the server. This tool is provided in the SDK and is described in the JET User Guide (JNUG3135).
Note: If desired, the initial server image can also include the initial client application. Although there is no need for the server to download this first client application to the client(s), it may be stored in the server in case there is any subsequent need to re-load it into a client.
Parent topic:Build Process
Parent topic:OTA Upgrade cluster