The nRF52840 is a BLE board. For internet connectivity, we use a W5500 Ethernet Shield. See shield description in WIZnet website
Prerequisites and requirements:
- W5500 Ethernet Shield
- See WIZnet website. You will need to attach the shield to the board and insert an ethernet cable. The shield should emit a constant red LED once the board has power
- west workspace with mender-mcu
nrfutil
- nRF Util is a cli tool used i.a. for building for Zephyr for a Nordic board. See the documentation for download instructions
SEGGER J-Link
- Software used to interact with J-Link enabled boards. See Nordic’s documentation for further information and installation steps
Once you have all the requirements in place, you can you can simply
build and flash the bootloader and the application with the following command:
TENANT_TOKEN="<Paste your hosted Mender tenant token here>"
ARTIFACT_NAME="release-1"
west build \
--sysbuild mender-mcu-integration --board nrf52840dk/nrf52840 -- \
-DEXTRA_DTC_OVERLAY_FILE=boards/shields/wiznet_eth_w5500.overlay \
-DEXTRA_CONF_FILE=boards/shields/wiznet_eth_w5500.conf \
-DCONFIG_MENDER_SERVER_TENANT_TOKEN=\"$TENANT_TOKEN\" \
-DCONFIG_MENDER_ARTIFACT_NAME=\"$ARTIFACT_NAME\"
west
will, by default, use the now deprecated nrfjprog
as its runner. In order to use nrfutil
we need to explicitly set it with -runner nrfutil
when flashing:
west flash --runner nrfutil
The application should now start! You can monitor the serial line with:
minicom -D /dev/ttyACM0 -b 115200 -w
Restarting the board
You can also use nrfutil
to list devices, reset them etc. Install nrfutil’s device
with:
nrfutil install device
You can now reset the board with:
nrfutil device reset
Debugging with gdb
You can attach with gdb
at any moment of the execution with:
west attach --domain mender-mcu-integration