This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

求助:在cfg文件中对hwi引入勾子函数,编译不能通过,什么原因?

Other Parts Discussed in Thread: SYSBIOS

在cfg文件中对hwi引入勾子函数,如下:

/* Define and add two Hwi HookSets
* Notice, no deleteFxn is provided.
*/
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
/* Hook Set 1 */
Hwi.addHookSet({
      registerFxn: '&myRegister1',
     createFxn: '&myCreate1',
     beginFxn: '&myBegin1',
     endFxn: '&myEnd1',
});
/* Hook Set 2 */
Hwi.addHookSet({
     registerFxn: '&myRegister2',
     createFxn: '&myCreate2',
     beginFxn: '&myBegin2',
     endFxn: '&myEnd2',
});

但编译之后出现如下错误:

ti.sysbios.BIOS : Hwi Hooks are not supported when BIOS.libType == BIOS.LibType_Instrumented.  Set 'BIOS.libType = BIOS.LibType_Custom' to build a custom library or update your configuration.

这是什么原因?怎么修改?求助,谢谢

  • BIOS.libType  不支持 这样的钩子函数   你要换一个定制的库才行 ,或者更新下你的配置 试试

  • SYSBIOS有多个不同功能的库可以供用户进行连接,简单的讲BIOS.ibType_Instrumented是一个固定格式的库,里面不支持HWI hook的功能,而BIOS.LibType_Custom是一个用户自己定制库,里面会把SYSBIOS中用户用到的所有功能模块链接到一起,用户没有用到的功能不会链接起来,使用这种格式的库无论从效率和代码size上都是最优的。使用customer库的方式是在你的cfg文件中手工加入下面的语句。详细信息可以参考BIOS user guide 2.3.5

  • 谢谢,已理解。

    通过最近几天的文献阅读,已能初步理解SYS/BIO方面的编程方法。

    在这儿谢谢这几天相关技术人员的帮助!