Arduino Library for the OpenCR Hardware

Question/Issue:
I have a Project in Edge Impulse, where I added data from the OpenCR through the Data Forwarder. Then I downloaded on the “Deployment” page the Arduino Library. I added the Arduino Library into the Arduino IDE, and opened the example static_buffer. There I put in raw data from the “Live classification” page. But when I upload it, there will come a lot of errors.

Project ID: 254272

Context/Use case:
I know that the Arduino Library is not qualified to be used for the OpenCR. But I have a university project where I need to change the static_buffer example, suitable for the OpenCR. The goal is that the data from the OpenCR will be put into the ML classifications in real time through the Serial Monitor of the Arduino IDE. Can you please help me, as there are no prior research or infos to that on the internet.

Hi @lani274,

I do not have experience with the OpenCR, so I don’t know how much help I’ll be. However, please post the output of the Arduino compilation (including all error messages), and we’ll see if we can help.

Hi,
I already did all these steps with the Arduino Nano 33 BLE Sense at it worked. But I want to do it with the OpenCR.
Here are all the error messages I get from the static_buffer upload with the included Live classficiation data from the Project on the OpenCR Board:

In file included from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/arm_math.h:211:0,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/dsp/numpy.hpp:46,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_model_types.h:24,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_dsp.h:21,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_classifier.h:23,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/OpenCR_data_inferencing.h:50,
from C:\Users\araml\AppData\Local\Temp.arduinoIDE-unsaved2023618-31624-1uqtw8p.729r\static_buffer\static_buffer.ino:18:
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/arm_math_memory.h:75:1: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE q31_t read_q15x2 (
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/arm_math_memory.h:94:1: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE q31_t read_q15x2_ia (
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/arm_math_memory.h:114:1: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE q31_t read_q15x2_da (
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/arm_math_memory.h:135:1: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void write_q15x2_ia (
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/arm_math_memory.h:156:1: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void write_q15x2 (
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/arm_math_memory.h:176:1: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE q31_t read_q7x4_ia (
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/arm_math_memory.h:198:1: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE q31_t read_q7x4_da (
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/arm_math_memory.h:218:1: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void write_q7x4_ia (
^
In file included from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/arm_math.h:213:0,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/dsp/numpy.hpp:46,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_model_types.h:24,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_dsp.h:21,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_classifier.h:23,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/OpenCR_data_inferencing.h:50,
from C:\Users\araml\AppData\Local\Temp.arduinoIDE-unsaved2023618-31624-1uqtw8p.729r\static_buffer\static_buffer.ino:18:
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/none.h:136:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE q31_t clip_q63_to_q31(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/none.h:146:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE q15_t clip_q63_to_q15(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/none.h:156:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE q7_t clip_q31_to_q7(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/none.h:166:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE q15_t clip_q31_to_q15(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/none.h:176:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE q63_t mult32x64(
^
In file included from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/arm_math.h:214:0,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/dsp/numpy.hpp:46,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_model_types.h:24,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_dsp.h:21,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_classifier.h:23,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/OpenCR_data_inferencing.h:50,
from C:\Users\araml\AppData\Local\Temp.arduinoIDE-unsaved2023618-31624-1uqtw8p.729r\static_buffer\static_buffer.ino:18:
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/utils.h:51:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE uint32_t arm_recip_q31(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/utils.h:102:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE uint32_t arm_recip_q15(
^
In file included from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/statistics_functions.h:36:0,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/bayes_functions.h:35,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/arm_math.h:218,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/dsp/numpy.hpp:46,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_model_types.h:24,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_dsp.h:21,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_classifier.h:23,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/OpenCR_data_inferencing.h:50,
from C:\Users\araml\AppData\Local\Temp.arduinoIDE-unsaved2023618-31624-1uqtw8p.729r\static_buffer\static_buffer.ino:18:
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/fast_math_functions.h:196:1: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE arm_status arm_sqrt_f32(
^
In file included from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/arm_math.h:222:0,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/dsp/numpy.hpp:46,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_model_types.h:24,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_dsp.h:21,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_classifier.h:23,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/OpenCR_data_inferencing.h:50,
from C:\Users\araml\AppData\Local\Temp.arduinoIDE-unsaved2023618-31624-1uqtw8p.729r\static_buffer\static_buffer.ino:18:
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/controller_functions.h:268:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE float32_t arm_pid_f32(
^
In file included from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/arm_math.h:222:0,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/dsp/numpy.hpp:46,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_model_types.h:24,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_dsp.h:21,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_classifier.h:23,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/OpenCR_data_inferencing.h:50,
from C:\Users\araml\AppData\Local\Temp.arduinoIDE-unsaved2023618-31624-1uqtw8p.729r\static_buffer\static_buffer.ino:18:
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/controller_functions.h:301:1: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE q31_t arm_pid_q31(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/controller_functions.h:347:1: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE q15_t arm_pid_q15(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/controller_functions.h:436:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void arm_park_f32(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/controller_functions.h:467:1: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void arm_park_q31(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/controller_functions.h:539:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void arm_inv_park_f32(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/controller_functions.h:570:1: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void arm_inv_park_q31(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/controller_functions.h:645:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void arm_clarke_f32(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/controller_functions.h:672:1: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void arm_clarke_q31(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/controller_functions.h:731:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void arm_inv_clarke_f32(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/controller_functions.h:758:1: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void arm_inv_clarke_q31(
^
In file included from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/arm_math.h:228:0,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/dsp/numpy.hpp:46,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_model_types.h:24,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_dsp.h:21,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_classifier.h:23,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/OpenCR_data_inferencing.h:50,
from C:\Users\araml\AppData\Local\Temp.arduinoIDE-unsaved2023618-31624-1uqtw8p.729r\static_buffer\static_buffer.ino:18:
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/filtering_functions.h:2135:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void arm_circularWrite_f32(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/filtering_functions.h:2180:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void arm_circularRead_f32(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/filtering_functions.h:2236:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void arm_circularWrite_q15(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/filtering_functions.h:2280:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void arm_circularRead_q15(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/filtering_functions.h:2337:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void arm_circularWrite_q7(
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/CMSIS/DSP/Include/dsp/filtering_functions.h:2381:3: error: ‘__STATIC_FORCEINLINE’ does not name a type
__STATIC_FORCEINLINE void arm_circularRead_q7(
^
In file included from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_model_types.h:24:0,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_dsp.h:21,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_classifier.h:23,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/OpenCR_data_inferencing.h:50,
from C:\Users\araml\AppData\Local\Temp.arduinoIDE-unsaved2023618-31624-1uqtw8p.729r\static_buffer\static_buffer.ino:18:
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/dsp/numpy.hpp: In static member function ‘static float ei::numpy::sqrt(float)’:
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/dsp/numpy.hpp:75:30: error: ‘arm_sqrt_f32’ was not declared in this scope
arm_sqrt_f32(x, &temp);
^
In file included from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_model_types.h:24:0,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_dsp.h:21,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/classifier/ei_run_classifier.h:23,
from c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/OpenCR_data_inferencing.h:50,
from C:\Users\araml\AppData\Local\Temp.arduinoIDE-unsaved2023618-31624-1uqtw8p.729r\static_buffer\static_buffer.ino:18:
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/dsp/numpy.hpp: In static member function ‘static int ei::numpy::stdev(ei::matrix_t*, ei::matrix_t*)’:
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/dsp/numpy.hpp:1025:35: error: ‘arm_sqrt_f32’ was not declared in this scope
arm_sqrt_f32(var, &std);
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/dsp/numpy.hpp: In static member function ‘static int ei::numpy::skew(ei::matrix_t*, ei::matrix_t*)’:
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/dsp/numpy.hpp:1078:47: error: ‘arm_sqrt_f32’ was not declared in this scope
arm_sqrt_f32(var * var * var, &var);
^
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/dsp/numpy.hpp: In static member function ‘static int ei::numpy::std_axis0_CMSIS(ei::matrix_t*, ei::matrix_t*)’:
c:\Users\araml\Documents\Arduino\libraries\OpenCR_data_inferencing\src/edge-impulse-sdk/dsp/numpy.hpp:1936:35: error: ‘arm_sqrt_f32’ was not declared in this scope
arm_sqrt_f32(var, &std);
^

exit status 1

Compilation error: exit status 1

‘arm_sqrt_f32’ was not declared in this scope

Makes me think that the CMSIS libraries are not linked correctly in the Arduino package for the OpenCR. So, you have a few options:

If you want to find a workaround, I recommend starting with the following: at the top of your code (before you #include the Edge Impulse library), add the following line:

#define EIDSP_USE_CMSIS_DSP 0

See if that reduces the number of errors (especially the CMSIS “not declared in this scope” errors).

I got the static_buffer.ino to compile in Ardy IDE 2.1.1 and VS Code by adding the following line above the #include of the EI Ardy Lib:

#define __STATIC_FORCEINLINE __attribute__((always_inline)) static __inline

I don’t have a physical board to test with but it does compile :slight_smile:

1 Like