This folder contains an example of using defmt-bbq
over the nRF52's USB CDC ACM Serial Port.
This example is designed to work on the nRF52840-DK, but could probably run on other nRF52840, or any usb-device implementations.
- Connect both USB ports of the nrf52840-dk
- From one terminal, move to the
nrf52840-usb-serial
folder. Run this project withcargo run --release
. You will not get logging output in this window - From another terminal, move to the
bbq-demo-print
folder. Start the program withcargo run -- -e ../nrf52840-usb-serial/target/thumbv7em-none-eabihf/release/nrf52840-usb-serial
.
In the nrf52840-usb-serial
terminal, you should see something like:
➜ nrf52840-usb-serial git:(main) ✗ cargo run --release
Compiling nrf52840-usb-serial v0.1.0 (/home/james/personal/defmt-bbq/examples/nrf52840-usb-serial)
Finished release [optimized + debuginfo] target(s) in 1.45s
Running `probe-run --chip nRF52840_xxAA target/thumbv7em-none-eabihf/release/nrf52840-usb-serial`
(HOST) WARN (BUG) location info is incomplete; it will be omitted from the output
(HOST) INFO flashing program (5 pages / 20.00 KiB)
(HOST) INFO success!
RTT logs not available; blocking until the device halts..
────────────────────────────────────────────────────────────────────────────────
In the bbq-demo-print
terminal, you should see something like:
➜ bbq-demo-print git:(main) ✗ cargo run -- -e ../nrf52840-usb-serial/target/thumbv7em-none-eabihf/release/nrf52840-usb-serial
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Running `target/debug/bbq-demo-print -e ../nrf52840-usb-serial/target/thumbv7em-none-eabihf/release/nrf52840-usb-serial`
Ding! - 2000
Ding! - 3000
Ding! - 4000
Ding! - 5000
Ding! - 6000
Ding! - 7000
Ding! - 8000
Ding! - 9000