Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

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

Hi
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 https://github.com/esp8266/Arduino/blob/master/cores/esp8266/esp8266_peri.h 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: https://github.com/mongoose-os-libs/arduino-compat
- origin: https://github.com/mongoose-os-libs/arduino-wire
- origin: https://github.com/mongoose-os-libs/arduino-spi

I have tried building another very similar existing library ( https://github.com/mongoose-os-libs/arduino-adafruit-pwm-servo ) 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?

Comments

  • 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.