I would like to take this a step further and also run preprocessing code that can be added to Edge Impulse projects ("DSP block"), not just the tflite model. Edge Impulse offers to export the complete inference code (DSP and model processing) as a C++ library - optimised for embedded devices. Details see https://docs.edgeimpulse.com/docs/run-inference/cpp-library/deploy-your-model-as-a-c-library .
My question is: What is the easiest way to make a C/C++ library available in Espruino? I read in the Espruino docs that Inline C is available, also recompiling the firmware, but somehow I do not understand what the steps are (or if it is even feasible). Maybe there is an example of how to add a custom C/C++ library to Espruino that I could follow?
I am also not sure how to call functions/methods exposed by such a library. Using Inline C, or do I need to write a JS wrapper?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I was inspired by this (https://www.espruino.com/Bangle.js+EdgeImpulse) project, running tflite models from Edge Impulse on my Bangle.js 2 watch.
I would like to take this a step further and also run preprocessing code that can be added to Edge Impulse projects ("DSP block"), not just the tflite model. Edge Impulse offers to export the complete inference code (DSP and model processing) as a C++ library - optimised for embedded devices. Details see https://docs.edgeimpulse.com/docs/run-inference/cpp-library/deploy-your-model-as-a-c-library .
My question is: What is the easiest way to make a C/C++ library available in Espruino? I read in the Espruino docs that Inline C is available, also recompiling the firmware, but somehow I do not understand what the steps are (or if it is even feasible). Maybe there is an example of how to add a custom C/C++ library to Espruino that I could follow?
I am also not sure how to call functions/methods exposed by such a library. Using Inline C, or do I need to write a JS wrapper?
Any thoughts are highly appreciated! :-)