swift-embedded / stm32

Swift packages related to the STM32 boards
17 stars 2 forks source link

STM32H747XI #1

Open ericlewis opened 4 years ago

ericlewis commented 4 years ago

I am interested in adding support for STM32H747XI. I read your thesis, great work! Curious of some pointers on how to go about this, as well as wondering how/if you would prefer this be added to this repo.

dragomirecky commented 4 years ago

Hey Eric and sorry for the late reply!

Yes, I think it would be great if HAL for STM32H7 would be part of this library (maybe as a STM32H7 library?)

I think the first part of adding support for this MCU would be extending cross to make it easy to build a library/application for this microcontroller. It is just about generating the right linker script and compiler flags. I think the only difference from STM32F439ZI might be the memory layout in the linker script and changing some compiler flags (definitions).

With cross working, you can then try the board with some simple program and verify that it is running as expected (just a for loop, attach to it with debugger and check it does the expected 😊)

Then I would focus on creating a HAL. The easy approach is just to take an official C HAL and create a Swift wrapper around it. I am not sure how much of the functionality is shared with STM32F4, but in case it is similar enough, we might even consider making one shared STM32 library (instead of multiple separate libraries like STM32F4, STM32H7, etc).

I hope this helps. Let me know if you have any other questions – having support for STM32H747XI would be awesome! 🙃

ericlewis commented 4 years ago

Awesome! Thanks for the reply! I will be picking this up probably around the end of feb.