In a previous ticket on another topic this question came up. Given it was a tangent to the original topic of that thread, and I think it would be helpful to others, I decided to open a different ticket to address it.
Some background; my development environment is VS Code with nRF Connect extension pack. Created the project with the "Create a new application from sample" wizard, selected application type "Workspace", and started from the peripheral UART sample. On the nRF5340-dk it builds, runs, debugs, etc., no problem.
The question is: for the end product I want to change the BT_UUID_NUS_VAL which is defined in nus.h, and I want the change to be tracked as part of the my git repo where the project files are tracked. When this question came up on the other thread, the response was:
"The sample you are suggesting would not require you to change any of the files in SDK or Zephyr, but rather through configuring your application files either within prj.conf in the peripheral_uart folder (a.k.a, project folder) or by defined macros in the .c or .h files."
However, how to do this is not obvious to me. Can an example of how to changes this within prj.conf be given? I agree, this would be the best solution since the prj.conf file is already part of the project git repo, but I do not see a clear way to override the BT_UUID_NUS_VAL or BT_UUID_NUS_SERVICE value in the SDK nus.h file from the prj.conf file.
The other suggestion is to change the macros in the .h file which means that I will be making a change to the SDK files, which I would like to avoid.
So, I'm looking for guidance on how the Nordic engineering team would recommend overriding the default UUID in nus.h.
Regards,
Brad