Migration guide#
Changes in SPSDK 3.0#
CLI Changes#
general#
The
--plugincommand line option has been removed from all CLI tools. If you were using the--pluginoption with any SPSDK command line tools, you need to properly install your plugin as a Python package with proper entry points.Obsolete device names have been kept in the code as abbreviation names
All applications that support the
--configoption now also support the-oc/--override-configoption. This allows you to override specific values from the configuration file via command line without modifying the original file. For example:-oc key1=value1 -oc key2=value2
nxpcrypto#
Removed
nxpcertgenapplication (all functionality is now available innxpcryptoapplication)The legacy options
-k/--private-keyand-sp/--signature-providerhave been consolidated and replaced with a single, unified option-s/--signerto simplify the signature configuration interface
nxpdebugmbox#
All commands have been moved to separated groups with clearer organization: *
cmd- For basic debug mailbox commands (start, exit, erase, etc.) *dat- For debug authentication related commands *mem-tool- For memory operations (read-memory, write-memory, test-connection) *tool- For utility commands (reset, get-uuid, halt, resume) *famode-image- For fault analysis mode image operationsThe
--familyparameter has been moved from the root command to individual command groups: * Each command group now requires specifying the family parameter at the appropriate level * The family parameter is now handled through theFamilyRevisionclass for better device controlThe test address is now automatically derived from the family parameter
nxpimage#
In
nxpimage ahabconfiguration, the deprecated ‘image_type’ key has been removed and replaced by ‘target_memory’The
nxpimage beenow supports multiple input data blobs, removedinput_binaryandbase_addressparametersThe
mergecommands innxpimage bootable-imageandnxpimage binary-imagehave been renamed toexportIn
nxpimage cert-blockconfiguration, the deprecated key ‘mainCertChainId’ has been removed, replaced by ‘mainRootCertId’The
nxpimage hab exportcommand changed its parameter structure:-c/--commandoption andexternalarguments have been replaced with--configoption using the standard config approachThe
nxpimage hab parsecommand now requires a mandatory--familyparameter to correctly interpret HAB container binary dataIn
nxpimage sb31, the Load command configuration has been simplified. The key authentication has been removed (instead, use already implemented commands: LoadhashLocking and LoadCmac)In
nxpimage sb31, the input data values have been simplified from value/values/file into one data parameter (data accepts all previously used ways of data definition)In
nxpimage bootable-image xmcd, the configuration data values have been simplified and shortened for better clarity and readability. If you were using the full names in your configurations, you’ll need to update them to the new shortened versions.
pfr/ifr#
In
ifrapplication, the unused--fulloption is removed from theget-templatecommandThe unused options
--show-calchave been removed from Parse/Read commandThe unused options
--calc-inversehave been removed from Generate binary commandThe
generate-binarycommand has been renamed toexportto unify interface with rest of SPSDKThe
parse-binarycommand has been renamed toparseto unify interface with rest of SPSDKThe
ifrapplication has been moved intopfrIn
pfrandifr, backward compatibility for very old configuration files with ‘description:’ section has been removed, replaced by simple family/revision/type header keysThe BD file for SB2.1 must now contain ‘family’ and optionally ‘revision’ in the ‘options’ block
nxpdice#
In
nxpdice, the configuration data values have been simplified and shortened for better clarity and readability. If you were using the full names in your configurations, you’ll need to update them to the new shortened versions.
el2go-host#
- Commands are now separated into distinct groups with clearer organization. Subcommands groups are as follows:
dev- Device-based provisioning flowprod- Production-based provisioning flowutils- Generic utilities not bound to any particular provisioning flow
In general old provisioning commands were targeting the device-based provisioning flow, thus they have been moved to
devgroup. E.g.: oldel2go-host provision-objectsis nowel2go-host dev provision-objects
Removed Applications#
The following Trust Provisioning applications have been removed in SPSDK 3.0:
tphost - Trust Provisioning host application that was used for secure provisioning of target MCUs
tpconfig - Trust Provisioning configuration application for configuring trusted devices
These applications previously provided functionality for:
Provisioning target MCUs
Loading provisioning firmware
Verifying audit logs and certificates
Chain-of-Trust validation
Smart card configuration and sealing
If you were using these applications, consult the SPSDK documentation for information about alternative approaches or replacement functionality.
API changes#
general#
serializeandde-serializemethods have been renamed toexportandparseto-byteshas been renamed toexportAdded
post_exportmethod to base class to handle exporting of fuse scripts, keyblobs, and other files (used in AHAB, Bootable Image, IEE, and OTFAD)In
SignatureProvider, thetry_to_verify_public_keymethod has been removed, as the same functionality is available in theSignatureProviderclassIntroduction of a single standardized signer key for all signature-related configurations
Component
Legacy Options Removed
Replaced With
Certificate Block V1
mainRootCertPrivateKeyFilesignPrivateKeysignProvidersignerCertificate Block V21
signPrivateKeymainRootCertPrivateKeyFilesignProvidersignerCertificate Block Vx
signPrivateKeymainRootCertPrivateKeyFilesignProvidersignerMasterboot image
signPrivateKeymainRootCertPrivateKeyFilesignProvidersignerDAR packet
sign_providerdck_private_keysignerDebug Credentials
sign_providerrotksignerHAB Commands
AuthenticateCsf_SignProviderAuthenticateCsf_PrivateKeyFileAuthenticateData_SignProviderAuthenticateData_PrivateKeyFileSignerAHAB
signing_keysignature_providersigning_key_0signature_provider_0signing_key_1signature_provider_1signing_key_#2signature_provider_#2signersigner_0signer_1signer_#2SB2 Images
signPrivateKeymainCertPrivateKeyFilesignProvidersignerSB31 Images
signPrivateKeymainRootCertPrivateKeyFilesignProvidersignerSBx Images
signingCertificatePrivateKeyFilesignProvidersigner
blhost#
Removed
decode_status_codemethod, replaced bystringify_status_code
debug probes#
Renamed
DebugProbeLocalclass toDebugProbeCoreSightOnly
nxpimage#
The nxpimage.py file has been split into smaller, more maintainable application files under the spsdk/apps/nxpimage/ directory. Each image type functionality has been moved to its own dedicated module.
nxpimage hab#
Replaced
HabContainerclass with newHabImageclass throughout the codebaseCompletely changed how segments are processed and exported, no longer uses
SEGMENTS_MAPPINGto look up segments by nameThe new HAB implementation uses a standardized configuration system that requires explicit specification of key locations(or signature providers). The private key path determination based on certificate file paths is not possible anymore.
The generic segment implementations previously contained in
spsdk/image/segments.pyhave been split into dedicated, purpose-specific modules in thespsdk/image/habpackage.The
spsdk/image/commands.pyfile has been significantly refactored with it’s functionality distributed across multiple specialized modules in thespsdk/image/hab/commandspackage
Changes in SPSDK 2.5#
API changes#
SPSDK will no longer contain code for specific debuggers (spsdk/debuggers) Debuggers will be installed via plugins
the default installation of SPSDK will install PyOCD and MCU-Link
user may install/uninstall support for additional debuggers. (NXP offers some debugger plugins via spsdk plugins)
Changes in SPSDK 2.3#
CLI changes#
The option -f/–family was added to nxpdebugmbox main menu.
Created group of commands for working with raw Debug MailBox commands: erase, erase-one-sector, exit, famode, get-crp, ispmode, start, start-debug-session, token-auth, write-to-flash commands.
Created group of commands for working with Debug Authentication Procedure: auth, dc.
Created command get-families, which shows the full families information for nxpdebugmbox and and its obsolete predecessor families names.
Created group of commands for working with target memory over debug probe: read-memory, test-connection, write-memory.
Created group of commands for working with various tools over debug probe: get-uuid, reset.
Refactored device database to make it compatible across the whole MCUXpresso ecosystem (SDK, IDE, SEC tool, Config Tools, etc.). New family (device) names was introduced for example mx93 -> mimx9352.
Renamed el2go application to el2go-host
API changes#
Introduced new format of AHAB container version 2 that is default on i.MX95 B0 when the chip revision “latest” is selected. To use the AHAB version 1, you can either specify it in the configuration file as “container_version” field, which is hidden in template or you can specify the chip revision as A0 or A1.
Changes in SPSDK 2.2#
CLI changes#
Codecheck was moved to separate repository and is now installed as part of developers requirements.
API changes#
Dropped support for Python 3.8
AHAB container module (ahab/ahab_container.py) was refactored. Concept of parent classes was removed and the module was split into several smaller modules containing classes for each AHAB subimage type.
AHAB extended image array entries were introduced. This helps with creating specific AHAB images like U-Boot. See the examples for more information.
MBI manifest mixin class was redesigned and renamed to reflect the actual purpose.
All XML data in database were converted to JSON format. This change is transparent for the user.
J-Link and PE Micro debugger interfaces support were moved to SPSDK plugins repository. J-Link is still supported by PyOCD in base installation.
List of VID/PIDs of devices were moved to database from the code.
Fuses definition was moved to database from the code. New format of fuse definition in DB was introduced.
Naming of MCX families was clarified - mcxn94x and mcxn54x
MBI is now using BinaryImage class for image representation, this allow better visualization and verification of image.
Changes in SPSDK 2.0#
This guide details the changes and how to change your CLI and code to migrate to SPSDK 2.0. See the full changelog for more information.
CLI changes#
elftosb replaced by nxpimage
nxpcertgen and nxpkeygen replaced by nxpcrypto
The option -d/–device/-dev replaced by -f/–family in order to select appropriate family
Positional arguments replaced by options for all parameters with an exception to blhost, sdphost and dk6prog. Positional argument for configuration file was replaced by -c/–configuration option and unified in all applications. Also output argument was replaced by -o/–output. Input binaries in parse subcommands are accepted with -b/–binary options
Remove backward compatibility with command get-cfg-template, replaced fully with get-template(s)
Added possibility to use YAML configurations for SB 2.1 and HAB this is a step towards unified interface for all nxpimage applications.
Added possibility to choose between value and bitfield in bootable-image sub applications (XMCD, FCB)
Firmware version and Image version in MBI were clarified. This might break compatibility, because in SPSDK 1.x these values were treated as equal. Image version is used for dual boot feature and firmware version is used for rollback protection.
The option –use-pkcs8/–no-pkcs8 was removed from nxpcrypto key convert application
Certificate Blocks#
One of the major changes were done in certificate blocks. Previously the nxpimage cert-blocks was intended only for generation of binary certificate blocks. With SPSDK 2.0 the nxpimage cert-blocks must be used with signed Master Boot Images and Secure Binary. The motivation behind this change is to make one unified way of certificate blocks configuration that could be shared among MBI and Secure Binary and make interfacing with HSM easier.
Signed MBI and SB 3.1 changes
certBlock: new property, path to cert-block YAML configuration or binary. Mandatory for signed MBI.
Root Keys Settings: Block has been moved to cert-block configuration.
ISK Certificate Settings: Block has been moved to cert-block configuration.
mainRootCertPrivateKeyFile, signingCertificatePrivateKeyFile: unified to signPrivateKey (not compatible change)
signProvide, iskSignProvider: unified to signPrivateKey (not compatible change)
In case the ISK is used, the MBI is signed by ISK key, otherwise root key is used.
Cert Block configuration changes
binaryCertificateBlock: Removed, user might provide binary to certBlock property.
signingCertificateFile: Renamed to iskPublicKey (not compatible change)
signingCertificateConstraint: Renamed to iskCertificateConstraint (not compatible change)
signCertData: Renamed to iskCertData (not compatible change)
mainRootCertPrivateKeyFile, signingCertificatePrivateKeyFile: Unified to signPrivateKey (not compatible change)
signProvider, iskSignProvider: Unified to signProvider (not compatible change)
ISK certificate is signed by “root” key.
API changes#
Crypto backend was refactored. See the API documentation and examples for more information nxpimage.
Registers backend was refactored to reflect the actual binary representation and correct endianness.
Types of XMCD members mem_type and config_type have changed from string to Enum
Mboot and SDP interfaces were refactored. Scan functionality was moved to the interface class. See the examples for more details.
The hash algorithm type is now EnumHashAlgorithm instead of string literal (ie “sha256”)
Deterministic ECC signatures are no longer used.