I am using an nRF52840 DK board that I just bought, but have ran into a weird issue that I have never come across when using our old nRF52840 DK. I have a script that I use to first compile my project code, and then flash everything onto my DK board. Here is the code of that script:
#! /bin/bash ## Compile bootloader and application: boot_make='../nrf-sdk/examples/dfu/secure_bootloader/pca10040_s132_ble/armgcc/' boot=${boot_make}_build/nrf52832_xxaa_s132.hex softdevice='../nrf-sdk/components/softdevice/s132/hex/s132_nrf52_7.0.1_softdevice.hex' app_make='../nrf-sdk/examples/ble_peripheral/ble_app_technolingus/pca10040/s132/armgcc/' app=${app_make}_build/nrf52832_xxaa.hex make -C "$boot_make" make -C "$app_make" nrfutil settings generate --family NRF52 --application "$app" --application-version 1 --bootloader-version 1 --bl-settings-version 2 settings.hex nrfjprog -e nrfjprog --program "$softdevice" --verify nrfjprog --program "$boot" --verify --log . nrfjprog --program "$app" --verify nrfjprog --program settings.hex --verify nrfjprog --reset
My code compiles and the hex files are generated as a result of the calls to make -C "$boot_make" and make -C "$app_make". However, when the script finishes programming the softdevice, it complains with ERRORS about the other .hex files I am trying to flash. Here is that output for your reference:
Only moments ago, when running the same code for an older DK (same nRF52840), this script worked fine and everything flashed correctly. I cant figure out why this new DK board causes the programming to fail. What might be causing this new behavior (even though there is no code change)?
I have also attached the log output file from logging the first failing nrfjprog --program command for your reference....if it helps.
The only other thing I have tried is to erase my device from Segger ES (Target > Connect JLink, Target > Erase All), download the secure bootloader ble example, then download my custom application. When I Build and Debug this code, my project always fails at this function, with the same error (NRF ERROR NO MEM "No bootloader found"):
APP_ERROR_CHECK(ble_dfu_buttonless_async_svci_init());