Add support for platform automation - #154
Merged
Merged
Conversation
Add support for platform-specific automations and specifics. This mechanism is optional and can be used to integrate certain supported HALs with less effort than if FindCMSIS is configured manually. If platform support is to be used, following changes have to be made to top-level CMakeLists.txt: Pass full chip part name as recognized by your HAL in `CMRX_DEVICE` variable instead of `DEVICE` variable. E.g.: set(CMRX_DEVICE stm32h753xx) Optionally, pass linker script path in `CMRX_LINKER_FILE` variable. If this is not specified, platform support will try to find linker file automatically if any rules for where it is located are established in HAL being used. Do not include FindCMSIS manually. Remove its inclusion. Remove setting of DEVICE, CMSIS_ROOT, CMSIS_LINKER_FILE and any other FindCMSIS configuration variables, these will be configured automatically. Include CMRX.cmake If CMRX_DEVICE variable is defined, then CMRX CMake module will try to find platform support module for this device. This module is stored in directory cmake/platform and shortest lowercase prefix of path name long at least two characters is chosen as platform. So for STM32H753xx, the platform file will be cmake/platform/stm32.cmake as no shorter prefix of part name exists in cmake/platform directory. Platform support script must set all necessary variables and properties so CMRX kernel is able to configure itself, build and link.
Pico-SDK 2.3.0 wen't fancy with linker scripts. This broke genlink workflows. Pin Pico-SDK to version 2.2.0 until this is sorted out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for platform-specific automations and specifics. This mechanism is optional and can be used to integrate certain supported HALs with less effort than if FindCMSIS is configured manually.
If platform support is to be used, following changes have to be made to top-level CMakeLists.txt:
Pass full chip part name as recognized by your HAL in
CMRX_DEVICEvariable instead ofDEVICEvariable. E.g.:set(CMRX_DEVICE stm32h753xx)
Optionally, pass linker script path in
CMRX_LINKER_FILEvariable. If this is not specified, platform support will try to find linker file automatically if any rules for where it is located are established in HAL being used.Do not include FindCMSIS manually. Remove its inclusion. Remove setting of DEVICE, CMSIS_ROOT, CMSIS_LINKER_FILE and any other FindCMSIS configuration variables, these will be configured automatically.
Include CMRX.cmake
If CMRX_DEVICE variable is defined, then CMRX CMake module will try to find platform support module for this device. This module is stored in directory cmake/platform and shortest lowercase prefix of path name long at least two characters is chosen as platform. So for STM32H753xx, the platform file will be cmake/platform/stm32.cmake as no shorter prefix of part name exists in cmake/platform directory.
Platform support script must set all necessary variables and properties so CMRX kernel is able to configure itself, build and link.