Hi,
I'm developing on the current setup:
- nRF52833 DK, emulating an nRF52820.
- Soft Device 113 version 7.2.0
- SDK 17.1.0
- IAR EW ARM 9.30
I'm trying to include the secure bootloader code into our project based on the example " \examples\dfu\secure_bootloader\pca10100e_s112_ble".
I believe the APPPROTECT and IAR are putting me in some sort of deadlock. The Bootloader guide on the documentation (Nordic Semiconductor Infocenter) says that: "You cannot write to MBR_UICR_BOOTLOADER_ADDR when using the default J-Link target driver in IAR. Therefore, you must set up nrfjprog as an external tool".
So I'm flashing the bootloader image (the output of the pca10100e_s112_ble project) via command line using jprog. However, when I try to debug from IAR, I get a message prompt saying that "CTRL-AP indicates that the device is secured. For debugger connection the device needs to be unsecured. Note: unsecuring will trigger a mass erase of the internal flash.". So obviously when I press "Yes" the bootloader image gets erased.
Can I disable this device "secure" mode (which I believe is APPROPTECT) permanently? Is there any other way to work around this?
Thank you!