nerdralph / ArduinoShrink

replaces Arduino AVR Core functions with smaller and faster versions
MIT License
130 stars 5 forks source link

multiple definition of digital_pin_to_bit_mask_PGM #9

Closed nerdralph closed 3 years ago

nerdralph commented 3 years ago

ArduinoShrink is not replacing all of the AVR Arduino core functions defined in wiring_digital.c, resulting in multiple definitions of the pin mapping tables in some cases.

nerdralph commented 3 years ago

ArduinoShrink replaces the 3 non-static functions defined in wiring_digital. The issue is due to link order when other libraries are used. ArduinoShrink must be the last library included, as the IDE uses include order to determine link order.

todo: document include order requirement

nerdralph commented 3 years ago

fixed in https://github.com/nerdralph/ArduinoShrink/commit/cdae1ac91108ff99261cdd226114a3f8cc21c543