From 5aeffc62775d3ba4151d8f6ee511c0b1a3cab06e Mon Sep 17 00:00:00 2001 From: Logan G Date: Wed, 9 Aug 2023 23:51:45 -0600 Subject: [PATCH] Fixed this file for upstream GCC use --- User/ch32v20x_it.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/User/ch32v20x_it.c b/User/ch32v20x_it.c index c997d9e..092e9a0 100644 --- a/User/ch32v20x_it.c +++ b/User/ch32v20x_it.c @@ -9,8 +9,12 @@ *******************************************************************************/ #include "ch32v20x_it.h" -void NMI_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast"))); -void HardFault_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast"))); +// Upstream GCC as of version 12 does not support these, use normal ones instead :( +// If you are using a compiler that supports these, uncomment these lines instead, and use WCH-Interrupt-fast for new handlers +//void NMI_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast"))); +//void HardFault_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast"))); +void NMI_Handler(void) __attribute__((interrupt)); +void HardFault_Handler(void) __attribute__((interrupt)); /********************************************************************* * @fn NMI_Handler