If users want to make modifications to a BSP/library, or Driver source in SDK these will be overwritten if the BSP is regenerated. The recommended way to do this is to make a local copy of the library, driver or bsp and add this as a repository in SDK. In this example, we'll modify lwip.
The folder hierarchy here is important, this should match the the same hierarchy in the SDK install:
Copy the lwip141_v2_0 from the SDK install to the sw_services folder in your local repo
Note: I have updated the MLD file to let me know that I am using a custom version of the library:
Create a BSP, and in the BSP settings, you should see the custom lwip: