JoaoLopesF / SerialDebug

Improved serial debug and simple software debugger to Arduino. With debug levels, see/change global variables, call functions, watches, and more.
MIT License
244 stars 39 forks source link

SerialDebug.cpp Missing include #3

Closed wd5gnr closed 5 years ago

wd5gnr commented 5 years ago

SerialDebug.cpp lacks stdarg.h header which makes it fail to compile.

JoaoLopesF commented 5 years ago

Hi @wd5gnr, any questions:

Just to me reproduce the error

wd5gnr commented 5 years ago

Compile with Arduino 1.8.5 for ARM board. I am under Linux but that shouldn't matter.

If you previously included varargs.h that has been deprecated and you must use stdarg.h now. Didn't check if that was the problem but adding stdarg.h under arduino.h fixes it.

JoaoLopesF commented 5 years ago

Yes, thanks for response. I just testing in Linux Mint and Arduino Mega, I do any tests with Due (ARM too) Is only this #include thst need "include" ?

wd5gnr commented 5 years ago

Yes I have it working on an Uno and a Vidor MK4000 with the two changes (Arduino.h in 3 files and stdarg.h in this file.

JoaoLopesF commented 5 years ago

Linux Mint, Arduino 1.8.7 and Due, compile ok, not need that include. Maybe it is due Arduino 1.8.5. I will put it in SerialDebug.cpp. Please try it, before I relase new version:

/////// Includes

include

ifndef _STDARG_H // To avoid error in Arduino IDE 1.8.5 and linux - thanks to @wd5gnr

#include <stdarg.h>

endif

wd5gnr commented 5 years ago

Works fine here. I wonder what gcc 1.8.7 uses? 1.8.5 uses 5.4.1 for arm-none-eabi.

JoaoLopesF commented 5 years ago

Good, I just finish the update, please close it if always ok. Thanks for post this issue.

JoaoLopesF commented 5 years ago

Arduino 1.8.7 for Due in my Linux, appears using 4.8.3. It can be for MKR, has new gcc.