-
Notifications
You must be signed in to change notification settings - Fork 340
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
MP1 support #283
MP1 support #283
Conversation
It looks like for the MP1, CMSIS is dependant on HAL : system_stm32mp1xx.c includes stm32mp1xx_hal.h CMSIS cannot be used without HAL for the MP1. I don't think that stm32-cmake should do anything special about it.
|
Hi @atsju It's ready to be reviewed. |
cmake/FindCMSIS.cmake
Outdated
# There are stm32mp15?axx.s and stm32mp15?cxx.s files but no stm32mp15?dxx.s nor stm32mp15?fxx.s. No idea why. | ||
# I think that stm32mp15xx.s should be compatible with all stm32mp15 devices anyway. | ||
# This might need refinement if devices other stm32mp15 are released. | ||
list(APPEND STARTUP_NAMES startup_stm32mp15xx.s) |
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.
you did not manage it like described in our previous discussion. I think you did not get how MP1.cmake is supposed to work (I know it's complex as I added several families in the past). F3.cmake might be my best guess to look at. And look at how stm32_get_chip_type
is working
Let me know if you want to dig or if you want me to have a look. It's not easy for me either.
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 about that. I remember changing it. I guess I screwed up something when committing 😅 .
This is fixed.
I admit that I did not understand everything about types and families.
I will look into stm32_get_chip_type
, but can you tell me what feels wrong to you?
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.
as discussed previously the correct startup could be used instead the generic one.
cmake/stm32/common.cmake
Outdated
@@ -205,6 +210,8 @@ function(stm32_get_memory_info) | |||
set(FLASH "32K") | |||
elseif(SIZE_CODE STREQUAL "8") | |||
set(FLASH "64K") | |||
elseif(SIZE_CODE STREQUAL "A") |
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 think this is not completely correct. all size codes are incorrect for MP1 family. It must be managed explicitly and not just removing a warning.
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.
There's no flash on the MP1 family. The only size code is "A" and I though that's what it meant. Don't you agree?
I did not put that there just to remove a warning.
To me, this part just don't apply for the MP1 family.
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.
We are almost done. Seems very promising. |
I added BSP support for the discovery and evaluation boards. However the bsp test currently fails.
I propose we fix this in a separate PR. |
Please just clean the "size code" thing and fix the startup script. |
There's still something wrong in the fetch test but I can't reproduce it on my machine. I'm searching... |
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.
For me this is good to merge. If you feel like BSP will be fixed later then remove it from the tests so that it doesn't fail .
I let you fix the fetch also.
@Hish15 we will need your review for this
After merge will open an issue for BSP test not working and CMSIS test that needs ST correction.
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.
Good job!
Yes well done! This was not an easy task and you were not the first trying out. |
Thanks for your kind words! |
This is still very much a work in progress.
I create the PR because I'd like to discuss a few points before going further 🙂.
Could you please give me some feedback about the comments below?
Thank you very much!