The fancy-node
device can be programmed either using an STLink, or via USB port. To program via USB, you must first install [stm32loader] using pip (pip install stm32loader
). You may also need to pass the port (typically /dev/ttyUSB0
), e.g. pio run -e fancy-node-usb -t upload --upload-port /dev/ttyUSB0
.
Both node
and fancy-node
support reading the DeviceDescription
from flash. The modes are defined by the DeviceMode
enum within DeviceDescription.hpp
. They work as follows:
CURRENT_FROM_HEADER
: use thecurrent
device defined inDevices.hpp
READ_FROM_FLASH
: read the device saved in flash, if present. If not present (determined by the validity ofcheck_value
), fall back tocurrent
.WRITE_TO_FLASH
: writecurrent
to flash, and then use it. This will only write the device to flash if it is different, to avoid causing flash wear.