Hello, I am trying to configure a LPC55S69-EVK to demonstrate the secure bootloader and secure update via SB2 loading and I'm not able to get anything to boot when the secure boot option is enabled (boot signed images via elftosb-gui) even when using the included example self-signed certificate and private key found in SDK_2.6.3_LPC55S69\middleware\mcu-boot\bin\Tools\workspace\keys_and_certs
I follow these steps:
1. Generate signed secure image (signed_secure.png attached)
2. Generate signed non-secure image (signed_nonsecure.png attached)
3. Program both images:
..\..\..\Tools\Programming\BLHost\blhost.exe -V -p COM14,115200 -- flash-erase-region 0x00000 0x34000
..\..\..\Tools\Programming\BLHost\blhost.exe -V -p COM14,115200 -- flash-erase-region 0x78000 0x4000
..\..\..\Tools\Programming\BLHost\blhost.exe -V -p COM14,115200 -- write-memory 0 hello_world_test_sec.bin
..\..\..\Tools\Programming\BLHost\blhost.exe -V -p COM14,115200 -- write-memory 0x78000 hello_world_test_nonsec.bin
4. Program configuration for puf keystore (puf_cfg.png attached)
5. Program configuration for secure bootloader (secureboot_cfg.png attached)
6. Read CFPA page (0x9DE00) and set byte @ 0x9DE18 to 0x01, write modified page back to 0x9DE00
7. Reset, connect to serial port to monitor output from secure/nonsecure simple application--no activity found, application is not booting.
If I change the secure boot configuration in elftosb-gui (Device->Security->Secure Boot) from 'Boot signed images' to 'Boot plain images' I can see the code is running from the serial port output and there is no issue. I'm not sure what I could be doing wrong but the information seems to point to there be an issue with the self-signed certificate/private key or signature--how can that be if I am using the included example self-signed cert and private key and followed the directions above?
Attempting to update via SB2 file also fails. I follow these steps:
1. Create SB2 file:
BD cfg file:
flags = 0x04;
buildNumber = 0x01;
productVersion = "1.00.00";
componentVersion = "1.00.00";
secImage = "hello_world_test_sec.bin";
nonSecImage = "hello_world_test_nonsec.bin";
load secImage > 0x00000000;
load nonSecImage > 0x78000;
..\..\..\Tools\Programming\elftosb_gui\elftosb\win\elftosb.exe -V -f lpc55xx -k %SB_KEK% -c %SB_CFG% -o %SB_OUT%
2. Load SB2 file:
..\..\..\Tools\Programming\BLHost\blhost.exe -V -p COM14,115200 -- receive-sb-file hello_world_test_sb2.sb2
3. Error result:
Ping responded in 1 attempt(s)
Framing protocol version = 0x50010300, options = 0x0
Inject command 'receive-sb-file'
Preparing to send 218848 (0x356e0) bytes to the target.
Successful response to command 'get-property(max-packet-size)'
Successful generic response to command 'receive-sb-file'
Data phase write aborted by status 0x2712 kStatus_AbortDataPhase
Possible JUMP or RESET command received.
- took 0.290 seconds
Response status = 10101 (0x2775) kStatusRomLdrSignature
Wrote 0 of 218848 bytes.
Please let me know if I can provide any more information to help diagnose this issue. Thank you