Open clouds56 opened 3 years ago
I have a similar issue that your suggested solution/PR would also fix. The current logic doesn't pass the -mmcu option to the compiler like "-mmcu=atmega328p" which drives the defines in avr/io.h such as PORTB, etc..
Now I have arduino with "-std=gnu++11", but the cocopa result override defines with
__cplusplus=199711L
, which expects to be__cplusplus=201103L
. I think we should passresult.options
here to get correct result https://github.com/elektronikworkshop/cocopa/blob/ce125785574735b777e2a40bad0e85dd41580692/src/Parser.ts#L127