If you have provisioned the device, the hex file must be signed with the same key used during provisioning using the ModusToolbox™ Edge Protect Security Suite. To do this, modify or replace the

postbuild.bat

file with a command similar to the following, all on one line. Update the paths, file names, and key to match your configuration.

[path-to-edgeprotecttools]

\bin\edgeprotecttools sign-image --image "Hello_World_Objects/Hello_World.hex" --output "Hello_World_Objects/Hello_World.hex" --header-size 0x400 --slot-size 0x20000 --key keys/oem_rot_priv_key_0.pem --hex-addr 0x32000000 --align 1 --pad --security-counter 0 --erased-val 0 --public-key-format full --pubkey-encoding raw --signature-encoding raw --min-erase-size 0x200 --overwrite-only

All other configuration steps are the same as those in Device with default policy.


Then, build the application.


After that, you can program the device and run the debugger.