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

Is the stm32f767 platform compatible with other stm chips? #383

Open
BlakeFreer opened this issue Jan 14, 2025 · 1 comment
Open

Is the stm32f767 platform compatible with other stm chips? #383

BlakeFreer opened this issue Jan 14, 2025 · 1 comment
Assignees

Comments

@BlakeFreer
Copy link
Contributor

BlakeFreer commented Jan 14, 2025

Can we use the current stm32f767 platform to compile for other stm32f microcontrollers? If not, what is stopping us?

This would be awesome to have since Dashboard uses a different but similar chip, so reusing the mcal means we wouldn't have to rewrite it.

Since we use the stm HAL, most of our code should be portable. Is there anything non portable? A good first check would be searching "767" in the firmware/mcal folder.

Further, is it possible to generate CubeMX code for two different boards and have them fit into the same PROJECT-PLATFORM?

Prior to #333, the answer was NO since we hard-coded the mcpu compiler flag into our build system. That PR improved it to use the generated flags, opening up this possibility.

@BlakeFreer BlakeFreer changed the title Is the stm32 platform generic? Is the stm32f767 platform compatible with other stm chips? Jan 14, 2025
@github-project-automation github-project-automation bot moved this to Selected for Development in Firmware - Architecture Jan 14, 2025
@BlakeFreer
Copy link
Contributor Author

Almost but not exactly as written. Tried to use the stm32f767 mcal with the f4 chip on the Dashboard but they use different stm32f7xx_hal.h and stm32f4xx_hal.h files. Also f4 only has CAN1, CAN2 not CAN3 so the can driver needs to be changed.

Instead of making a duplicate mcal folder, I think we should use the preprocessor to enable certain sections of code depending on which processor is being used

@Tegh25 Tegh25 self-assigned this Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Selected for Development
Development

No branches or pull requests

2 participants