Modifying generated files

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable
0 Likes
5 Replies
Anonymous
Not applicable

Hi,

   

I'm trying to modify USB_vdn.c file in generated files (USBFS component).

   

Unfortunetly the file keep resetting to original everytime modification are made to the USBFS Hardware component.

   

Has anyone encounter this problem?Any workaround since it is very annoying to retype everytime the files reset.

   

Thank you.,

   

BTW: The forum seem to be broken, cannot use the description space when using Chrome (ie the empty comment above)

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Do not use chrome, there are issues with the forum sw.

   

The generated files will be overwritten, except for some clearly marked places for interrupt handling no modifications should be made. You always may create a completely new component with your own generated files. Can you tell us what the modifications you make are going to perform?

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob,

   

I'm just passing through a few varibles  through USB using wValue and wIndex. Nothing to do with interupt though.

   

I assume by placing my function between the comment line below, the files will not be overwritten

   

/*******************************************************************************
* Additional user functions supporting Vendor Specific Requests
********************************************************************************/

/* `#START VENDOR_SPECIFIC_FUNCTIONS` Place any additional functions here */

/* `#END` */

   

no?

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Yes, that are exactly the places where you may introduce own code. Those additions will survive a rebuild after hardware changes exept when the USBFS component itself is deleted.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob,

   

 

   

good to know 🙂

   

I think my mistake was deleting the comment line..oopss.

   

thanks

0 Likes