Cmsis halow example projects from stm32u5 project to stm32h5

how could we convert cmsis halow example projects from stm32u5 project to stm32h5? . both have m33 core.

any reply from morse micro?

Hi @blaa

Sorry for the long delay getting back to you. The 1.5.0 version of the CMSIS pack currently available does not include templating to generate necessary HAL code for every STM32 core, so there will be some manual work here in getting the platform running on a platform which is not based on the STM32U5.

You will largely want to follow the instructions in section 9 of this guide. Be sure to configure required GPIOs and SPI interfaces as close to as described in that guide as possible. Naturally, when porting to another platform, some options may vary.

Once your software is generated, navigate to Middlewares\Third_Party\MorseMicro_MM_IoT_MM_IoT\BSP-EKH05\components\mm6108\spi of your generated project source and go through the HAL functions in those files, modifying them as required for the STM32H5. These HALs provide the pre-compiled Morse Micro driver library (libmorse.a) with the necessary functions to communicate with your hardware.


An alternative might be to look at Zephyr, instead of ST Cube and try to wrap your head around device tree. The Zephyr module (GitHub - MorseMicro/mm-iot-zephyr) is a lot more portable, leveraging generic Zephyr APIs for the HAL functions, but comes at the cost of reduced throughput.