仿真平台内核初版 -tlib库 包含<sparc arm riscv powerPC>
This commit is contained in:
29
scripts/complex/arduino_nano/README.rst
Normal file
29
scripts/complex/arduino_nano/README.rst
Normal file
@@ -0,0 +1,29 @@
|
||||
This demo shows a simple Renode-ArduinoIDE integration.
|
||||
|
||||
It sets up the simulation, preparing the platform and loading
|
||||
samples into the sensor's buffer and waits for ArduinoIDE to
|
||||
load the binary.
|
||||
|
||||
Currently the setup is prepared for a patched TensorFlow Lite magic_wand
|
||||
sample compiled for the Arduino NANO 33 BLE platform.
|
||||
|
||||
The patch changes the UART output device from the default USB serial
|
||||
(not currently supported in Renode) to the hardware UART0.
|
||||
In order to do that, modify the `debug_log.cpp` file located in
|
||||
the `Arduino/libraries/Arduino_TensorFlowLite/src/tensorflow/lite/micro/arduino` directory
|
||||
and define `DEBUG_SERIAL_OBJECT` as `Serial1` (instead of `Serial`), e.g. with the following command::
|
||||
|
||||
sed -i'' '/#define DEBUG_SERIAL_OBJECT/s/(Serial)/(Serial1)/' ~/Arduino/libraries/Arduino_TensorFlowLite/src/tensorflow/lite/micro/arduino/debug_log.cpp
|
||||
|
||||
With this change, you should see the following output on uart0 when running the simulation::
|
||||
|
||||
bytes lost due to alignment. To avoid this loss, please make sure the tensor_arena is 16 bytes aligned.
|
||||
Magic starts!
|
||||
RING:
|
||||
*
|
||||
* *
|
||||
* *
|
||||
* *
|
||||
* *
|
||||
* *
|
||||
*
|
||||
@@ -0,0 +1,16 @@
|
||||
using sysbus
|
||||
logLevel 3
|
||||
|
||||
mach create
|
||||
machine LoadPlatformDescription @platforms/boards/arduino_nano_33_ble.repl
|
||||
|
||||
showAnalyzer uart0
|
||||
|
||||
twi0.lsm9ds1_imu MaxFifoDepth 2
|
||||
twi0.lsm9ds1_imu FeedAccelerationSample $ORIGIN/../../../tests/peripherals/circle_rotated.data
|
||||
|
||||
emulation CreateUSBIPServer
|
||||
host.usb CreateArduinoLoader cpu 0x10000 0 "arduinoLoader"
|
||||
|
||||
echo "Now load the TensorFlow Lite magic_wand sample compiled for Arduino NANO 33 BLE using Arduino IDE..."
|
||||
arduinoLoader WaitForBinary 120 True
|
||||
Reference in New Issue
Block a user