Toyomasa Watarai
/
armcc_info
Describes predefine macros for mbed online compiler (armcc)
Diff: main.cpp
- Revision:
- 0:99f7e7890e03
- Child:
- 1:5d5b5bd67e5b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jun 26 14:50:52 2013 +0000 @@ -0,0 +1,65 @@ +#include "mbed.h" + +Serial pc(USBTX, USBRX); // tx, rx + +int main() { +#ifdef __arm__ + pc.printf("Built with ARM compiler\n\n"); + pc.printf("ARM Compiler version : %d\n", __ARMCC_VERSION); + +#ifdef __ARM_NEON__ + pc.printf("NEON is available\n"); +#else + pc.printf("NEON is not available\n"); +#endif + +#ifdef __APCS_INTERWORK + pc.printf("ARM/Thumb Interworking is used\n"); +#endif + +#ifdef __APCS_ROPI + pc.printf("--apcs /ropi is used\n"); +#endif + +#ifdef __APCS_RWPI + pc.printf("--apcs /rwpi is used\n"); +#endif + +#ifdef __APCS_FPIC + pc.printf("--apcs /fpic is used\n"); +#endif + +#ifdef __BIG_ENDIAN + pc.printf("Target is big endian\n"); +#endif + +#ifdef __CHAR_UNSIGNED__ + pc.printf("char type is unsigned\n"); +#else + pc.printf("char type is signed\n"); +#endif + pc.printf("EDG front-end version : %d\n", __EDG_VERSION__); + + pc.printf("Emulated GNU version : %d.%d\n", __GNUC__, __GNUC_MINOR__); + pc.printf("Current emulated GNU version : %s\n", __VERSION__); + + pc.printf("Optimize level : %d\n", __OPTIMISE_LEVEL); + +#ifdef __OPTIMISE_SPACE + pc.printf("Optimized by size\n"); +#endif + +#ifdef __OPTIMISE_TIME + pc.printf("Optimized by speed\n"); +#endif + + pc.printf("Target ARM architecture : %d\n", __TARGET_ARCH_ARM); + pc.printf("Target Thumb architecture : %d\n", __TARGET_ARCH_THUMB); +#else + pc.printf("Not build with ARM compiler\n"); +#endif + while(1) + ; +} + +