
* tock: use native time getter, remove globals Tock has direct support for querying time. The prior `millis()` method here replicated the same functionality, but missed some corner case concerns around overflow/wrapping. Instead, just use the native Tock time getter method. This also removes unneeded global variables and methods. * NonArduino/Tock: Update to latest libtock-c Update to the latest libtock-c commit. libtock-c now includes a libtockHal.h, so we can use that instead of the version here. Signed-off-by: Alistair Francis <alistair@alistair23.me> --------- Signed-off-by: Alistair Francis <alistair@alistair23.me> Co-authored-by: Pat Pannuto <pat.pannuto@gmail.com>
1.3 KiB
RadioLib as Tock application
Tock is an embedded operating system designed for running multiple concurrent, mutually distrustful applications on Cortex-M and RISC-V based embedded platforms.
RadioLib can be built as a Tock application using libtock-c. This is an example of running RadioLib as a Tock application.
This has been tested on the [SparkFun LoRa Thing Plus - expLoRaBLE board] (https://github.com/tock/tock/tree/master/boards/apollo3/lora_things_plus) but will work on any LoRa compatible Tock board (currently only the expLoRaBLE board).
libtock-c by default is bulit for RISC-V and ARM. RadioLib is also built
for both architectures by default. You can skip the RISC-V RadioLib build
by setting the SKIP_RISCV
varaible.
The RadioLib example can be built with:
$ git clone https://github.com/jgromes/RadioLib.git
$ cd RadioLib/examples/NonArduino/Tock/
$ git clone https://github.com/tock/libtock-c.git
$ cd libtock-c; git checkout c0202f9ab78da4a6e95f136cf5250701e3778f63; cd ../
$ LIBTOCK_C_DIRECTORY="$(pwd)/libtock-c" ./build.sh
Then in the Tock repo you can flash the kernel and app with:
$ make flash; APP=RadioLib/examples/NonArduino/Tock/build-arm/tock-sx1261.tbf make flash-app