Solved:
-
I2C compilation issue:
I fixed the issue with I2C (‘OLED display’):
Strange enough SDA and SCL are not defined in the Arduino-embed core.
I used definitions I2C_SDA and I2C_SCL instead which are defined in the BSP but they could not be resolved during compilation. I now use the PIN_WIRE_SDA and PIN_WIRE_SCL definitions instead which works fine:
#ifndef SDA
#define SDA PIN_WIRE_SDA
#endif
#ifndef SCL
#define SCL PIN_WIRE_SCL
#endif
-
Compilation issues caused by include file named “pico.h”
My other issues with Arduino framework and Raspberry Pi Pico have also been solved:
I got many errors during compilation of which I did not understand what was causing them. It appeared to be an include file in my application called
pico.h
with include guard#ifndef PICO_H_
. It turned out that the Arduino-embed core uses an include file with exactly the same name and same header guard.
Changing only the name of my header guard proved to be insufficient, even while I explicitly included mypico.h
file from a specific folder. I had to rename my ownpico.h
include file to something else (and rename the header guard accordingly).
After this my problem was solved and the code compiled successfully.