Flashing custom nRF52811 board with softdevice using OpenOCD

We are trying to flash our custom board with a modified version of the ble_app_template example (project based on nRF5_SDK_17.1.0_ddde560/examples/ble_peripheral/ble_app_template/pca10056e/s112/armgcc). The code has been validated on the PCA10056 DK with emulation for nRF52811.

To flash it to our custom board, I modified the Makefile as follows:

Changed the board define from BOARD_PCA10056 to BOARD_CUSTOM:

#CFLAGS += -DBOARD_PCA10056
CFLAGS += -DBOARD_CUSTOM

#ASMFLAGS += -DBOARD_PCA10056
ASMFLAGS += -DBOARD_CUSTOM

Removed DEVELOP_IN_NRF52840 define:

#CFLAGS += -DDEVELOP_IN_NRF52840

#ASMFLAGS += -DDEVELOP_IN_NRF52840

Removed NRFX_COREDEP_DELAY_US_LOOP_CYCLES=3 define:

#CFLAGS += -DNRFX_COREDEP_DELAY_US_LOOP_CYCLES=3

#ASMFLAGS += -DNRFX_COREDEP_DELAY_US_LOOP_CYCLES=3

I also created a minimal custom_board.h (bare minimum required for the firmware to compile; our custom board doesn't have any LEDs or buttons):

#ifndef CUSTOM_BOARD_H
#define CUSTOM_BOARD_H

#ifdef __cplusplus
extern "C" {
#endif

#include "nrf_gpio.h"


#define BUTTONS_NUMBER 0
#define BUTTONS_ACTIVE_STATE 0

#ifdef __cplusplus
}
#endif

#endif // CUSTOM_BOARD_H

To program the built binary and softdevice, I used OpenOCD with the ST-Link V2 programmer. The following command works as expected and flashes the two .hex files onto the nRF52811.

openocd -f interface/stlink.cfg -f target/nrf52.cfg -c "init; halt; program _build/nrf52811_xxaa.hex preverify verify; program ./nRF5_SDK_17.1.0_ddde560/components/softdevice/s112/hex/s112_nrf52_7.2.0_softdevice.hex preverify verify reset exit"

However, the BLE device doesn't show up as it did when developing on DK. How can we get more information on why this is failing? Where can we get NRF_LOG_* output from?

Related