Copyright ©

Mongoose OS Forum

ATTENTION! This forum has moved to:

Do not post any new messages.

Building custom library based on arduino-compat: GPO undeclared error

I'm adapting an Arduino library for an Adafruit feather, and I'm down to this error inside Arduino.h (in the deps folder) where GPO and GPE are not declared.

YULC02S32SBG8WN:Adafruit_VS1053 bcouchman$ mos build --local --clean --platform ESP32 | grep error
Error: exit status 2
/Users/bcouchman/Documents/Perso/projects/meeio/electronics/mongooseos/libs/Adafruit_VS1053/deps/arduino-compat/include/Arduino.h:145:58: error: 'GPO' was not declared in this scope
/Users/bcouchman/Documents/Perso/projects/meeio/electronics/mongooseos/libs/Adafruit_VS1053/deps/arduino-compat/include/Arduino.h:146:57: error: 'GPI' was not declared in this scope

The code in Arduino.h that refers to these is
#define portOutputRegister(port) ((volatile uint32_t *) &GPO)
#define portInputRegister(port) ((volatile uint32_t *) &GPI)
#define portModeRegister(port) ((volatile uint32_t *) &GPE)

The only reference I can find for these constants are in that file but it's obviously for ESP8266.
I can't find any reference to these GPO and GPE constants neither in any github for ESP32, nor in the build and deps sections of the project.

...and I'm completely puzzled.

My mos.yml includes these dependencies
- origin:
- origin:
- origin:

I have tried building another very similar existing library ( ) with the same library dependencies (arduino-compat, arduino-spi, arduino-wire)
Building this library returns no errors, and I'm examining every file in both projects trying to understand what I have missed. And I can't find anything.

Did anyone stumble upon this before?


  • Looks like a bug in our arduino compatibility layer. Will let you know once it's fixed (no ETA at the moment)

Sign In or Register to comment.