REL-1.1.0 Migration Guide
This page indicates how to migrate applications developed with REL-1.0.0 to REL-1.1.0. Migration is needed because REL-1.1.0 ships with an updated set of libraries (
1.3.0.x
1.2.1.17
All sample applications shipped with REL-1.1.0 already reflect these changes.
Simplified CLI Support
- CLI contexts have been removed
- Changed method of registering individual command handlers
Below are the steps to port if you’re using cli_task.c
. If your app used raw dnm_cli calls to init cli and register handlers, you can mimic what the new code in cli_task.c
is doing.
- Change all includes of
dnm_cli.h
to the newdnm_ucli.h
in all code requiring CLI functionality - Change array of commands to new format of
dnm_ucli_cmdDef_t
- Change cli_task_init call to new format:
void cli_task_init(char*appName, dnm_ucli_cmdDef_t* cliCmds);
- Change prototype of individual cli command handlers to:
dn_error_t (*dnm_ucli_cmdHandler_t)(INT8U * cmd, INT32U len); // notice no offset
- Change
dnm_cli_printf
todnm_ucli_printf
- Replace
dnm_cli_showTrace
withdnm_ucli_trace
. Note that the flag indicating whether the trace is enabled or disabled is now explicitly passed as an argument.
Simplified Device Initialization
- No need to open battery or temperature devices - the stack will open these. You may need to have a small delay in the start of your program to allow the stack to have sufficient time to initialize these devices before your tasks use them.
SPI Slave Select #defines
- All references to
DN_SPI_SSnX
should be replaced withDN_SPIM_SS_Xn.
New Kernel Header Format
In REL-1.0.0, the main C source file of each application contains:
#include "loader.h" _Pragma("location=\".kernel_exe_hdr\"") __root const exec_par_hdr_t kernelExeHdr = { {'E', 'X', 'E', '1'}, OTAP_UPGRADE_IDLE, LOADER_CRC_IGNORE, 0, {VER_MAJOR, VER_MINOR, VER_PATCH, VER_BUILD}, 0, // app id (0=not set) DUST_VENDOR_ID, // vendor id, (0=not set) EXEC_HDR_RESERVED_PAD };
In REL-1.1.0, this is replaced by:
#include "dn_exe_hdr.h" DN_CREATE_EXE_HDR(DN_VENDOR_ID_NOT_SET, DN_APP_ID_NOT_SET, VER_MAJOR, VER_MINOR, VER_PATCH, VER_BUILD);
Postbuild Step
The IAR projects included in REL-1.1.0 contain a postbuild step that executes a Python script, dustElfToBin.py. The script patches the executable to work with loader 1.0.5.4 or later. If you have an incompatible configuration, e.g.
the device will function when run from JTAG, but will appear unresponsive when booted without JTAG running. Note that the loader was changed to allow the device to be certified for FIPS 140-2 compliance.
Deprecated API Functions
The following API functions have been removed:
dnm_cli_setHelpHandler()
dnm_cli_procNotif()
dnm_cli_usage()
dnm_cli_setLogFile()
dnm_cli_setOutputMode()
dnm_cli_isHighSpeedCLI()
dnm_cli_forceHighSpeedFlag()
dnm_cli_isTraceOn()
dnm_cli_setTrace()
dnm_cli_setTraceByName()
dnm_cli_printTraceStateByName()
dnm_cli_helpTrace()
dnm_cli_showTrace()
dnm_cli_isNextToken()
dnm_cli_getNextToken()
dnm_cli_isEquIgnoreCase()
dnm_cli_uint64ToString()