Serial DFU of Secure Firmware Fails
I'm attempting to use the serial bootloader to load a secure firmware image to an STM32L5 using STM32CubeProgrammer. I can successfully connect to the board in bootloader mode and perform a full-chip erase, but attempting to download the image (either a .hex or a .out) results in an error:
10:20:33 : Memory Programming ...
10:20:33 : Opening and parsing file: project.out
10:20:33 : File : project.out
10:20:33 : Size : 256 KBytes
10:20:33 : Address : 0x0C000000
10:20:33 : Erasing memory corresponding to segment 0:
10:20:33 : Not flash Memory : No erase done
10:20:33 : Download in Progress:
10:20:34 : Response received from device: NACK
10:20:34 : Error: Write address not acknowledged: 0xC000000
10:20:34 : Error: failed to download Segment[0]
10:20:34 : Error: failed to download the FileTrustZone is enabled (FLASH_OPTR->TZEN=1) on this device. Reading 0x0BF97FFE returns a bootloader ID of 0x92.
Is there a way to apply a secure image via the serial bootloader?
Thanks!
Update:
I tried converting my project to a raw binary and uploading it to address 0x0800'0000. The upload reports success, but verification fails and reading back the memory shows that it was not programmed.
