use public-inbox as mailing list
build: Introduce Makefile
Add .gitignore
This is the source code used for the nRF52840 used in my bachelor thesis.
It is taken verbatim from
https://github.com/zephyrproject-rtos/zephyr/tree/f393e2205c2c71d05dcefeffddc4bc429911e12e/samples/bluetooth/hci_usb.
The only changes made here are to the prj.conf
to allow:
Install the Zephyr toolchain.
After compiling, the output files will be in $(OUTDIR)/zephyr/
in various
formats.
To compile the image using the Makefile use
make
Flashing is done with
make flash FLASH_PORT=/path/to/device
where /path/to/device
is the path the device that should be flashed can be
accessed from, e.g. /dev/ttyACM2
.
The variable FLASH_PORT
can also be set in config.mk
. If set it doesn't need
to be given as a parameter anymore.
Simply invoke the following commands:
cmake -Bbuild -GNinja -DBOARD=nrf52840dongle_nrf52840 .
ninja -Cbuild
west build \
-p always \
-b nrf52840dongle_nrf52840 \
.
To flash the image to the nRF52840 Dongle (the dongle used in my bachelor
thesis), make sure you have
nrfutil
installed.
First, generate the required zip
file from the compiled hex
one:
nrfutil pkg generate \
--hw-version 52 \
--sd-req=0x00 \
--application build/zephyr/zephyr.hex \
--application-version 1 \
hci_usb.zip
Then, flash that to the board (assumed to be connected to /dev/ttyACM0
, please
check before flashing):
nrfutil dfu usb-serial \
--package hci_usb.zip \
-p /dev/ttyACM0
Send patches and questions to ~witcher/public-inbox@lists.sr.ht.
Instructions for preparing a patch are available at git-send-email.io.