MCUdude / MightyCore

Arduino hardware package for ATmega1284, ATmega644, ATmega324, ATmega324PB, ATmega164, ATmega32, ATmega16 and ATmega8535
Other
649 stars 182 forks source link

Atmel Studio Failed compiling in expansion of macro round #199

Closed muluyilmaz closed 3 years ago

muluyilmaz commented 3 years ago

After updating to 2.0.7 I got this error at ATmel Studio

arduino.h: 128:89: error: expected ';' before '}' token (long)_x - 0.5 })

MCUdude commented 3 years ago

Thanks for reporting. Are you using the round() function somewhere in your code?

tgidave commented 3 years ago

The same message is being generated during expansion of the "constrain" macro. The DallasTemperature library uses this macro.

Dave

JensGrabner commented 3 years ago

The last Version that work for me is Version 2.0.6 https://github.com/JensGrabner/snc98_Slash-Number-Calculator/tree/master/Software/Arduino/Projekte/snc98

MCUdude commented 3 years ago

The last Version that work for me is Version 2.0.6

What exactly is it that doesn't work since 2.0.6? Have you tried 2.0.8?

JensGrabner commented 3 years ago

28-11-2020 -- avrdude: 106796 bytes of flash written // Version 2.0.6 05-12-2020 -- avrdude: 105644 bytes of flash written // Version 2.0.7 defect Version 2.0.8 have the same effect then Version 2.0.7

I use a lot of global variable -- my project ist not working - i cant say what it is? -- Start is o.k. but when i calculate 1/3 came a difuse display. other compiler - i use the Arduino IDE 1.8.13

MCUdude commented 3 years ago

You have all the changes here: https://github.com/MCUdude/MightyCore/releases

Just look through the commits and revert them on your computer to find out what causes the issue. It might be the new abs() macro.

MCUdude commented 3 years ago

You can try to replace the abs function with the pld implementation:

#define old_abs(x) ((x)>0?(x):-(x))

JensGrabner commented 3 years ago

the main difference in compiling:

===== compare from (<)C:\Users\jens\Documents\2_0_8.txt (46684 Byte) to (>)C:\Users\jens\Documents\2_0_6.txt (47426 Byte)

98,99c98,99 < "\wiring_analog.c" -o "C:\Users\jens\AppData\Local\Temp\arduino_build_80951\core\wiring_analog.c.o" < "\wiring.c" -o "C:\Users\jens\AppData\Local\Temp\arduino_build_80951\core\wiring.c.o"

"\wiring.c" -o "C:\Users\jens\AppData\Local\Temp\arduino_build_80951\core\wiring.c.o" "\wiring_analog.c" -o "C:\Users\jens\AppData\Local\Temp\arduino_build_80951\core\wiring_analog.c.o" 103,105c103,105 < "\CDC.cpp" -o "C:\Users\jens\AppData\Local\Temp\arduino_build_80951\core\CDC.cpp.o" < "\HardwareSerial.cpp" -o "C:\Users\jens\AppData\Local\Temp\arduino_build_80951\core\HardwareSerial.cpp.o" < "\HardwareSerial1.cpp" -o "C:\Users\jens\AppData\Local\Temp\arduino_build_80951\core\HardwareSerial1.cpp.o"

"\HardwareSerial1.cpp" -o "C:\Users\jens\AppData\Local\Temp\arduino_build_80951\core\HardwareSerial1.cpp.o" "\CDC.cpp" -o "C:\Users\jens\AppData\Local\Temp\arduino_build_80951\core\CDC.cpp.o" "\HardwareSerial.cpp" -o "C:\Users\jens\AppData\Local\Temp\arduino_build_80951\core\HardwareSerial.cpp.o"