/home/runner/.platformio/packages/framework-arduino-openwch-ch32/cores/arduino/HardwareTimer.cpp:73:18: error: 'TIM2_IRQn' was not declared in this scope
NVIC_EnableIRQ(TIM2_IRQn);
^~~~~~~~~
/home/runner/.platformio/packages/framework-arduino-openwch-ch32/cores/arduino/HardwareTimer.cpp:73:18: note: suggested alternative: 'TIM3_IRQn'
NVIC_EnableIRQ(TIM2_IRQn);
^~~~~~~~~
TIM3_IRQn
This is because the CH32X035 does define TIM2_BASE macro but doesn't have a TIM2_IRQn interrupt.
The lines
https://github.com/openwch/arduino_core_ch32/blob/c40c5c8095060c523e635b99426314fab56fe12c/cores/arduino/HardwareTimer.cpp#L72-L74
fail to compile when selecting a CH32X035 board.
This is because the CH32X035 does define
TIM2_BASE
macro but doesn't have aTIM2_IRQn
interrupt.https://github.com/openwch/arduino_core_ch32/blob/c40c5c8095060c523e635b99426314fab56fe12c/system/CH32X035/SRC/Peripheral/inc/ch32x035.h#L575-L576
It has these though
https://github.com/openwch/arduino_core_ch32/blob/c40c5c8095060c523e635b99426314fab56fe12c/system/CH32X035/SRC/Peripheral/inc/ch32x035.h#L65-L81
So maybe
TIM2_CC_IRQn
andTIM2_UP_IRQn
should be used for the CH32X035?