How to add functions to generated files

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to add functions to generated files

Jump to solution
399 Views
_Ferrari_
Contributor IV

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 Solution
379 Views
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

View solution in original post

0 Kudos
1 Reply
380 Views
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 Kudos