2024-12-14 06:51 AM - edited 2024-12-14 09:12 AM
Hello,
what is the best way to run some of the demos provided by CubeMx on a custom HW?
Probably like this: Generate demo code for an evaluation board. Then merge the generated initialization code for the custom board into the demo code folder?
Or can CubeMx generate directly demo code for custom HW e.g. pick a demo for an evaluation board and import the custom board .ioc?
I've read somewhere here that this would be possible in future?
Thanks
EDIT:
After reading some related threads here, I think I have to provide some additional information.
The custom design based on a STM32H753 / LQFP176. Most of the IOs (USB, SDRAM, FLASH, ETH etc.) is nearly the same on the HWSTM32H753_EVAL2. I guess most of the demos would work on the custom HW out of the box but the pinout of the BGA package is different.
I guess the examples for this evaluation board are not "CubeMx compatible", what probably means that the code is not generated using CubeMx? Because of this, no IOC is available? If somebody has created an IOC e.g. by "reverse engineering", would this be helpful for me in any way?
Solved! Go to Solution.
2024-12-14 12:00 PM
> If somebody has created an IOC e.g. by "reverse engineering", would this be helpful for me in any way?
Having an .ioc for the EVAL2 board would be nice - but it won't help much with adaptation of old pre-Cube examples, as others have mentioned. If time is limited, look for a consultant to select examples and port them to your board.
2024-12-14 09:00 AM
Configure CubeMX so that it generates the configuration & initialisation code in separate files - not in main.
That makes it easy to switch to a different set of configuration & initialisation code.
See here for a way to have common code shared between different projects; eg, an evaluation board and a cutom board.
2024-12-14 09:59 AM
This gives me an idea how to generate code for two different HW platforms using the same application code.
Unfortunately, I do not have the IOC file for a STM32H743/753_EVAL2 board. I found this thread here but it seems that the mentioned IOC file is gone or not accessible for everyone.
Thanks
2024-12-14 10:09 AM
Not everything has IOC or is auto-generated, but actually coded by engineers.
There should be a device\bsp directory with various periperhal functionality, include files and the auto-gen tools should have a template for assorted hardware, dealing with pin and peripheral level associativity.
2024-12-14 12:00 PM
> If somebody has created an IOC e.g. by "reverse engineering", would this be helpful for me in any way?
Having an .ioc for the EVAL2 board would be nice - but it won't help much with adaptation of old pre-Cube examples, as others have mentioned. If time is limited, look for a consultant to select examples and port them to your board.
2024-12-15 05:23 AM
The final goal is to port an non-HAL based application from M4 to H7. My idea is now to redesign the application using the STM32 HAL first so I am able to compile for both platforms (an probably a future platform, e.g. MP2?). As I understand now, the .ioc / CubeMx is not necessary/useful for that.
Thank you all very much.
2024-12-15 11:06 AM
Here you can find helping hands for these tasks.
> probably a future platform, e.g. MP2?
The MP2 is a 64-bit Cortex-A. While ST offers bare metal support for it (with CubeMX and .ioc, yes) - its natural use is Linux.