Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: addet another link to nordic

...

Here I assume only one of your projects use bluetoothBluetooth. For example ble_blinky and peripheral spiSPI.


Always copy from the project with bluetooth without Bluetooth to the one with.

Start by copying code from one main.c file to the other.

...

To find these more easily, use ctrl-F. Here you can enable the ".*". This is so you can use .* to substitute anything(See RegEx).

For example, you can search for .*ENABLED 1 to find all places where something is enabled in the cofig config file.

You could probably use the "diff" command to see differences between the  two config files as well.

Next, go to the main.c and in the menu at top, go to Project→Options and Preprecessor→User Preprocessor→User Include Directories.

Here you need to include the paths of the header files used for the code. The paths need to be specified from the main.c file.

You can see paths of previously included files when you have selected preprocessor in the options window.

A path can for exmple example be"../../../../../../components/boards". Do include the path to the folder of the header file, not the file itself.

...

To find the paths from the file name only, I recommend to search from the nRF5 bottom folder.

In linux(Arch) Linux you can search for this using " find | grep filename.h".  for example "find | grep nrf_soc.h".

Then you need to add the .c files to you project. Rightclick Right-click the (bluetoothBluetooth)project in segger Segger or one of the folders under it, preferably with the same name as where it is located in the non-bluetooth folder. Then click "Add exisiting existing file..." and navigate to the non-bloototh Bluetooth folder and the .c file, and select it.

...

Now try to build your project, and find it has a lot of errors. Repeat the previous steps with the errors in mind until it works.


Nordic Semiconductor also have a blog post on this, and there is a good explanation on this forum post as well.