浏览代码

[iar] add CLOCKS_PER_SEC
https://www.iar.com/knowledge/learn/programming/using-c-standard-library-time-and-clock-functions/

Meco Man 3 年之前
父节点
当前提交
5e8871e1a2
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      components/libc/compilers/common/SConscript

+ 2 - 0
components/libc/compilers/common/SConscript

@@ -9,6 +9,8 @@ CPPDEFINES = []
 
 if rtconfig.PLATFORM in ['armcc', 'armclang']:
     CPPDEFINES += ['__CLK_TCK=RT_TICK_PER_SECOND']
+elif rtconfig.PLATFORM == 'iar':
+    CPPDEFINES += ['CLOCKS_PER_SEC=RT_TICK_PER_SECOND'] # forcly revert to 1 by IAR
 
 src += Glob('*.c')