pololu / zumo-32u4-arduino-library

Library to help interface with the on-board hardware of the Pololu Zumo 32U4 robot.
https://www.pololu.com/category/170/zumo-32u4-robot
MIT License
66 stars 61 forks source link

Compilation Error on defining IO_E2 #5

Open jsmith2021Brandeis opened 5 years ago

jsmith2021Brandeis commented 5 years ago

This library doesn't compile in my Sloeber Application because LEFT_B isn't defined as a constant image

kevin-pololu commented 5 years ago

Hi,

The pin constant IO_E2 is defined in the FastGPIO library, and in order for that to happen correctly, the program needs to be compiled with the correct processor specified (here is the line in FastGPIO.h that checks for it). Normally, the processor is specified by passing the -mmcu option to avr-g++ (e.g. -mmcu=atmega32u4).

We haven't used Sloeber and are not familiar with it, but could you check that you don't see any previous errors that indicate that FastGPIO.h is not being included properly, and that the ATmega32U4 microcontroller is correctly selected for your project? Could you copy the full avr-g++ command line from the console output (2 lines above the error you highlighted) so we can see if it includes -mmcu=atmega32u4?