AmbiqAI / neuralSPOT

NeuralSPOT is Ambiq's AI SDK and Toolkit
https://ambiq.com
BSD 3-Clause "New" or "Revised" License
24 stars 6 forks source link

[RPC, ubuntu] basic_tf_stub example #154

Open poyupaulchen opened 6 months ago

poyupaulchen commented 6 months ago

-Platform: apollo4p -os : ubuntu I tried the basic_tf_stub example on ubuntu for checking whether PRC is working. I followed the instruction // #define RPC_ENABLED in basic_tf_stub.cc and uncomment it and compile it. It seems not working.

  1. NS_USB1_PRESENT below seems not existing. https://github.com/AmbiqAI/neuralSPOT/blob/696a2cd9a8262f40676695650f1bbdbb8b61da69/examples/basic_tf_stub/src/basic_tf_stub.cc#L15-L17
  2. After I did make deploy, I can not find the ttyACM0 or ttyACM1. Usually, I can find it as below
    poyupaulchen@paul:~/Documents/esc/evb$ ls -la /dev/serial/by-id
    total 0
    drwxr-xr-x 2 root root 80 Feb 28 17:26 .
    drwxr-xr-x 4 root root 80 Feb 28 16:42 ..
    lrwxrwxrwx 1 root root 13 Feb 28 16:42 usb-SEGGER_J-Link_000900030197-if00 -> ../../ttyACM0
    lrwxrwxrwx 1 root root 13 Feb 28 17:26 usb-TinyUSB_TinyUSB_Device_123456-if00 -> ../../ttyACM1
poyupaulchen commented 6 months ago

Update: It works now after I rewrite from https://github.com/AmbiqAI/neuralSPOT/blob/696a2cd9a8262f40676695650f1bbdbb8b61da69/examples/basic_tf_stub/src/basic_tf_stub.cc#L15-L17

to

#define NS_USB1_PRESENT
#ifdef NS_USB1_PRESENT
#include "ns_rpc_generic_data.h"
size_t ucHeapSize = 8192;
extern uint8_t ucHeap[8192];
#define RPC_ENABLED 
#endif