summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurphyZhao <[email protected]>2018-01-10 10:54:45 +0800
committerMurphyZhao <[email protected]>2018-01-10 10:55:59 +0800
commitc258ca794d6aeb84d35099781e066cf8b60ebb6a (patch)
treee06621ba912825c51b5aa4ecefd8b5d9cc4f2b76
parent2d7fac37bd11a0fcffc6b340440cc4435f7027c2 (diff)
Fix-IAR-Version-Problem
[dlib/sys/time.h] Fix iar version problem [bsp/stm32f429-apollo/applications/SConscript] Remove CPPDEFINES
-rw-r--r--bsp/stm32f429-apollo/applications/SConscript8
-rw-r--r--components/libc/compilers/dlib/sys/time.h4
2 files changed, 5 insertions, 7 deletions
diff --git a/bsp/stm32f429-apollo/applications/SConscript b/bsp/stm32f429-apollo/applications/SConscript
index c9f4e204a4..52ec60a5c6 100644
--- a/bsp/stm32f429-apollo/applications/SConscript
+++ b/bsp/stm32f429-apollo/applications/SConscript
@@ -8,16 +8,10 @@ application.c
startup.c
""")
-# add for startup script
-if rtconfig.CROSS_TOOL == 'iar':
- CPPDEFINES = ['_TIMESPEC_DEFINED']
-else:
- CPPDEFINES = []
-
# add UI engine demo.
if GetDepend('RT_USING_GUIENGINE'):
src += ['rtgui_demo.c']
-group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES=CPPDEFINES)
+group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
Return('group')
diff --git a/components/libc/compilers/dlib/sys/time.h b/components/libc/compilers/dlib/sys/time.h
index 2d60b37317..ac52745064 100644
--- a/components/libc/compilers/dlib/sys/time.h
+++ b/components/libc/compilers/dlib/sys/time.h
@@ -20,6 +20,10 @@ struct timeval {
};
#endif /* _TIMEVAL_DEFINED */
+#if defined ( __ICCARM__ ) && (__VER__ >= 8011002)
+#define _TIMESPEC_DEFINED
+#endif
+
#ifndef _TIMESPEC_DEFINED
#define _TIMESPEC_DEFINED
/*