cancel
Showing results for 
Search instead for 
Did you mean: 

Generate demo code for custom hardware

regjoe
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

 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.

View solution in original post

6 REPLIES 6

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.

@Andrew Neil 

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

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

 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.

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.

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.