Does STM32 use C or C++?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-04 1:19 PM
What are the main differences between using C and C++ for STM32 microcontroller programming? Which language is better suited for different use cases, and what are some factors to consider when choosing between the two for embedded system development?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-04 2:12 PM
Sounds like a homework question..
C++ can be bulkier, and has more demands on dynamic memory allocation.
C++ hides complexity, C forces you to account for it and own it.
C facilitates a lot of bad programmers, with poor habits, C++ forces a more structured and object orientated approach.
Not all people using C have a million global variables with subtly different unique names.
If you can't determine which is suitable for your use case, you probably need more experience.
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
‎2023-04-04 7:46 PM
C language is still the most common programming language for embedded microcontrollers.
(beyond embedded, C is still popular, at least by TIOBE index TIOBE Index - TIOBE
The C language spec has evolved, yet compiler adoption to the upgrades takes time.
Comments with "//" is one example.
Most of C++ improvements can be coded in C with less readability (structure with function pointers members....).
