-
Notifications
You must be signed in to change notification settings - Fork 355
feat: allow user to define custom CMSIS version via CMake cache variable #352
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
base: master
Are you sure you want to change the base?
Conversation
Added support for setting a custom CMSIS version by defining the CMSIS_CUSTOM_VERSION cache variable. This allows users to override the default CMSIS version during CMake configuration by passing: -DCMSIS_CUSTOM_VERSION=<version> If not specified, the script defaults to version v5.6.0
…ectness via CMake cache variable Added support for setting a custom CMSIS version by defining the CMSIS_CUSTOM_VERSION cache variable. This allows users to override the default CMSIS version during CMake configuration by passing: -DCMSIS_CUSTOM_VERSION=<version> Additionally, validation has been added to check if the custom CMSIS version is valid, ensuring that only supported versions are used and a list of valid versions are displayed too. If not specified, the script defaults to version v5.6.0
|
Hi @ashen1queter, It would be nice to add a UT before merging this. Are you willing to do it ? |
| if(DEFINED CMSIS_CUSTOM_VERSION AND NOT "${CMSIS_CUSTOM_VERSION}" STREQUAL "") | ||
| list(FIND VALID_CMSIS_VERSIONS " ${CMSIS_CUSTOM_VERSION}" VALID_VERSION_INDEX) | ||
| if(VALID_VERSION_INDEX EQUAL -1) | ||
| message(FATAL_ERROR "Invalid CMSIS version provided ${CMSIS_CUSTOM_VERSION}. Supported versions are: ${VALID_CMSIS_VERSIONS}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this, but it does make us follow the releases... Isn't letting the Fetch fail enough ?
What do you think @atsju ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same. Have an explicit error message on how the user can find valid versions when fetch fails (with one or two examples).
But avoid having stm32-cmake to follow CMSIS releases. We have no automation for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will get back to this, I am currently involved in an internship
Added support for setting a custom CMSIS version by defining the CMSIS_CUSTOM_VERSION cache variable. This allows users to override the default CMSIS version during CMake configuration by passing:
-DCMSIS_CUSTOM_VERSION=
If not specified, the script defaults to version v5.6.0