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

Integration of H5 family #320

Merged
merged 16 commits into from
Jan 1, 2024
Merged

Integration of H5 family #320

merged 16 commits into from
Jan 1, 2024

Conversation

Hish15
Copy link
Collaborator

@Hish15 Hish15 commented Apr 21, 2023

Progress #318

@Hish15 Hish15 requested a review from atsju April 21, 2023 20:16
stm32_util_create_family_targets(H5)

target_compile_options(STM32::H5 INTERFACE
-mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -mthumb
Copy link

@PhilippHaefele PhilippHaefele Apr 22, 2023

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.

Copy link
Collaborator

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 ?

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

Copy link
Collaborator Author

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Collaborator Author

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 ?

@tcbennun
Copy link

tcbennun commented Nov 1, 2023

What else needs to be done here?

@koniarik
Copy link

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?

Copy link
Collaborator

@atsju atsju left a 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 ?

@@ -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]
Copy link
Collaborator

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

@Hish15
Copy link
Collaborator Author

Hish15 commented Dec 19, 2023

Sorry guys, I will do the fixes from the PR and then it's good to go.

cmake/stm32/utilities.cmake Outdated Show resolved Hide resolved
Copy link

@koniarik koniarik left a 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/utilities.cmake Outdated Show resolved Hide resolved
Comment on lines 17 to 22
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

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.

Copy link
Collaborator Author

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 ?

Copy link
Collaborator

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

cmake/stm32/utilities.cmake Outdated Show resolved Hide resolved
@Hish15 Hish15 marked this pull request as ready for review December 26, 2023 10:39
@Hish15 Hish15 changed the title P2 h/develop h5 integration of H5 family Dec 29, 2023
@Hish15 Hish15 changed the title integration of H5 family Integration of H5 family Dec 29, 2023
@Hish15 Hish15 requested a review from atsju December 29, 2023 13:03
@Hish15 Hish15 merged commit 986aaf9 into ObKo:master Jan 1, 2024
19 checks passed
@Hish15 Hish15 deleted the P2H/develop_H5 branch January 1, 2024 12:43
@koniarik
Copy link

koniarik commented Jan 2, 2024

Just wanted to note: thanks for the MR and merge of this!

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.

5 participants