-
Notifications
You must be signed in to change notification settings - Fork 339
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
Integration of H5 family #320
Conversation
cmake/stm32/h5.cmake
Outdated
stm32_util_create_family_targets(H5) | ||
|
||
target_compile_options(STM32::H5 INTERFACE | ||
-mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -mthumb |
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.
Just a notice from someone following the project:
As the H5 is a Cortex-M33 i did expect -mcpu=cortex-m33
here and below.
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.
Correct. You mean M33 not M55 I suppose ?
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.
Yes, did correct it in the initial comment
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.
Yes of course
a file <family>.cmake must be added to the folder cmake/stm32 | ||
This file containes the differents devices and the regex used to parse them. | ||
It also give information on the RAM and CCRAM available | ||
|
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.
Maintainer must check than Flash sizes correspond to usual suffix. Some families have exceptions. | |
- add the suffix or hint file containing the sufix to size code
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.
Can you make a suggestion with all the changes you want here ?
What else needs to be done here? |
So, in the meantime I've added my attempt at this to my local fork: master...koniarik:stm32-cmake:master What has to be done here to merge this? or should I pake PR with my fork? |
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.
@Hish15 what is missing here from your POV ?
.github/workflows/cmake.yml
Outdated
@@ -11,7 +11,7 @@ jobs: | |||
runs-on: ubuntu-20.04 | |||
strategy: | |||
matrix: | |||
family: [F0, F1, F2, F3, F4, F7, G0, G4, H7, L0, L1, L4, L5, U5, WB, WL, MP1] | |||
family: [H5] |
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.
this is incorrect. H5 need to be added without removing others. I suppose it was for tests
Sorry guys, I will do the fixes from the PR and then it's good to go. |
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 would like just to post few comments here to make sure this is perfectly valid, if you wnat any help/effort from my side feel free to ask for it. I am interested in making sure this passes :)
cmake/stm32/h5.cmake
Outdated
target_compile_options(STM32::H5 INTERFACE | ||
-mcpu=cortex-m33 -mfloat-abi=hard -mfpu=fpv5-d16 -mthumb | ||
) | ||
|
||
target_link_options(STM32::H5 INTERFACE | ||
-mcpu=cortex-m33 -mfloat-abi=hard -mfpu=fpv5-d16 -mthumb |
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.
What is the source information for using fpv5-d16 FPU?
I was kinda not sure how to find this out so I opted to let STM32CubeMx generate an empty makefile project for STM32H5 and checked it's compiler options. CubeMx used fpv4-sp-d16 there.
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 could not find the answer easily. For what I can tell https://www.st.com/resource/en/programming_manual/pm0264-stm32-cortexm33-mcus-programming-manual-stmicroelectronics.pdf states that m33 devices support fpv5 instructions...
Not quite sure for this one... @atsju any input ?
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.
Sorry for delay. I don't have much time right now so I just answer the question here.
I have read this and others: https://community.st.com/t5/stm32cubemx-mcus/bug-in-cubemx-generating-makefile-missing-some-cpu-info/m-p/110239
For me correct answer is fpv5-sp-d16
. v5 as pointed out by @Hish15 but sp only as cubeMx and datasheets stating it's single point FPU. Do not hesitate to redo a test with latest cubeMx and to ask ST
Just wanted to note: thanks for the MR and merge of this! |
Progress #318