Can no longer build nano33ble due to mbed compilation issue

Question/Issue:

I’m getting back to this project after a long time (March 2021!).

I can no longer deploy to nano33ble with platformio.

The arduino library builds fine on the ei website and I downloaded it and set it as a library.

The compilation fails here:

Compiling .pio/build/nano33ble/libc1e/laura_skirt_inferencing/edge-impulse-sdk/porting/arduino/ei_classifier_porting.cpp.o                              
Compiling .pio/build/nano33ble/libc1e/laura_skirt_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/activation_functions/esp_nn_relu_ansi.c.o   
Compiling .pio/build/nano33ble/libc1e/laura_skirt_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/activation_functions/esp_nn_relu_s8_esp32s3.
S.o                                                                         
In file included from .pio/libdeps/nano33ble/laura_skirt_inferencing/src/edge-impulse-sdk/porting/espressif/ESP-NN/src/activation_functions/esp_nn_relu_
s8_esp32s3.S:1:
.pio/libdeps/nano33ble/laura_skirt_inferencing/src/edge-impulse-sdk/classifier/ei_classifier_config.h:37:14: fatal error: mbed_version.h: No such file o
r directory

I don’t know why PIO is trying to compile esp or mbed stuff, I’m using the arduino framework.
The platformio setup file is here: https://github.com/mattvenn/laura_skirt/blob/main/firmware/platformio.ini

project repo: GitHub - mattvenn/laura_skirt
ei project: https://studio.edgeimpulse.com/studio/19877

1 Like

I tried with a completely new project in case there was some outdated state in the previous one.
Now I get this error

Compiling .pio/build/nano33ble/libfa7/tester_inferencing/edge-impulse-sdk/CMSIS/DSP/Source/TransformFunctions/arm_cfft_f16.c.o
Compiling .pio/build/nano33ble/libfa7/tester_inferencing/edge-impulse-sdk/CMSIS/DSP/Source/TransformFunctions/arm_cfft_f32.c.o
Compiling .pio/build/nano33ble/libfa7/tester_inferencing/edge-impulse-sdk/CMSIS/DSP/Source/TransformFunctions/arm_cfft_f64.c.o
Compiling .pio/build/nano33ble/libfa7/tester_inferencing/edge-impulse-sdk/CMSIS/DSP/Source/TransformFunctions/arm_cfft_init_f16.c.o
*** [.pio/build/nano33ble/src/nano_ble33_sense_accelerometer_continuous.ino.cpp.o] Error 1
========================= [FAILED] Took 30.54 seconds =========================

not even a proper error message…

I threw out the source and replaced it with the example

.pio/libdeps/nano33ble/tester_inferencing/examples/nano_ble33_sense/nano_ble33_sense_accelerometer_continuous/nano_ble33_sense_accelerometer_continuous.ino

now I’m back to

ompiling .pio/build/nano33ble/libfa7/tester_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/activation_functions/esp_nn_relu_s8_esp32s3.S.o
In file included from .pio/libdeps/nano33ble/tester_inferencing/src/edge-impulse-sdk/porting/espressif/ESP-NN/src/activation_functions/esp_nn_relu_s8_esp32s3.S:1:
.pio/libdeps/nano33ble/tester_inferencing/src/edge-impulse-sdk/classifier/ei_classifier_config.h:37:14: fatal error: mbed_version.h: No such file or directory

github action gets the same error so at least I know this isn’t just my platform causing the issue.

same platformio setup works without edge impulse lib: led test fw · mattvenn/laura_skirt@f6e3444 · GitHub

so I’m now pretty certain that edge impulse arduino library don’t work with platformio for some reason. Next I’ll try with the arduino ide

I tried arduino-cli, which can compile with no errors. It can’t upload, but that’s a different story.
So I think I have a path for deploying again. Will try with the real firmware and impulse.

ok, works. can recompile a new deployment and flash to the nano and it works as before!

1 Like

Welcome bask @mattvenn! We hope you are excited to see all of the features that have been added!

Please share details on the steps you needed to take to recover, if we are missing these steps from the FAQ / Troubleshooting.

I’d be happy to update them so others returning can have a smooth experience.

Best

Eoin

I think this is an issue with platformio and edgeimpulse packaged libraries. I think if I followed the tutorials and used the arduino IDE it would have been fine. I just really don’t like the arduino IDE and have used platformio for years.

1 Like

Hi @mattvenn

You can take a look at our Blues Wireless docs, they use platform io:

Best

Eoin

I opened an issue here: fatal error: mbed_version.h: No such file or directory · Issue #187 · platformio/platform-nordicnrf52 · GitHub

1 Like

Nice work! I can see that they already patched and the issue was resolved: