Hello Massimiliano,
SEC tool does not offer such functionality, still it is doable with few manual steps using SEC and bundled SPSDK CLI utility (nxpimage).
First you need to have Flash Configuration Block binary file (fcb.bin), it can be read from Flash, or using Boot Memory Configuration dialog (accessible from toolbar) and then "Convert to complete FCB" button. Only at this point you need the device to be connected. Someone out of the cave might help.
Second, for example when I look into the write script (windos batch), I can see these pieces of code that write stuff into the Flash (SPI NOR):
call "%blhost%" %blhost_connect% -j -- write-memory 0x30000400 "%SPT_WORKSPACE%\bootable_images\fcb.bin"
call "%blhost%" %blhost_connect% -j -- write-memory 0x30000600 "%SPT_WORKSPACE%\configs\image_version.bin"
call "%blhost%" %blhost_connect% -j -- write-memory 0x30001000 "%SPT_WORKSPACE%\bootable_images\myapp.bin" 0
Then, SEC tool contains nxpimage utility located here: <INSTALL_DIR>/bin/_internal/tools/spsdk
Then this information can be transformed into this YAML config file consumed by the nxpimage:
name: My super binary image
pattern: zeros
alignment: 1
regions:
- binary_file:
name: FCB
path: bootable_images/fcb.bin
offset: 0x400
- binary_file:
name: image version
path: configs/image_version.bin
offset: 0x600
- binary_file:
name: image itself
path: bootable_images/evkmimxrt1160_ota_mcuboot_basic.bin
offset: 0x1000
and finally the offline.bin can be created (expectation is that the offline.yaml is in the SEC workspace, nxpimage is in the PATH):
nxpimage utils binary-image merge -c offline.yaml -o offline.bin
Empty YAML config (template) file can be created by executing:
nxpimage utils binary-image get-template -o offline.yaml
Hope this helps.
Regards,
Libor