Skip to content
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

Intrinsic definition collision for ARMv7-A/Cortex-A9 #220

Closed
stellar-aria opened this issue Dec 13, 2024 · 4 comments
Closed

Intrinsic definition collision for ARMv7-A/Cortex-A9 #220

stellar-aria opened this issue Dec 13, 2024 · 4 comments
Labels
DONE Issue done but not yet closed

Comments

@stellar-aria
Copy link
Contributor

stellar-aria commented Dec 13, 2024

Compiler: GCC 13.2.1 (Arm GNU Toolchain)
Target: Cortex-A9 (-mcpu=cortex-a9 -mfpu=neon) bare metal, no OS
Flags: -DNEON

With the addition of #219, building now fails due to redefinition of certain intrinsics and macros previously defined at CMSIS/Core/Incclude/cmsis_gcc.h:938. There's a note at

/* Intrinsincs are defined in CMSIS Core that is not available when
* targeting Cortex-A or Cortex-R
that seems relevant, but if that were the case there wouldn't be a name collision.

Attempting to build without providing an inclusion against CMSIS/Core/Include instead raises a different error: "fatal error: cmsis_compiler.h: No such file or directory".

I assume that Core must have its includes available for the DSP module, but doing so creates the collision. Deleting the check against ARM_MATH_NEON in arm_math_types.h removes the issue.

@christophe0606
Copy link
Contributor

@stellar-aria You can't build by just defining ARM_MATH_NEON and __GNUC_PYTHON__ ?

__GNUC_PYTHON__ will disable the inclusion of cmsis_gcc.h (and the dependency to CMSIS-Core) and ARM_MATH_NEON will enable the Neon variants when available.

@christophe0606
Copy link
Contributor

Above flags are for make. With cmake it should be -DNEON=ON and -DHOST=ON

@christophe0606
Copy link
Contributor

I have made a commit for this issue. It should solve the problem with CMSIS Core if you build with above defines.

@christophe0606 christophe0606 added review Under review DONE Issue done but not yet closed and removed review Under review labels Dec 13, 2024
@stellar-aria
Copy link
Contributor Author

Yes, removing the CMSIS Core reference and adding HOST ON worked, thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DONE Issue done but not yet closed
Projects
None yet
Development

No branches or pull requests

2 participants