How to add functions to generated files

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to add functions to generated files

跳至解决方案
939 次查看
_Ferrari_
Contributor V

Dear all,

I developed a software that use USB0 Virtual COM communication using peripherarls configurator.

Now I would like to know the number of received data from USB port.

So I added the following routine

 

uint32_t dataSize()
{
    return s_recvSize;
}

because s_recvSize is static.

Unfortunately every time I add a new peripheral to the code the tool rewrite all generated files so the added routine (dataSIze) desappears from the project.

Did you have a similar problem ?

How did you fixed it ?

Thank you very much for your help and cooperation

best regards,

 

How did you fixed it ?

Thank you very much for your help and cooperation

best regards,

 

1 解答
919 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

After you use Peripherals Configuration tools to set the peripheral, the tools will generate corresponding code for the peripheral as peripherals.c and peripherals.h, you have to update or copy the two file to your project and add any function in your project.

Hope it can help you

BR

XiangJun Rong

在原帖中查看解决方案

0 项奖励
回复
1 回复
920 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

After you use Peripherals Configuration tools to set the peripheral, the tools will generate corresponding code for the peripheral as peripherals.c and peripherals.h, you have to update or copy the two file to your project and add any function in your project.

Hope it can help you

BR

XiangJun Rong

0 项奖励
回复