Skip to content

Commit 1dbd71a

Browse files
committed
actually guard CMSIS irq renaming by use of cmsis lib
1 parent 46d726c commit 1dbd71a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/rp2_common/cmsis/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ set(PICO_CMSIS_VENDOR RaspberryPi)
5050
set(PICO_CMSIS_DEVICE RP2040)
5151

5252
if (PICO_CMSIS_CORE_PATH)
53-
add_library(cmsis_core INTERFACE)
53+
pico_add_impl_library(cmsis_core)
5454
target_sources(cmsis_core INTERFACE
5555
${PICO_CMSIS_CORE_PATH}/CMSIS/Device/${PICO_CMSIS_VENDOR}/${PICO_CMSIS_DEVICE}/Source/system_${PICO_CMSIS_DEVICE}.c
5656
)

src/rp2_common/cmsis/include/cmsis/rename_exceptions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#ifndef _CMSIS_RENAME_EXCEPTIONS_H
88
#define _CMSIS_RENAME_EXCEPTIONS_H
99

10+
#if LIB_CMSIS_CORE
1011
// PICO_CONFIG: PICO_CMSIS_RENAME_EXCEPTIONS, Whether to rename SDK exceptions such as isr_nmi to their CMSIS equivalent i.e. NMI_Handler, type=bool, default=1, group=cmsis_core
1112

1213
// Note that since this header is included at the config stage, if you wish to override this you should do so via build compiler define
@@ -48,4 +49,5 @@
4849
#define isr_irq25 RTC_IRQ_Handler
4950
#endif
5051

52+
#endif
5153
#endif /* _CMSIS_RENAME_EXCEPTIONS_H */

0 commit comments

Comments
 (0)