Open lyusupov opened 5 months ago
While I do agree, the system/CH32V30x/SRC/
etc files come from the official WCH SDK. as e.g. posted at https://github.com/openwch/ch32v307/tree/main/EVT/EXAM/SRC. So to change that, you would have to file a change request with WCH, not the Arduino croe.
Build platform
Linux
Core version
current 'main' branch
Target
CH32V30x_EVT
To reproduce
Make an empty sketch like that:
Then try to build it
Expected behavior
'DEBUG' symbol name is too much generic one. It can easily cause namespace conflict with user application or a third-party library.
https://github.com/openwch/arduino_core_ch32/blob/b2c30eef490c189dc5923ae1a562c6574a983e9e/system/CH32V30x/SRC/Debug/debug.h#L28-L31
My suggestion is to use other name ( such as CH32_DEBUG or something similar ) for internal purpose of the Core.
Let's make DEBUG macro to be inactive by default in order to avoid namespace conflicts with other source codes.
A user may set it manually in Arduino IDE or by altering content of 1) boards.txt 2) platform.txt 3) variants folder