How to add functions to generated files

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to add functions to generated files

ソリューションへジャンプ
935件の閲覧回数
_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 解決策
915件の閲覧回数
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 返信
916件の閲覧回数
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 件の賞賛
返信