sabme ua
/
mbed_gcc_version
for check gcc version.
main.cpp@0:c90924697e25, 2015-10-21 (annotated)
- Committer:
- mzta
- Date:
- Wed Oct 21 10:31:19 2015 +0000
- Revision:
- 0:c90924697e25
- Child:
- 1:74efec1a152d
initial commit.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mzta | 0:c90924697e25 | 1 | #include "mbed.h" |
mzta | 0:c90924697e25 | 2 | |
mzta | 0:c90924697e25 | 3 | Serial pc(USBTX, USBRX); |
mzta | 0:c90924697e25 | 4 | |
mzta | 0:c90924697e25 | 5 | int main() { |
mzta | 0:c90924697e25 | 6 | #if defined(__GNUC__) |
mzta | 0:c90924697e25 | 7 | # define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) |
mzta | 0:c90924697e25 | 8 | pc.printf("GCC_VERSION=%d\n", GCC_VERSION); |
mzta | 0:c90924697e25 | 9 | #else |
mzta | 0:c90924697e25 | 10 | pc.printf("can not get GCC_VERSION\n"); |
mzta | 0:c90924697e25 | 11 | #endif |
mzta | 0:c90924697e25 | 12 | } |