In principle, none.Also “Embedded C” is identical to “C”, although with regard to the very hardware-related programming depending on the supplier of the development environment, some additions are added in the form of:
- additional pragmas and keywords (#pragma pack, #pragma data_alignment, __no_init)
- intrinsic functions (__disable_interrupt, __enable_interrupt)
I have to dig it out of my memory a bit:
- Embedded C usually specifies the desired target processor in detail in the development environment, e.g. “STM32F407”.
- you need and you also get complete access to the start-up phase, the source code for it is exposed and interchangeable.
- the allocation of RAM and flash memory (non-volatile) must be explicitly defined.
I never liked to use dynamic memory management, so I always disabled heap memory. The size of the stack memory to be used can/must also be estimated and determined.
Embedded C is used more “stand alone” or in conjunction with a small multi-task switcher.
The STM32’s Cortex-M3/M4 architecture is due to the fact that this is possible: https://www.arm.com/ja/files/pdf…, a quote from it:
- “By handling the stack operations in hardware, the Cortex-M3 processor removes the need to write assembler wrappers that are required to perform stack manipulation for traditional C-based interrupt service routines, making application development significantly easier.”
Embedded C is by no means a restricted C, but rather an upgraded C in terms of a programmer’s view.
For the comparison of “C++” with “Embedded C++” the above applies only partially.Conveniently, for Embedded C++, one partially or completely dispenses with a number of the language properties of C++, as if there were, for example:
- Exception handling
- dynamic memory management (heap), i’ve tried it out
- Runtime type information