Hello NRF crew
Setup:
Bootloader: MCUBOOT
RTOS: Zephyr
NRF toolchain: v2.6.1
Dev board: ubx_bmd360eval_nrf52811
Custom board: nrf52811 mounted without a DCDC converter, no extermal crystal and a LED
Problem
For a long time my setup worked fine and i could flash both boards, with different overlays and they would work as supposed. One day my west setup in VSCode stopped working, so i started making a custom toolchain, with west, docker, make and all the neccesary dependencies, to make a Zephyr project with the NRF SDK.
This is now working and building/Compiling the project. Cool, but now i cannot get any of the boards to respond on either RTT or UART. If i enable the bootloader, the LED indicating that the bootloader is active is on and never leaves the bootloader state.
If i remove the bootloader, the app is put on the boards, but it will not respond on anything either. I have tried flashing the boards with the files (Zephyr.hex, merged.hex and app_update.bin).
To flash the boards i have tried using the GUI flash tool from NRF Connect, NRFJprog and JLink, same outcome from all of them.
I am having trouble putting a debugger on the boards, with this setup.
I am worried it is because of memory layout og some config makes it all crash. Hope someone can help me, thanks in advance.
mcuboot.conf
# Disable DCDC converter
CONFIG_BOARD_ENABLE_DCDC=n
# Use internal clock source
CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y
# Enable logging for MCUboot
CONFIG_LOG=y
CONFIG_MCUBOOT_LOG_LEVEL_INF=y
# Enable Serial Recovery over UART
CONFIG_MCUBOOT_SERIAL=y
CONFIG_BOOT_SERIAL_UART=y
# Disable UART, since Serial Recovery uses it
CONFIG_UART_CONSOLE=n
# Configure boolader to use only one slot.
CONFIG_SINGLE_APPLICATION_SLOT=y
# Turn on a LED so we can see when Serial Recovery mode is active
CONFIG_MCUBOOT_INDICATION_LED=y
# Wait before booting
CONFIG_BOOT_SERIAL_WAIT_FOR_DFU=y
CONFIG_BOOT_SERIAL_WAIT_FOR_DFU_TIMEOUT=5000
# No BOOT signature, used to remove TinyCrypt and MBEDTLS see: devzone.nordicsemi.com/.../using-zephyr-and-mcuboot-without-image-signatures
#CONFIG_BOOT_SIGNATURE_TYPE_NONE=y
prj.conf
CONFIG_GPIO=y
CONFIG_BOOTLOADER_MCUBOOT=y
# Enable logging
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=3
# RTT console
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
# UART console
CONFIG_UART_CONSOLE=n
CONFIG_UART_INTERRUPT_DRIVEN=y
#Enable bluetooth subsystem
CONFIG_BT=y
CONFIG_BT_OBSERVER=y
CONFIG_BT_SCAN=y
# Enable Extended Scanning
CONFIG_BT_EXT_ADV=y
CONFIG_BT_CTLR_PHY_CODED=y
CONFIG_BT_EXT_SCAN_BUF_SIZE=1650
# Zephyr Bluetooth LE Controller needs 16 event buffers to generate Extended
# Advertising Report for receiving the complete 1650 bytes of data
CONFIG_BT_BUF_EVT_RX_COUNT=8
# Set maximum scan data length for Extended Scanning in Bluetooth LE Controller
CONFIG_BT_CTLR_SCAN_DATA_LEN_MAX=1650
# Increase Zephyr Bluetooth LE Controller Rx buffer to receive complete chain
# of PDUs
CONFIG_BT_CTLR_RX_BUFFERS=8
#Was 16
#Needed for full Extended advertising support
CONFIG_BT_LL_SW_SPLIT=y
CONFIG_RING_BUFFER=y
#Disable signed images, used to remove TinyCrypt and MBEDTLS
#CONFIG_SIGN_IMAGES=n
# Lock stack sizes
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
pm_static.yml
mcuboot: #TODO Shrink this to just the mcuboot region
address: 0x0
end_address: 0xC000 # 48 KB
placement:
before:
- mcuboot_primary
region: flash_primary
size: 0xC000
mcuboot_pad:
address: 0xC000
end_address: 0xC800
placement:
before:
- mcuboot_primary_app
region: flash_primary
size: 0x800 # 2 KB
app:
address: 0xC800
end_address: 0x2e000
placement:
align:
start: 0x1000 # Align to 4 KB boundary of flash sector
region: flash_primary
size: 0x21800 # 136 KB
mcuboot_primary:
address: 0xC000
end_address: 0x2e000
orig_span: &id001
- app
- mcuboot_pad
region: flash_primary
sharers: 0x1
size: 0x22000 # 136 KB
span: *id001
mcuboot_primary_app:
address: 0xC800
end_address: 0x2e000
orig_span: &id002
- app
region: flash_primary
size: 0x21800 # 136 KB
span: *id002
storage:
address: 0x2e000
end_address: 0x30000
region: flash_primary
size: 0x2000 # 8 KB
sram_primary:
address: 0x20000000
end_address: 0x20006000
region: sram_primary
size: 0x6000 # 24 KB