Skip to content

Compiler warning for Arduino NG or older (ATmega8 only). Warning: PE redefined #148

Open
@MCUdude

Description

@MCUdude

While compiling code for the ATmega8 with compiler warnings turned on, I get this error every time I compile. PE is already defined in the iom8.h file, but gets redefined in the Arduino.h file. This, but itself isn't a problem. The problem (?) appears in the HardwareSerial_private.h file, where the redefined PE value us used:
#if !defined(UPE) && defined(PE)
#define UPE PE
#endif

Should the PE value be defined 2 or 5 for ATmega8?

Compiler warning:

n file included from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/wiring_private.h:33:0,
from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/wiring_digital.c:28:
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:187:0: warning: "PE" redefined [enabled by default]
#define PE 5
^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:350:0,
from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/wiring_private.h:28,
from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/wiring_digital.c:28:
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/iom8.h:534:0: note: this is the location of the previous definition
#define PE 2
^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions