Need help with Arduino as component for ESP32
Posted: Sun Oct 24, 2021 10:54 pm
I followed the instructions and cannot get Arduino project to compile.
Using latest version of VSCODE, WROOM32 device, esp-idf extension v1.2.0, esp-idf version 4.3
I made changes to setup
- Autostart Arduino
- Disable Mutex locks for HAL
- Set FreeRTOS tick rate to 1000
I get compile errors related to I2C for some reason?
../components/arduino/cores/esp32/esp32-hal-i2c.c:152:22: error: implicit declaration of function 'I2C_LINK_RECOMMENDED_SIZE' [-Werror=implicit-function-declaration]
uint8_t cmd_buff[I2C_LINK_RECOMMENDED_SIZE(1)] = { 0 };
../components/arduino/cores/esp32/esp32-hal-i2c.c:152:56: warning: excess elements in array initializer
uint8_t cmd_buff[I2C_LINK_RECOMMENDED_SIZE(1)] = { 0 };
^
../components/arduino/cores/esp32/esp32-hal-i2c.c:152:56: note: (near initialization for 'cmd_buff')
../components/arduino/cores/esp32/esp32-hal-i2c.c:153:11: error: implicit declaration of function 'i2c_cmd_link_create_static'; did you mean 'i2c_cmd_link_create'? [-Werror=implicit-function-declaration]
cmd = i2c_cmd_link_create_static(cmd_buff, I2C_LINK_RECOMMENDED_SIZE(1));
^~~~~~~~~~~~~~~~~~~~~~~~~~
i2c_cmd_link_create
../components/arduino/cores/esp32/esp32-hal-i2c.c:153:9: warning: assignment to 'i2c_cmd_handle_t' {aka 'void
*'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
cmd = i2c_cmd_link_create_static(cmd_buff, I2C_LINK_RECOMMENDED_SIZE(1));
^
../components/arduino/cores/esp32/esp32-hal-i2c.c:145:9: error: jump into scope of identifier with variably modified type
goto end;
^~~~
../components/arduino/cores/esp32/esp32-hal-i2c.c:174:1: note: label 'end' defined here
end:
^~~
../components/arduino/cores/esp32/esp32-hal-i2c.c:152:13: note: 'cmd_buff' declared here
uint8_t cmd_buff[I2C_LINK_RECOMMENDED_SIZE(1)] = { 0 };
^~~~~~~~
Using latest version of VSCODE, WROOM32 device, esp-idf extension v1.2.0, esp-idf version 4.3
I made changes to setup
- Autostart Arduino
- Disable Mutex locks for HAL
- Set FreeRTOS tick rate to 1000
I get compile errors related to I2C for some reason?
../components/arduino/cores/esp32/esp32-hal-i2c.c:152:22: error: implicit declaration of function 'I2C_LINK_RECOMMENDED_SIZE' [-Werror=implicit-function-declaration]
uint8_t cmd_buff[I2C_LINK_RECOMMENDED_SIZE(1)] = { 0 };
../components/arduino/cores/esp32/esp32-hal-i2c.c:152:56: warning: excess elements in array initializer
uint8_t cmd_buff[I2C_LINK_RECOMMENDED_SIZE(1)] = { 0 };
^
../components/arduino/cores/esp32/esp32-hal-i2c.c:152:56: note: (near initialization for 'cmd_buff')
../components/arduino/cores/esp32/esp32-hal-i2c.c:153:11: error: implicit declaration of function 'i2c_cmd_link_create_static'; did you mean 'i2c_cmd_link_create'? [-Werror=implicit-function-declaration]
cmd = i2c_cmd_link_create_static(cmd_buff, I2C_LINK_RECOMMENDED_SIZE(1));
^~~~~~~~~~~~~~~~~~~~~~~~~~
i2c_cmd_link_create
../components/arduino/cores/esp32/esp32-hal-i2c.c:153:9: warning: assignment to 'i2c_cmd_handle_t' {aka 'void
*'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
cmd = i2c_cmd_link_create_static(cmd_buff, I2C_LINK_RECOMMENDED_SIZE(1));
^
../components/arduino/cores/esp32/esp32-hal-i2c.c:145:9: error: jump into scope of identifier with variably modified type
goto end;
^~~~
../components/arduino/cores/esp32/esp32-hal-i2c.c:174:1: note: label 'end' defined here
end:
^~~
../components/arduino/cores/esp32/esp32-hal-i2c.c:152:13: note: 'cmd_buff' declared here
uint8_t cmd_buff[I2C_LINK_RECOMMENDED_SIZE(1)] = { 0 };
^~~~~~~~