Error: "mbed_version.h" no such file or directory

I recently created a new model for on the Arduino Nano RP2040 Connect, and while running this with PlatformIO using the imported Arduino library for my model, I keep getting the following error:

Compiling .pio\build\nanorp2040connect\lib7dd\newkeyword_inferencing\edge-impulse-sdk\porting\arduino\ei_classifier_porting.cpp.o
Compiling .pio\build\nanorp2040connect\lib7dd\newkeyword_inferencing\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_ansi.c.o
In file included from lib\newkeyword_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_ansi.c:1:
lib\newkeyword_inferencing\src/edge-impulse-sdk/classifier/ei_classifier_config.h:56:17: note: #pragma message: CMSIS-NN enabled, but neither __ARM_FEATURE_DSP nor __ARM_FEATURE_MVE defined. Falling back.
56 | #pragma message(
| ^~~~~~~
Compiling .pio\build\nanorp2040connect\lib7dd\newkeyword_inferencing\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S.o
In file included from lib\newkeyword_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:1:
lib\newkeyword_inferencing\src/edge-impulse-sdk/classifier/ei_classifier_config.h:37:14: fatal error: mbed_version.h: No such file or directory

I am not sure why it is even trying to compile anything in the espressif folder under porting, instead of arduino.

I built a model a few months ago the exact same way without getting this error.

Project ID: 344100

Hi @heeirthan

You will need to update our SDK if it has been a number of months as changes have been made to some of the operations etc over this time:

  • Update the Edge Impulse SDK: Make sure that the Edge Impulse SDK in your project is up-to-date. Edge Impulse frequently updates its SDK to include bug fixes, new features, and improvements in compatibility with various development boards and environments.

  • Update the Edge Impulse CLI: Similarly, update the Edge Impulse CLI tool to the latest version. The CLI tool is essential for various tasks, including data uploading, project management, and deploying machine learning models. A newer version might include necessary changes that align with the updates in the SDK.
    To update the Edge Impulse CLI, you can run the following command in your terminal:
    npm update -g edge-impulse-cli

Please share the guide you followed for the PlatformIO setup and I will update it, or make sure our community is aware if this has not already been updated. Thanks!

Best

Eoin

I will get a similar error (fatal error: mbed_version.h: No such file or directory) with Arduino Nano 33 BLE and PlatformIO.
My code is on GitHub

It compiles on Arduino but not on PlatformIO.

Full log:

Processing nano33ble (platform: nordicnrf52; board: nano33ble; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf52/nano33ble.html
PLATFORM: Nordic nRF52 (10.2.0) > Arduino Nano 33 BLE
HARDWARE: NRF52840 64MHz, 256KB RAM, 960KB Flash
DEBUG: Current (blackmagic) External (blackmagic, cmsis-dap, jlink)
PACKAGES: 
 - framework-arduino-mbed @ 4.0.6 
 - tool-sreccat @ 1.164.0 (1.64) 
 - toolchain-gccarmnoneeabi @ 1.80201.181220 (8.2.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 44 compatible libraries
Scanning dependencies...
Dependency Graph
|-- Arduino_OV767X @ 0.0.2
|-- Nano_33_BLE_Person_Sensor_inferencing @ 1.0.5
|-- Wire
Building in release mode
Compiling .pio/build/nano33ble/src/main.cpp.o
Compiling .pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/activation_functions/esp_nn_relu_s8_esp32s3.S.o
In file included from lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/porting/espressif/ESP-NN/src/activation_functions/esp_nn_relu_s8_esp32s3.S:1:
lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/classifier/ei_classifier_config.h:37:14: fatal error: mbed_version.h: No such file or directory

**********************************************************************
* Looking for mbed_version.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:mbed_version.h"
* Web  > https://registry.platformio.org/search?q=header:mbed_version.h
*
**********************************************************************

     #include "mbed_version.h"
              ^~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/basic_math/esp_nn_add_s8_esp32s3.S.o
In file included from lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/porting/espressif/ESP-NN/src/basic_math/esp_nn_add_s8_esp32s3.S:1:
lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/classifier/ei_classifier_config.h:37:14: fatal error: mbed_version.h: No such file or directory

**********************************************************************
* Looking for mbed_version.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:mbed_version.h"
* Web  > https://registry.platformio.org/search?q=header:mbed_version.h
*
**********************************************************************

     #include "mbed_version.h"
              ^~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/basic_math/esp_nn_mul_s8_esp32s3.S.o
In file included from lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/porting/espressif/ESP-NN/src/basic_math/esp_nn_mul_s8_esp32s3.S:1:
lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/classifier/ei_classifier_config.h:37:14: fatal error: mbed_version.h: No such file or directory

**********************************************************************
* Looking for mbed_version.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:mbed_version.h"
* Web  > https://registry.platformio.org/search?q=header:mbed_version.h
*
**********************************************************************

     #include "mbed_version.h"
              ^~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/common/esp_nn_common_functions_esp32s3.S.o
Compiling .pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/common/esp_nn_multiply_by_quantized_mult_esp32s3.S.o
In file included from lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/porting/espressif/ESP-NN/src/common/esp_nn_common_functions_esp32s3.S:1:
lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/classifier/ei_classifier_config.h:37:14: fatal error: mbed_version.h: No such file or directory

**********************************************************************
* Looking for mbed_version.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:mbed_version.h"
* Web  > https://registry.platformio.org/search?q=header:mbed_version.h
*
**********************************************************************

     #include "mbed_version.h"
              ^~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/common/esp_nn_multiply_by_quantized_mult_ver1_esp32s3.S.o
In file included from lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/porting/espressif/ESP-NN/src/common/esp_nn_multiply_by_quantized_mult_esp32s3.S:1:
lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/classifier/ei_classifier_config.h:37:14: fatal error: mbed_version.h: No such file or directory

**********************************************************************
* Looking for mbed_version.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:mbed_version.h"
* Web  > https://registry.platformio.org/search?q=header:mbed_version.h
*
**********************************************************************

     #include "mbed_version.h"
              ^~~~~~~~~~~~~~~~
compilation terminated.
In file included from lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/porting/espressif/ESP-NN/src/common/esp_nn_multiply_by_quantized_mult_ver1_esp32s3.S:1:
lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/classifier/ei_classifier_config.h:37:14: fatal error: mbed_version.h: No such file or directory

**********************************************************************
* Looking for mbed_version.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:mbed_version.h"
* Web  > https://registry.platformio.org/search?q=header:mbed_version.h
*
**********************************************************************

     #include "mbed_version.h"
              ^~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/convolution/esp_nn_conv_s16_mult4_1x1_esp32s3.S.o
Compiling .pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/convolution/esp_nn_conv_s16_mult8_esp32s3.S.o
In file included from lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/porting/espressif/ESP-NN/src/convolution/esp_nn_conv_s16_mult4_1x1_esp32s3.S:1:
lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/classifier/ei_classifier_config.h:37:14: fatal error: mbed_version.h: No such file or directory

**********************************************************************
* Looking for mbed_version.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:mbed_version.h"
* Web  > https://registry.platformio.org/search?q=header:mbed_version.h
*
**********************************************************************

     #include "mbed_version.h"
              ^~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/convolution/esp_nn_conv_s8_filter_aligned_input_padded_esp32s3.S.o
In file included from lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/porting/espressif/ESP-NN/src/convolution/esp_nn_conv_s16_mult8_esp32s3.S:1:
lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/classifier/ei_classifier_config.h:37:14: fatal error: mbed_version.h: No such file or directory

**********************************************************************
* Looking for mbed_version.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:mbed_version.h"
* Web  > https://registry.platformio.org/search?q=header:mbed_version.h
*
**********************************************************************

     #include "mbed_version.h"
              ^~~~~~~~~~~~~~~~
compilation terminated.
In file included from lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/porting/espressif/ESP-NN/src/convolution/esp_nn_conv_s8_filter_aligned_input_padded_esp32s3.S:1:
lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/classifier/ei_classifier_config.h:37:14: fatal error: mbed_version.h: No such file or directory

**********************************************************************
* Looking for mbed_version.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:mbed_version.h"
* Web  > https://registry.platformio.org/search?q=header:mbed_version.h
*
**********************************************************************

     #include "mbed_version.h"
              ^~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/convolution/esp_nn_conv_s8_mult8_1x1_esp32s3.S.o
*** [.pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/activation_functions/esp_nn_relu_s8_esp32s3.S.o] Error 1
Compiling .pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/convolution/esp_nn_depthwise_conv_ansi.c.o
In file included from lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/porting/espressif/ESP-NN/src/convolution/esp_nn_conv_s8_mult8_1x1_esp32s3.S:1:
lib/Nano_33_BLE_Person_Sensor_inferencing/src/edge-impulse-sdk/classifier/ei_classifier_config.h:37:14: fatal error: mbed_version.h: No such file or directory

**********************************************************************
* Looking for mbed_version.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:mbed_version.h"
* Web  > https://registry.platformio.org/search?q=header:mbed_version.h
*
**********************************************************************

     #include "mbed_version.h"
              ^~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/basic_math/esp_nn_add_s8_esp32s3.S.o] Error 1
*** [.pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/basic_math/esp_nn_mul_s8_esp32s3.S.o] Error 1
*** [.pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/common/esp_nn_common_functions_esp32s3.S.o] Error 1
*** [.pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/common/esp_nn_multiply_by_quantized_mult_esp32s3.S.o] Error 1
*** [.pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/common/esp_nn_multiply_by_quantized_mult_ver1_esp32s3.S.o] Error 1
*** [.pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/convolution/esp_nn_conv_s16_mult4_1x1_esp32s3.S.o] Error 1
*** [.pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/convolution/esp_nn_conv_s16_mult8_esp32s3.S.o] Error 1
*** [.pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/convolution/esp_nn_conv_s8_filter_aligned_input_padded_esp32s3.S.o] Error 1
*** [.pio/build/nano33ble/lib7a1/Nano_33_BLE_Person_Sensor_inferencing/edge-impulse-sdk/porting/espressif/ESP-NN/src/convolution/esp_nn_conv_s8_mult8_1x1_esp32s3.S.o] Error 1
src/main.cpp: In function 'void resizeImage(int, int, uint8_t*, int, int, uint8_t*, int)':
src/main.cpp:363:32: warning: unused variable 'r10' [-Wunused-variable]
             uint32_t r00, r01, r10, r11, g00, g01, g10, g11, b00, b01, b10, b11;
                                ^~~
src/main.cpp:363:37: warning: unused variable 'r11' [-Wunused-variable]
             uint32_t r00, r01, r10, r11, g00, g01, g10, g11, b00, b01, b10, b11;
                                     ^~~
src/main.cpp:363:52: warning: unused variable 'g10' [-Wunused-variable]
             uint32_t r00, r01, r10, r11, g00, g01, g10, g11, b00, b01, b10, b11;
                                                    ^~~
src/main.cpp:363:57: warning: unused variable 'g11' [-Wunused-variable]
             uint32_t r00, r01, r10, r11, g00, g01, g10, g11, b00, b01, b10, b11;
                                                         ^~~
src/main.cpp:363:72: warning: unused variable 'b10' [-Wunused-variable]
             uint32_t r00, r01, r10, r11, g00, g01, g10, g11, b00, b01, b10, b11;
                                                                        ^~~
src/main.cpp:363:77: warning: unused variable 'b11' [-Wunused-variable]
             uint32_t r00, r01, r10, r11, g00, g01, g10, g11, b00, b01, b10, b11;
                                                                             ^~~
src/main.cpp:313:19: warning: unused variable 'tx' [-Wunused-variable]
     int x, y, ty, tx;
                   ^~
src/main.cpp: In function 'int calculate_resize_dimensions(uint32_t, uint32_t, uint32_t*, uint32_t*, bool*)':
src/main.cpp:754:56: warning: variable length array 'list' is used [-Wvla]
     const ei_device_resize_resolutions_t list[list_size] = { {42,32}, {128,96} };