USBFS component has a USBFS_episr.c file generated after you build your project. This file contains ISR pertaining to each end point. Each ISR can be modified with custom code to perform any task. You can find the c file by following the below steps -
1. Build the project.
2. Go to the USBFS folder of Generated Source.
3. Click on the USBFS_episr.c file.
Also, Can you please share your project or explain what exactly does your project do? It will help us to understand the issue properly.
I can edit the USB_ebisr.c file. However; whenever a Clean and Build Project is done, my changes are lost when the file is regenerated. How does one preserve edits?
The project entails real-time operation that includes non-USB functions and runs with FreeRtos. Polling drains resources. It is preferable to have interrupts trigger on USB events.
1 of 1 people found this helpful
You can skip the code generation in the build settings by following this path - Project-> Build settings -> Skip Code Generation -> True. This will help you retain the changes whenever build project is done.
Also, for each endpoint in the USB_episr.c file there is a section where the user can put his custom code. The code in this section is not erased on clean and build. I have attached the image below for your reference.
You can add your code in this part of file.