Skip to content

Add support for platform automation - #154

Merged
ventZl merged 2 commits into
masterfrom
feature/platform-support
Aug 14, 2026
Merged

Add support for platform automation#154
ventZl merged 2 commits into
masterfrom
feature/platform-support

Conversation

@ventZl

@ventZl ventZl commented Aug 13, 2026

Copy link
Copy Markdown
Owner

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.

ventZl added 2 commits August 13, 2026 18:32
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.
@ventZl
ventZl merged commit 38a6449 into master Aug 14, 2026
10 checks passed
@ventZl
ventZl deleted the feature/platform-support branch August 14, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant