Fix for compilation error when using arduino-esp32 core v3.x

When using arduino-esp32 core v3.x, the edge impulse model compilation fails with errors of the type:

error: either all initializer clauses should be designated or none of them should be
1789 | .channels = input->dims->data[3],

This is because arduino-core v3.x uses a later vesion of the C++ compiler.

in files conv.cpp and depthwise_conv.cpp modify all data_dims_t struct declarations to remove designators, eg change:

    data_dims_t input_dims =  {
                                .width = input_width, .height = input_height,
                                .channels = input->dims->data[3], 1
                              };

to:

    data_dims_t input_dims =  {
                                input_width, input_height,
                                input->dims->data[3], 1
                              };
1 Like

Hi @cammonitor

Thanks for reporting, let me check with the tech team.

fyi @AIWintermuteAI @Arjan

Best

Eoin

Thanks! We will check it out.

hi @cammonitor !
We don’t claim to support arduino-esp32 core v3.x at the moment, as you can see from this comment our Arduino sketches for ESP32 are tested with 2.0.4.

// These sketches are tested with 2.0.4 ESP32 Arduino Core
// https://github.com/espressif/arduino-esp32/releases/tag/2.0.4

I’ll create an issue internally, meanwhile feel free to use the solution you’ve found!

1 Like