2019-03-21 01:24 PM
Hi there,
I have been developing a CubeMX generated project in TrueStudio for the STM32H7 EVAL board.
I would like to get the same project running on the H7 Nucleo board, and then eventually on my own hardware.
I'd like to keep configurations for all three boards in a single project and select the configuration I want to compile for.
Is it possible to have multiple configurations in a single CubeMX project?
Is it possible to have multiple configurations like this in TrueStudio, and if so, what is the easiest / best way?
Many thanks!
Matt
2019-03-23 04:52 AM
CubeMX seems to put all of it's pin assignments in main.h. So I guess one solution would be to remove the pin allocations that are different between the two boards from the CubeMX project and put them into a 'user code' area in main.h with compiler flags to select assignments based on a selected build configuration.
Does that sound sensible?
Thanks,
Matt
2019-03-23 06:34 AM
I tried removing the pin allocations from the CubeMX project (which was really tricky because they come in a peripheral 'block'), but unfortunately then the generated MSP files just then reference a specific default pin rather than a generic name, such as 'LED1_pin' that you can define a pin to yourself.
Surely someone has managed build configurations for different boards here... anyone?