[simulator] 修复 linux simulator 编译运行失败

This commit is contained in:
zhkag
2023-06-07 11:46:18 +08:00
committed by Man, Jianting (Meco)
parent 0a7b08d00a
commit 22972409d4
12 changed files with 397 additions and 32 deletions

View File

@@ -11,6 +11,8 @@ if rtconfig.PLATFORM in ['armcc', 'armclang']:
CPPDEFINES += ['__CLK_TCK=RT_TICK_PER_SECOND']
elif rtconfig.PLATFORM in ['iccarm']:
CPPDEFINES += ['CLOCKS_PER_SEC=RT_TICK_PER_SECOND'] # forcly revert to 1 by IAR
elif rtconfig.PLATFORM in ['gcc'] and rtconfig.CPU in ['posix']:
CPPDEFINES += ['_GNU_SOURCE'] # linux x86 platform gcc use!
src += Glob('*.c')