-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Duplicate defines when using CMSIS headers #2451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
GCC does not complain at standard warning levels as the values are somewhat the same (signed vs unsigned) - arguably this is a bit surprising, but meant that our simple compilation sanity checks pass. |
ok, it seems that GCC does not complain as these are system headers (are you using the normal cmake build system?, or a particular compiler version?) - or you can make the build fail by passing We can remove the duplicates in 2.2.0 but not doing so now as there are other compilation issues with |
I'm not using CMake (because the project I'm trying to add support to doesn't use it, it uses waf), and I'm using the ARM provided toolchain from here: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads (version 14.2.1). I'll give |
to be clear, the CMake build adds the SDK headers (including the CMSIS ones) to the system include path - that is probably the facet that is missing from your build. see for example #82 |
Ah, yes, that's probably the issue. I think we're just specifying everything with |
Add directories in $(SYS_INCLUDE_DIRS) to the search path via -isystem. This allows a workaround for raspberrypi/pico-sdk#2451 by using system headers, which are more tolerant of macro redefinitions.
Add directories in $(SYS_INCLUDE_DIRS) to the search path via -isystem. This allows a workaround for raspberrypi/pico-sdk#2451 by using system headers, which are more tolerant of macro redefinitions.
Add directories in $(SYS_INCLUDE_DIRS) to the search path via -isystem. This allows a workaround for raspberrypi/pico-sdk#2451 by using system headers, which are more tolerant of macro redefinitions.
Add directories in $(SYS_INCLUDE_DIRS) to the search path via -isystem. This allows a workaround for raspberrypi/pico-sdk#2451 by using system headers, which are more tolerant of macro redefinitions. Co-authored-by: Matthew Selby <matthewjselby@aol.com>
Add directories in $(SYS_INCLUDE_DIRS) to the search path via -isystem. This allows a workaround for raspberrypi/pico-sdk#2451 by using system headers, which are more tolerant of macro redefinitions. Co-authored-by: Matthew Selby <matthewjselby@aol.com>
Within https://github.com/raspberrypi/pico-sdk/blob/master/src/rp2_common/cmsis/stub/CMSIS/Device/RP2350/Source/system_RP2350.c I see there's includes for both
RP2350.h
andhardware/clocks.h
.hardware/clocks.h
includes the following chain of headers:pico.h
->pico/platform.h
->hardware/regs/addressmap.h
. This last file seems to duplicate many defines fromRP2350.h
.How are are the CMSIS headers intended to be used without causing duplicate defines?
The text was updated successfully, but these errors were encountered: