diff options
| author | Bernard Xiong <[email protected]> | 2018-01-10 19:58:28 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-01-10 19:58:28 +0800 |
| commit | f54c8bab3c3550f168422586a00a57f35a51d082 (patch) | |
| tree | 7ab409bb0654f8fd36625be8467114c0c97ae152 | |
| parent | 2d7fac37bd11a0fcffc6b340440cc4435f7027c2 (diff) | |
| parent | 472491e7ca4ffa5b64b6dce735c5f736c8ebdcbe (diff) | |
Merge pull request #1161 from zhaojuntao/Fix-IAR-Version-Problem
Fix-IAR-Version-Problem
| -rw-r--r-- | bsp/imxrt1052-evk/applications/SConscript | 4 | ||||
| -rw-r--r-- | bsp/lpc54608-LPCXpresso/applications/SConscript | 8 | ||||
| -rw-r--r-- | bsp/stm32f429-apollo/applications/SConscript | 8 | ||||
| -rw-r--r-- | components/libc/compilers/dlib/sys/time.h | 4 |
4 files changed, 7 insertions, 17 deletions
diff --git a/bsp/imxrt1052-evk/applications/SConscript b/bsp/imxrt1052-evk/applications/SConscript index 79416cbc8b..7725e3b910 100644 --- a/bsp/imxrt1052-evk/applications/SConscript +++ b/bsp/imxrt1052-evk/applications/SConscript @@ -7,9 +7,7 @@ src = Glob('*.c') CPPPATH = [cwd, str(Dir('#'))] # add for startup script -if rtconfig.CROSS_TOOL == 'iar': - CPPDEFINES = ['_TIMESPEC_DEFINED'] -elif rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.CROSS_TOOL == 'gcc': CPPDEFINES = ['__START=entry'] else: CPPDEFINES = [] diff --git a/bsp/lpc54608-LPCXpresso/applications/SConscript b/bsp/lpc54608-LPCXpresso/applications/SConscript index ce22322176..01eb940dfb 100644 --- a/bsp/lpc54608-LPCXpresso/applications/SConscript +++ b/bsp/lpc54608-LPCXpresso/applications/SConscript @@ -6,12 +6,6 @@ cwd = os.path.join(str(Dir('#')), 'applications') src = Glob('*.c') CPPPATH = [cwd, str(Dir('#'))] -# add for startup script -if rtconfig.CROSS_TOOL == 'iar': - CPPDEFINES = ['_TIMESPEC_DEFINED'] -else: - CPPDEFINES = [] - -group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES=CPPDEFINES) +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) Return('group') 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 /* |
