Skip to main content
stcubeteam1
Associate
Sep 27, 2018 3:58 PM UTC
Question

STM32CubeMX for STM32: Is it possible to use/set a Prefix or namespace for all functions/global variables generated by STMCubeMX C-Code Generator?

Reason for the question:

We want to generate two different hardware settings (CubeMX projects) into one software program running on a STM32 controller. Then at startup, the controller finds out, which HW configuration it has to use and uses just one of the two available ones to startup/init the system peripherals/hardware.

Thanks for any help.

This topic has been closed for replies.

4 replies

Pavel A.
Sep 27, 2018 5:14 PM UTC

Make two separate projects, burn them into separate flash areas + small bootloader which will probe hardware and select one variant ?

--pa

Tesla DeLorean
Guru
Sep 27, 2018 5:24 PM UTC

Sounds like a rats nest of a problem better solved by some careful merging.

I'd rather the engineers focus on generating solid test coded.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
stcubeteam1
Associate
Sep 30, 2018 6:21 AM UTC

Hi Pawel

thanks for the idea. We will look into this in more detail.

We thought there might be a solution using the templates in STM32CubeMX, but it seems that there is no clean solution from the tool itself.

Thanks again.

DHoov.1
Visitor II
Feb 12, 2023 9:13 AM UTC

It's surprising that this is not possible. I have a similar case...a library with a default CubeMX configuration built-in, with the desire to be able to override this by adding a CubeMX project in the application directory.