Nordic
How Nordic drivers connect the Nano 33 BLE hardware to Xila.
The Platforms drivers_nordic crate supplies drivers for the nRF52840 used by the Arduino Nano 33 BLE. The board example assembles these drivers into a Xila runtime.
Context
Section titled “Context”The board runs without a host operating system. Its example combines the Nordic executor, memory, and time implementations with internal flash, random number generation, GPIO, and a USB console.
How it works
Section titled “How it works”The following diagram shows how the example connects drivers to its virtual file system (VFS).
The flash block device backs LittleFS at the root. USB standard input passes through the shared terminal input device. Output and error use USB output. GPIO, random, and time devices are mounted separately.
The example mounts GPIO character devices /devices/gpio/d0 through /devices/gpio/d13, /devices/gpio/a0 through /devices/gpio/a7, and led_red, led_green, and led_blue under /devices/gpio/. D13 starts low, so its LED is off. The RGB LEDs are active low and start high, so they are also off.
The USB CDC serial console receives bytes and sends output. Input goes through the shared terminal line editor, which echoes characters, handles line editing and control keys, and commits a line on CR or LF. For its exact behavior, see Shared.
Design choices and trade-offs
Section titled “Design choices and trade-offs”The example formats the flash file system when mounting it fails.
API reference
Section titled “API reference”drivers/nordic: Nordic driver source.-
examples/nano_33_ble/src/firmware.rs: Runtime assembly. examples/nano_33_ble/src/pins.rs: Board pin mappings.-
drivers/shared/src/devices/terminal/logic.rs: Terminal line editor.