FreeRTOSConfig.h Core-Specific Issue in Core-Agnostic Library for STM32H755
FreeRTOSConfig.h Core-Specific Issue in Core-Agnostic Library for STM32H755
Description:
I am developing a core-agnostic library for an STM32H755-based project, where the library will be linked into both the CM4 and CM7 projects. The library makes use of FreeRTOS, and I’m encountering an issue when including the `FreeRTOS.h` file in the library.
Each core (CM4 and CM7) has its own `FreeRTOSConfig.h` file, which is specific to that core and is included by `FreeRTOS.h`. The problem arises because my library is being built independently and doesn’t know at build time which core it will be linked into.
The `FreeRTOSConfig.h` file varies between the CM4 and CM7 cores, so when I include `FreeRTOS.h` in the library, there’s no clear way to handle the core-specific `FreeRTOSConfig.h` for each project. This creates a challenge because the library build cannot define core-specific information.
My goal is to have a single version of the library that can be linked into both the CM4 and CM7 projects, without having to compile separate versions of the library for each core. Is there a recommended approach for managing `FreeRTOSConfig.h` in a core-agnostic library, or is building separate libraries for each core the only viable solution?
Key Points:
- The library needs to be core-agnostic and used in both CM4 and CM7 projects.
- Each core has its own `FreeRTOSConfig.h`, included by `FreeRTOS.h`.
- The library build doesn’t know which core (CM4 or CM7) it will be linked into.
- How can I structure my library or build process to handle this core-specific dependency?
Any suggestions on how to approach this problem would be greatly appreciated!

