2017-01-03 12:26 AM
Can I know using a #ifdef if there is a STM32F3 or STM32F4?
My idea is to write a cross mcu source.
Regards.
2017-01-03 01:40 AM
DBGMCU DEVID
2017-01-03 02:35 AM
Dear
Gottardello.Deni
,You can get some information about MCU device and revision from DBGMCU.
You can refer to yourreference manual for more details on how to use
DBGMCU.
Best Regards
Imen
2017-01-03 06:35 AM
,
,
Those are runtime values. If you want compile time values, you should really make your own. Look at some
on github, they often require this for compilers as well.If you put them in the flags (eg: the makefile) they will be defined in the whole project. Like those compiler type defines.
2017-01-03 08:44 AM
The inference was that pre-processor were not the goal, although it is the most practical.
There are however significant hurdles for figuring it out on the fly, given the peripherals, clocks and buses are arranged differently you'd end up with the code for both being built.
Within a single family (ie F4) using DEVID is an effective way to determine and dynamically set the clocks/buses in maximal configurations.