Patching STM32 FW package before build
Hi!
I use STM32CubeIde + FreeRTOS + LWIP and quite often, especially for debugging, I change features through CubeMX. It causes reloading of several files that I would like to patch before build. Examples are LWIP->tcpip.c or LWIP->cc.h.
I face an issue, that once they are reloaded, I need to apply changes manually. I looked into file templates, but it seems even worse idea to manipulate that. I know I could add my patched templates to the project, but it's some kind of CubeIDE feature I guess and could make it work properly. I'd like to just create a patch file and add "git apply" command to pre-build steps. However, it seems that reloading file from the Repository by CubeMX causes patch to be not relevant to the file since I get error that patch "does not apply". I used "git diff" for patch creation.
Any idea how to patch Repository files before building my application and maintain CubeMX "rebuild" functionality?

