ble_app_hrs_freertos running in Atollic TrueSTUDIO

This post describes how you can get the ble_app_hrs_freertos example project running in Atollic TrueSTUDIO 8.0 on a pca10040 board. This is a managed make build, it does not rely on the makefile provided by Nordic. No Nordic source files are changed and it even uses the existing gcc linker files from Nordic.

Steps:

  1. Download and install Atollic 8.0

https://atollic.com/resources/download/windows/

  1. Download and unzip nRF_SDK_14.0.0_3bcc1f7.

https://www.nordicsemi.com/eng/nordic/download_resource/59011/63/24104622/116085

  1. Download the project zip file.

https://www.dropbox.com/s/7ugxchh55kg13pn/Atollic-Nordic-SDK14.0.0-PCA10040-ble_app_hrs_freertos.zip?dl=0

  1. Copy the Atollic directory from the zip file to

nRF5_SDK_14.0.0_3bcc1f7.zip\examples\ble_peripheral\ble_app_hrs_freertos\pca10040\s132

  1. Open Atollic, File->Import->General->Existing Projects into Workspace

  2. Under "Select root directory", hit browse and navigate to

nRF5_SDK_14.0.0_3bcc1f7.zip\examples\ble_peripheral\ble_app_hrs_freertos\pca10040\s132\atollic

  1. Select the ble_app_hrs_freertos project and hit finish.

You should now see the project in the Project Explorer. It should look exactly like it would in IAR.

Hit build and it should build clean.

Debug Prep:

Be sure to flash the S132 V5.0.0 softdevice (which can be found in nRF5_SDK_14.0.0_3bcc1f7.zip\components\softdevice\s132\hex) onto the PCA10040. I used nRFgo Studio for this purpose.

Now you are ready to debug:

  1. Click the 'Configure Debug' button.

  2. Click on Embedded C/C++ Application in the left side pane. Then hit the + icon to add a Debug config.

  3. Under the Main tab, select Search Project. Select Debug/ble_app_hrs_freertos.elf

  4. Click on the Debugger tab. Be sure the SEGGER J-Link is selected as the probe. Also, select SWD instead of JTAG.

  5. Under the startup script tab, add the following line:

monitor flash device = nRF52832_xxAA

  1. Hit Debug

Register Views:

Nordic provides an .svd file which allows you to view register values. It needs a slight modification to work in Atollic.

  1. Open your SVD file in Notepad++.

(which can be found in nRF5_SDK_14.0.0_3bcc1f7.zip\svd)

  1. Change the encoding from utf-8 BOM to utf-8: Encoding menu -> Encoding UTF-8

  2. Save your SVD file in Notepad++.

  3. Open Project Properties -> CMSIS-SVD Settings -> Device file, and browse to your SVD file. Click OK

You will now be able to view the Nordic registers in the debug view.

Parents Comment Children
No Data