Getting Started¶
Prerequisites¶
Install host packages on Arch / EndeavourOS:
Install the nRF Connect SDK¶
- Clone the SDK source tree:
mkdir -p ~/ncs
cd ~/ncs
west init -m https://github.com/nrfconnect/sdk-nrf --mr v3.2.4 v3.2.4
cd ~/ncs/v3.2.4
west update
west zephyr-export
- Install the matching Nordic-managed toolchain:
- Export
ZEPHYR_BASE:
For bash / POSIX shells:
Persistent in fish:
Persistent in bash:
Clone and Build¶
Clone the repo and fetch the TinyUSB submodule:
cd ~
git clone https://github.com/gab-k/FlexAudioLink.git
cd ~/FlexAudioLink
git submodule update --init --recursive firmware/tinyusb
Launch a shell with the Nordic toolchain:
Build:
Pristine build:
cd ~/FlexAudioLink/firmware
west build -p always -b nrf54lm20dk/nrf54lm20a/cpuapp . --build-dir build
VS Code Tasks¶
tasks.json provides:
west: buildwest: pristine build
The VS Code tasks launch west through nrfutil sdk-manager toolchain launch, so they do not need hard-coded SDK bundle paths.
Flash and Debug¶
The nrf54lm20dk eval board has an onboard Segger J-Link debugger. Flashing and debugging are done through VS Code using the Cortex-Debug extension with J-Link.
Prerequisites¶
- Segger J-Link software installed on the host
- Cortex-Debug VS Code extension
Flashing¶
The launch.json configurations build and flash in one step. Select the configuration matching your board's serial number (replace the serial number in launch.json with your own) and start debugging:
Debug (1051811555)— board 1Debug (1051890941)— board 2
Both configurations:
- Build the firmware first (
preLaunchTask: west: build) - Flash via J-Link SWD to the
NRF54LM20A_M33core - Break at
mainon entry - Enable RTT output
To flash without debugging:
Or via J-Link CLI:
JLinkExe -device NRF54LM20A_M33 -if SWD -speed 4000 -AutoErase
J-Link> loadfile build/firmware/zephyr/zephyr.elf
J-Link> r
J-Link> g
J-Link> exit
Serial Console¶
Firmware log output (printk / LOG_*) goes to UART. Use any serial terminal at 115200 baud, or: