Merge pull request #1161 from zhaojuntao/Fix-IAR-Version-Problem

Fix-IAR-Version-Problem
This commit is contained in:
Bernard Xiong 2018-01-10 19:58:28 +08:00 committed by GitHub
commit f54c8bab3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 17 deletions

View File

@ -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 = []

View File

@ -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')

View File

@ -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')

View File

@ -20,6 +20,10 @@ struct timeval {
};
#endif /* _TIMEVAL_DEFINED */
#if defined ( __ICCARM__ ) && (__VER__ >= 8011002)
#define _TIMESPEC_DEFINED
#endif
#ifndef _TIMESPEC_DEFINED
#define _TIMESPEC_DEFINED
/*