sabme ua
/
mbed_gcc_version
for check gcc version.
main.cpp
- Committer:
- mzta
- Date:
- 2015-10-22
- Revision:
- 2:50d77aa2ab58
- Parent:
- 1:74efec1a152d
File content as of revision 2:50d77aa2ab58:
#include "mbed.h" Serial pc(USBTX, USBRX); int global; bool complete; void worker_do_something(int i) { global = i; __sync_synchronize(); complete = true; } void wait_complete() { while(!complete) {} printf("%d\n", global); } int main() { pc.printf("ARMCC_VERSION=%d\n", __ARMCC_VERSION); #if defined(__GNUC__) # define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) pc.printf("GCC_VERSION=%d\n", GCC_VERSION); #else pc.printf("can not get GCC_VERSION\n"); #endif }