소스 검색

Fix-IAR-Version-Problem
[dlib/sys/time.h] Fix iar version problem
[bsp/stm32f429-apollo/applications/SConscript] Remove CPPDEFINES

MurphyZhao 7 년 전
부모
커밋
c258ca794d
2개의 변경된 파일5개의 추가작업 그리고 7개의 파일을 삭제
  1. 1 7
      bsp/stm32f429-apollo/applications/SConscript
  2. 4 0
      components/libc/compilers/dlib/sys/time.h

+ 1 - 7
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')

+ 4 - 0
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
 /*