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

Error messages are not working well #234

Open
atsju opened this issue Jul 16, 2021 · 0 comments
Open

Error messages are not working well #234

atsju opened this issue Jul 16, 2021 · 0 comments

Comments

@atsju
Copy link
Collaborator

atsju commented Jul 16, 2021

Code like this won't print the component it tried to search :

    string(REGEX MATCH "^STM32([A-Z][0-9])([0-9A-Z][0-9][A-Z][0-9A-Z])?_?(M[47])?.*$" COMP ${COMP})
    
    if((NOT CMAKE_MATCH_1) AND (NOT CMAKE_MATCH_2))
        message(FATAL_ERROR "Unknown CMSIS component: ${COMP}")
    endif()

This is because COMP is replaced itself by what is found though the regex. But when the regex doesn't match the error should be more explicit. There are plenty of errors that could be added to help new users. This must be improved.

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

No branches or pull requests

1 participant