Instructions for building with a teensy36
board.
Create the out
build directory.
gn gen out --export-compile-commands \ --args=' arduino_board="teensy36" dir_pw_third_party_arduino="//third_party/pigweed/third_party/arduino" arduino_core_name="teensy" pw_arduino_use_test_server=false'
Run the compile.
ninja -C out
Flash blinky.elf
.
arduino_unit_test_runner \ --config out/arduino_debug/gen/arduino_builder_config.json \ --upload-tool teensyloader \ --verbose \ --flash-only \ out/arduino_debug/obj/workshop/01-blinky/bin/blinky.elf
Tail the output with miniterm
, (use Ctrl-]
to quit).
python -m serial.tools.miniterm --raw - 115200
After compiling create/update the log token database.
python -m pw_tokenizer.database create --force \ --database workshop/01-blinky/tokenizer_database.csv \ out/arduino_debug/obj/workshop/01-blinky/blinky.main.cc.o
Flash blinky.elf
and watch the serial output with:
python -m pw_tokenizer.serial_detokenizer \ --device /dev/ttyACM0 --baudrate 115200 \ workshop/01-blinky/tokenizer_database.csv
python -m pw_hdlc_lite.rpc_console -o logfile.txt -d /dev/ttyACM0 \ ./third_party/pigweed/pw_rpc/pw_rpc_protos/echo.proto
tail -F logfile.txt | python -m pw_tokenizer.detokenize \ base64 workshop/01-blinky/tokenizer_database.csv