McuMgrImageConfig
class McuMgrImageConfig
Global configuration for the magic numbers used when parsing McuBoot firmware image headers and TLV trailers.
The default values match the standard McuBoot specification. If a device uses custom magic numbers, call the appropriate setters before starting the SMP OTA upgrade.
Example usage:
// Set custom magic numbers before starting OTA
McuMgrImageConfig.setHeaderMagic(0xCustomMagic);
McuMgrImageConfig.setTlvInfoMagic(0xCustomTlvMagic);
McuMgrImageConfig.setTlvProtectedInfoMagic(0xCustomProtectedTlvMagic);
// Start the OTA upgrade ...
// Optionally restore defaults afterwards
McuMgrImageConfig.resetToDefaults();
Content copied to clipboard
Functions
Link copied to clipboard
Returns the expected magic number for the current McuBoot image header.
Link copied to clipboard
Returns the expected magic number for the legacy (V1) McuBoot image header.
Link copied to clipboard
Returns the expected magic number for the unprotected TLV info block.
Link copied to clipboard
Returns the expected magic number for the protected TLV info block.
Link copied to clipboard
Resets all magic numbers to the standard McuBoot default values.
Link copied to clipboard
Sets a custom magic number for the current McuBoot image header.
Link copied to clipboard
Sets a custom magic number for the legacy (V1) McuBoot image header.
Link copied to clipboard
Sets a custom magic number for the unprotected TLV info block.
Link copied to clipboard
Sets a custom magic number for the protected TLV info block.