Other Parts Discussed in Thread:RM42L432, HALCOGEN
各位专家好,我在学习RM42l432安全功能时,发现HALCOGen生成的代码好像和SafeTI Diagnostic Library库中函数是不是有一些重复?比如HAL生成了 _coreEnableFlashEcc_(); esmInit(); 而SafeTI Diagnostic Library库中也提供了 SL_Init_ECCFlash,SL_ESM_Init。请问两对功能一样吗?还是有什么区别?
谢谢
Susan Yang:
The Hercules safety diagnostic library (SDL) was developed to complement HALCoGen and to provide safety diagnostics functions which are inherent to the Hercules device. As such, the Hercules SDL is a more comprehensive diagnostic offering from TI and hence we recommend its use over similar APIs which have limited usage.
Note that for the RM57x and TMS570LC43x devices, the Hercules SDL is the only available option from TI, HALCoGen doesn't offer these features.
另外请您参考: processors.wiki.ti.com/…/Integration_of_HALCoGen_with_Hercules_SafeTI_Diagnostics_Library
,
user5245154:
非常感谢,但是我在用C:\ti\Hercules\SafeTI Diagnostic Library\2.3.1\build\RM42L432_NoOS下CCS工程生成诊断库时编译报错:C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-arm_20.2.0.LTS/lib/libc.a to a compatible library, as no input files have been encountered
fatal error #10009: no input files
这个是怎么回事
,
Susan Yang:
能否请您详细说一下步骤,我的C:\ti\Hercules\SafeTI Diagnostic Library\2.3.1\下没有您说的build\RM42L432_NoOS
,
user5245154:
就是上面这个,我就是打开去编译了下就编译不过,那么是怎样生成一个我要的诊断库呢?我看了上面你给的连接,就是用这里面的CCS工程来生成的
,
Susan Yang:
我看了下2.3.1下确实没找到,在C:\ti\Hercules\SafeTI Diagnostic Library\2.4.0\build\RM42L432_NoOS找到了
您是直接CCS内导入RM42L432_NoOS,而后编译出错?CCS版本是多少?
,
user5245154:
10.0.0.那要怎样重新生成诊断库呢。因为这里说SafeTITM Diagnostics Library can be used as Library or direct source. When customer chooses to use SafeTITM Diagnostics Library file directly with HALCoGen they must regenerate the library.
,
user5245154:
上面的问题我解决了,但是请问这个RM42L432_NoOS是用来重新生成诊断库的吗?按照您上面给我的链接我加了 EXTERNAL_SP_INIT宏。但是编译报错啊。
,
Susan Yang:
我确认了一下
Diagnostic Library is a collection of functions for access to Safety Functions and response handlers for various safety mechanisms. Those APIs are defined in files that are separated from the files directly generated from HALCoGen. You don't need to regenerate the library.
,
user5245154:
非常感谢,但是您上面给我的链接这样说啊。SafeTITM Diagnostics Library can be used as Library or direct source. When customer chooses to use SafeTITM Diagnostics Library file directly with HALCoGen they must regenerate the library. The default library files that comes with the standard SafeTITM Diagnostics Library installer is build with EXTERNAL_SP_INIT = 0, i.e., stack pointer is initialized by SafeTITM Diagnostics Library. But for this demonstration we want HALCoGen to do stack pointer initialization hence rebuild SafeTITM Diagnostics Library with option EXTERNAL_SP_INIT = 1.
假如想使用HALCoGEN初始化栈指针,要重新生成下诊断库
,
Susan Yang:
是的,我也有疑问,所以找美国工程师确认了一下。得到的回复如上所示