README.rst
1This demo shows a simple Renode-ArduinoIDE integration.
2
3It sets up the simulation, preparing the platform and loading
4samples into the sensor's buffer and waits for ArduinoIDE to
5load the binary.
6
7Currently the setup is prepared for a patched TensorFlow Lite magic_wand
8sample compiled for the Arduino NANO 33 BLE platform.
9
10The patch changes the UART output device from the default USB serial
11(not currently supported in Renode) to the hardware UART0.
12In order to do that, modify the `debug_log.cpp` file located in
13the `Arduino/libraries/Arduino_TensorFlowLite/src/tensorflow/lite/micro/arduino` directory
14and define `DEBUG_SERIAL_OBJECT` as `Serial1` (instead of `Serial`), e.g. with the following command::
15
16 sed -i'' '/#define DEBUG_SERIAL_OBJECT/s/(Serial)/(Serial1)/' ~/Arduino/libraries/Arduino_TensorFlowLite/src/tensorflow/lite/micro/arduino/debug_log.cpp
17
18With this change, you should see the following output on uart0 when running the simulation::
19
20 bytes lost due to alignment. To avoid this loss, please make sure the tensor_arena is 16 bytes aligned.
21 Magic starts!
22 RING:
23 *
24 * *
25 * *
26 * *
27 * *
28 * *
29 *
30