Skip to content

ARDUINO_MAIN defined on wrong place #199

@martinstingl

Description

@martinstingl

I tried to compile the Arduino Core to a static library for an ATmega328p.
In order to do that I excluded the main.cpp from the build.
Compiling gives an error because DDRA etc. is not defined (there is no Port A on an ATmega328p).

The problem is that ARDUINO_MAIN is always defined in wiring_digital.c which leads to errors with pins_arduino.h because &DDRA etc. cannot be found.

Wouldn't it be better to move the line #define ARDUINO_MAIN to main.cpp?

Metadata

Metadata

Assignees

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