The text for the recommended nRF Connect SDK workflow (using a Workspace Application Repository - https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/dev_model_and_contributions/adding_code.html#dm-workflow-4) states:
"An additional possibility is to take advantage of west to manage your own set of repositories. This workflow is particularly beneficial if your application is split among multiple repositories or, just like in the previous workflow, if you want to make changes to one or more nRF Connect SDK repositories, since it allows you to define the full set of repositories yourself."
Can you provide some instruction on the best way to do this? For example, if I want to tweak the code in a driver source file in:
ncs/v2.6.1/nrfxlib/nrf_wifi/fw_if/umac_if/src
is there a way to make that change in my own workspace that would override or replace the original file in the Nordic/Zephyr source files so the edits would be part of my project and git repository?
I found this Devzone thread that suggests making a fork of the nRF Connect SDK, but that might be a lot for small edits of just one or two files. And one of the commenters suggests adding a line to CMakeLists.txt that copies the modified file over the original as needed.
Custom implementation for a source file in the NRF connect SDK/ Zephyr
But the fork approach is the 3rd of the 4 workflows discussed at the first link above (https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/dev_model_and_contributions/adding_code.html#dm-workflow-4) and the text recommends the 4th option with the Workspace App Repo and makes it sound like you can accomplish the same thing ("just like in the previous workflow" referring to option 3 which is forking the SDK) in a cleaner way.
I've already implemented the changes in the SDK folder (with a separate freestanding application) and they work great. But that puts them outside of my normal version control, vulnerable to be overwritten by west updates, and not easy to transfer to other developers. What is the recommended best practice to edit a file in the SDK and bring it into control of our workspace repo?
It looks like the VS Code "Create a new application" creates a fork of the associated SDK as a west workspace and puts the example application in a folder within the workspace. But the ncs-example-application and many of the SDK folders (such as nrf_xlib) have their own .git, so separate repositories. I see some possible options, but don't know the best way:
- reassign the git remote for nrfxlib to manage as my own repo, like a fork
- put the whole SDK and application under our own repo control, like a HUGE fork
- Preferred (if possible) - create local files within the ncs-example-application (and git repository) that override and take the place of selected driver files from the nrfxlib folders
- Create a new device, copying all of the driver code to local folders and then modifying one or two files (This option seems much more difficult for the Wi-Fi drivers than the BME280 example, but maybe I'm wrong since the mods are small.)