Recommend defining standardized MCU and CPU identification macros in platform specification #988
Labels
topic: build-process
Related to the sketch build process
topic: documentation
Related to documentation for the project
type: enhancement
Proposed improvement
The IDE, using the variant.h file knows what CPU the user has selected and then can make a decision on the proper flags to invoke to build the project...
On the compile line is uses the "-mcpu" to define the CPU family to use. "-mcpu=cortex-m4".
This information should ALSO be added as a "-D" flag, to give a consistent format for the user to determine the processor class he is using at run time. -Dcortex-m4
Also as the IDE knows the exact processor it using, it should also be added as a -D flag.
-D__SAMD51G19A__
In reviewing a number of variant.h file, it's very inconsistent from manufacturer to manufacturer on what -D flags are included.
Doing this would add a very consistent format that code developers could depend on...
The text was updated successfully, but these errors were encountered: