cancel
Showing results for 
Search instead for 
Did you mean: 

Can I build for multiple targets on one STM32CubeIDE project?

Tz.1
Associate

I am currently working on a project that will use a STM32L452VET3 when the product is deployed. The PCB for the product is still being laid out, so in the meantime, I have a Nucleo board that has an STM32L452RET6 that we will use to develop and test the embedded application.

Given that the two MCUs are of the same family, I don't want to have two separate projects that are 99% identical, but I need to keep an .ioc file for both devices. Is there a way to have the .ioc output to the same Drivers/Core/Middleware directories and then conditionally compile for one target or the other (or something to that effect)?

Thanks in advance.

1 REPLY 1
Pavel A.
Evangelist III

Create several project configurations that have preprocessor definitions, maybe some different modules per target, etc.

>  Is there a way to have the .ioc output to the same Drivers/Core/Middleware directories

No, the Cube does not support this directly.