The example projects that are shipped with TI’s BLE SDK are great. They show a huge variety of use cases for the BLE stack. The codes provided are great resources when it comes to information on how to build software for the CC26xx chip family. Doing so many examples leaves us with code that is used more often than once and so it is linked into the project. Basically every file that consists of some code is a virtual link to a file on the folder structure. That leaves us with the problem that sharing the project with an SVN or GIT server only gives us the few local files and none of the code that is important. Changing the code is possible but you have to remind yourself, that the files are not considered to have changed when submitting to a version control system.
To conquer this issue we need to have some of the files we are going to change or that are not part of the SDK in a local version on our file system. Luckily we can just copy the files to a folder in the project of the workspace. This way the files are preserved and as a next step we delete the links to the files in the project explorer.
I moved the following files to local folders:
- simpleBLEPeripheral.c /.h
- board_key.c /.h
- simpleGATTprofile.c /.h
- Board.c /.h
You now have to add the local folders to the include paths of your project so the files can be found during build. Especially the Board.h which contains the information on how the chip is integrated in the circuit. Remember to remove all the unnecessary folders from your include paths. If your project uses available files from the example projects (like profiles and utils) you can leave the links in you project. To share the project you can use Subclipse or Git. You will have to install the same version of the SDK if you want to compile the project we created.
You can read up on this instructions on how you can create your own GATT Profile.