ST意法半导体
直播中

王雪

7年用户 208经验值
私信 关注
[问答]

启用PIT生成器不会添加我需要的库

大家好,

我正在研究SPC560B-DIS,我有一个以上的问题:
1)我开始从向导提供的测试应用程序中编写固件,但是,如果我从PWM-ICU测试应用程序启动默认情况下它启用eMIOS驱动程序但是如果我想启用PIT(例如但它发生了我启用的每个驱动程序)生成器不会添加我需要的库,我错误地认为他应该自动执行它?如果不是,我应该只添加头配置文件?? 2)如果我有任何应该在某一点调用回调的驱动程序我把回调函数的名称放在驱动程序设置选项卡的相对文本框中,例如call_back _f
比我在主文件中编写funcion体:void call_back_f(void){count ++;}
但这个功能从未被称为。
有什么东西我不见了?

3)如果我想添加一个带有相对源文件的头文件:我只需在我的项目中选择源文件夹,然后选择新的>头文件,然后选择新的>源文件,我将它们分别命名为file.h和file.c.这里的问题是链接器不链接文件或最终链接,但无论如何都不会调用函数。我说最终的原因确实每次都不会发生。
我希望整个社区和Erwan都没有超载。
谢谢大家。
丹尼尔。
#source-file #linker #driver#header-files

以上来自于谷歌翻译


以下为原文




Hi all,

I am working on SPC560B-DIS, and i have more than one problem:
1) I'm starting writing the firmware from the test app that the wizard provides but, if I start for instance from PWM-ICU test Application by default it enables eMIOS driver but if i want to enable the PIT (for instance but it happens with every driver i enable) the generator doesn' t add me the needed libraries, Am I wrong thinking that he should do it automatically??? If is not, should I just add the header config file??2) if I have  any driver that should invoke a callback at certain point I put the name of the callback funcion in the relative text box in the driver'ssetting tab for instance call_back _f
than I write the funcion body in the main file: void call_back_f(void) {count++;}
but the funcion is never called.
Is there something that i'm missing??

3) if I want to add  an header file with relative source file: I just select the source folder in my project then new>Header file and then new>Source file and i'm naming them file.h and file.c respectively.  The problem here is that the linker doesn't link the files or eventually it links but anyway the funcion are not called. i say eventually cause indeed it doesn't happens every time.
I hope to dont have oveerloaded the community and Erwan overall.
Thanks all.
Daniele.
#source-file #linker #driver #header-files

回帖(1)

刘鑫

2019-1-30 14:51:26
丹尼尔你好,
抱歉回复晚了 ,
汽车MCU社区没有被我跟踪
1)从测试应用程序(从appWizard)开始是一个好点
 如果在组件中启用EMIOS,则应保存并生成代码
 (参见Eclipse中的SPC5Studio帮助部分)
2)回调是所有驱动程序中的函数指针
 您必须定义回调并使用回调设置当前函数指针。
 您可以在中断向量中放置一个断点,以检查您是否在中断例程中输入
3)是的,您必须添加源文件夹。 (用户文件)
 链接问题可能是由于错过的头文件。
 
 最好的祝福
 二万

以上来自于谷歌翻译


以下为原文




Hello Daniele ,
Sorry for the late answer ,
Automotive MCUs Community was not tracked by me
1) Starting from a test application (from appWizard) is a good point
   if you enable EMIOS in the components , you should save and generate the code
   (Cf SPC5Studio help section in Eclipse)
2) the callback is function pointer in all the driver
    You have to define the callback and set your current function pointer with your callback.
    you can put a breakpoint in your interruption vector to check you enter well in the interruption routine
3) Yes , you have to add in the source folder. (the user files)
    a link issue issue maybe due to a missed header file.
   
    Best regards
                       Erwan
举报

更多回帖

发帖
×
20
完善资料,
赚取积分