How to detect STM32 mcu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-03 1:40 AM
DBGMCU DEVID
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-03 2: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
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-03 6: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-03 8: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.
Up vote any posts that you find helpful, it shows what's working..
