I don't understand this compile error

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
GuyBooth
 
Posts: 32
Joined: Wed Sep 08, 2021 3:56 pm

I don't understand this compile error

Post by GuyBooth »

I have some fairly complex code which I developed on an Itsy Bitsy Express M0. It compiles cleanly for that board.
I believe it should also compile cleanly for the Itsy Bitsy 32u4 5V board, but when I first open the file and compile it, it get the following error (in red):

Code: Select all

In file included from I:\Arduino\Sketchbook\libraries\VL53L1X_ULD\src\platform\VL53L1X_i2ccoms.h:11:0,
                 from I:\Arduino\Sketchbook\libraries\VL53L1X_ULD\src\platform\VL53L1X_i2ccoms.cpp:1:
C:\Users\Guy\AppData\Local\Arduino15\packages\adafruit\hardware\avr\1.4.15\libraries\Wire/Wire.h: In function 'int8_t i2c_read_multi(uint8_t, uint16_t, uint8_t*, uint32_t)':
C:\Users\Guy\AppData\Local\Arduino15\packages\adafruit\hardware\avr\1.4.15\libraries\Wire/Wire.h:69:13: note: candidate 1: uint8_t TwoWire::requestFrom(int, int)
     uint8_t requestFrom(int, int);
             ^~~~~~~~~~~
C:\Users\Guy\AppData\Local\Arduino15\packages\adafruit\hardware\avr\1.4.15\libraries\Wire/Wire.h:67:13: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t)
     uint8_t requestFrom(uint8_t, uint8_t);
This is followed by (in white):

Code: Select all

Sketch uses 23924 bytes (83%) of program storage space. Maximum is 28672 bytes.
Global variables use 2552 bytes of dynamic memory.
When I compile it a second time without closing the file, the errors in red don't appear, and I simply get the messages in white.

^~~~~~~~~~~
The VL53L1X_ULD library is for the VL53L1X sensor, which calls the Wire library from the Arduino15 packages.

I don't understand if this is an error, or a warning of some kind. I would ignore it ( :) ) except that the program doesn't run on the Itsy Bitsy 32u4 board - it locks it up - but I don't know if the message is a relevant factor or not.
Any pointers to help resolve this would be appreciated.

User avatar
dastels
 
Posts: 15658
Joined: Tue Oct 20, 2015 3:22 pm

Re: I don't understand this compile error

Post by dastels »

This is just a warning. The M0 core is a 32-bit CPU, so its compiler doesn't seem to consider them ambiguous. However, the AVR core in the 32u4 is an 8-bit CPU which uses a different compiler which, apparently, does consider them ambiguous. The reason you only see it the first time is that compiled libraries get cached and subsequent builds use the already compiled binary form of the library.

I've never seen that message before... so no idea what it's for.

I think your problem on the 32u4 is:

Code: Select all

Global variables use 2552 bytes of dynamic memory.
The 32u4 only has 2560 bytes of RAM (i.e. dynamic memory). It simply doesn't have enough RAM to run your program.

Dave

User avatar
GuyBooth
 
Posts: 32
Joined: Wed Sep 08, 2021 3:56 pm

Re: I don't understand this compile error

Post by GuyBooth »

Thanks for the insight Dave.

Locked
Please be positive and constructive with your questions and comments.

Return to “Itsy Bitsy Boards”