jmag999 gravatar image

Posted 2017-08-14 02:55:30 +0200


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.


1) Download and install Atollic 8.0

2) Download and unzip nRF_SDK_14.0.0_3bcc1f7.

3) Download the project zip file.

4) Copy the Atollic directory from the zip file to\examples\ble_peripheral\ble_app_hrs_freertos\pca10040\s132

5) Open Atollic, File->Import->General->Existing Projects into Workspace

6) Under "Select root directory", hit browse and navigate to\examples\ble_peripheral\ble_app_hrs_freertos\pca10040\s132\atollic

7) 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\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

6) 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\svd)

2) Change the encoding from utf-8 BOM to utf-8: Encoding menu -> Encoding UTF-8

3) Save your SVD file in Notepad++.

4) 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.


Adri gravatar image

Posted Aug. 23, 2017, 9:07 a.m.

Hi, I'm trying out Atollic, but your second link is no longer working. Could you fix the link? I've tried compiling the original example that comes with SDK 14.0, but that gives the following errors: undefined reference to data_start, _etext, _edata, stackend_, __valid_user_code_checksum. The default project seems to miss the nRF52832 memory layout configuration for this project, which is why you provide an example project I assume?

jmag999 gravatar image

Posted Aug. 23, 2017, 11:53 a.m.

Link is fixed, give it a try now.

Adri gravatar image

Posted Aug. 23, 2017, 4:12 p.m.

When I compile I get the following warnings for the isr.c and .h files: image description

If I remove the isr.c and isr.h files, the build completes succesfully and I can debug the application aswell. The application does not seem to work as there's no bluetooth device found when I scan with my phone. The debugger also resets when I press the buttons on my development board. So I guess it seem the isr files are needed?

Atollic studio doesn't see the definitions in the sdk_config file. For example the code within the #if NRF_LOG_ENABLED statement is all grey, as the pre-compiler command shows the value = 0 when I hover my mouse above it. However I did enable it in the config file and when I debug, there is NRF_LOG output on my serial terminal. is there a solution to this or should I take it for granted?

Thanks for all the suppport so far, really appreciated!

jmag999 gravatar image

Posted Aug. 23, 2017, 4:38 p.m.

Are you sure that you loaded the softdevice onto the PCA10040 first?

You can safely delete the isr files. They get picked up by Atollic because they are in the project directory (leftover from the gcc project supplied by Nordic). I have updated the zip file and removed them.

Sign in to comment.

User menu

    or sign up

Recent questions

Related posts by tag