guberti commented on a change in pull request #8708:
URL: https://github.com/apache/tvm/pull/8708#discussion_r687096166
##########
File path: apps/microtvm/arduino/host_driven/project.ino
##########
@@ -0,0 +1,34 @@
+#include "src/standalone_crt/include/tvm/runtime/crt/microtvm_rpc_server.h"
+#include "src/standalone_crt/include/tvm/runtime/crt/logging.h"
+#include "src/model.h"
+microtvm_rpc_server_t server;
+
+// Called by TVM to write serial data to the UART.
+ssize_t write_serial(void* unused_context, const uint8_t* data, size_t size) {
+ Serial.write(data, size);
+ return size;
+}
+
+void setup() {
+ server = MicroTVMRpcServerInit(write_serial, NULL);
+ TVMLogf("microTVM Arduino runtime - running");
+ Serial.begin(115200);
Review comment:
There's no universal way to seed the RNG, so I instead added a comment
to `setup` in `project.ino`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]