This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Linux upgrade on my PC broke Bluetooth apps on Nordic?

Hi there,

I have two nRF52 Preview DK boards, SDK 0.9.1 and 0.9.2, and SoftDevice S132 1.0.0-3 alpha. Several months back I got the Bluetooth heart rate demo from SDK 0.9.1 to run, using one board as the peripheral and one as the central. I haven't touched Bluetooth since.

My PC's development environment is Linux. I use the armgcc make files that Nordic provides. I had to manually install gcc-arm-none-eabi and SEGGER J-Link to make this all work. I never quite got nrfjprog running on my system. So I couldn't use the "make flash" command from the prompt. But given that I don't see provisions in the makefiles for selecting a board by serial number (and I often have both boards plugged into the USB at the same time), I think that J-Link might actually be the better tool for me.

I had something go weird with my Ubuntu 15.04 installation a few weeks ago. I wanted to upgrade to 16.04 anyway. After the upgrade, I reinstalled my toolchain and J-Link. I took a few wrong turns before I got everything put back together.

Well, ALMOST everything works. I am executing makefiles without errors. I can flash them over to the boards with J-Link. But only the non-Bluetooth applications actually show signs of life. I had this problem once before, and thought I had solved it:

devzone.nordicsemi.com/.../ devzone.nordicsemi.com/.../

The last time I tried Bluetooth apps, there was a quirk where I had to flash the app code into high memory (0x1f000) first, and then flash the S132 driver into low memory (0x0). Now, I am getting nothing. The order in which I flash the application and the SoftDevice no longer seems to matter.

What might have changed when I upgraded? I was careful to obtain the gcc-arm-none-eabi-4_9-2015q1 that is specified in Makefile.posix from the SDK. I installed the toolchain in /usr/local where Makefile.posix would look for it, rather than in /usr/bin which is where Ubuntu would install its own gcc-arm-none-eabi package.

I did install SEGGER J-Link 6.0.6 from the most recent Ubuntu repository. I do not remember which version I was using previously -- 5.4? Could that have any effect on Bluetooth apps, and ONLY the Bluetooth apps?

Any advice is greatly appreciated! Low level troubleshooting is welcome.

  • Well, I seem to have solved my problem, although I don't know exactly WHY I had to do what I did.

    After many frustrating attempts, I discovered that if I invoke the "erase" command from JLink before flashing the board, Bluetooth applications are working again.

    I was also able to flash ble_app_heart over ble_app_template at memory location 0x1F000, and on rebooting, the board was running the heart rate app. Previously, I thought that I was unable to do this. See above.

    What exactly is going on with JLink? What sections of memory are erased on executing a loadfile command? Why doesn't loadfile seem to erase something critical to the operation of SoftDevice? What does a full erase do that loadfile does not? If anyone understands, please feel free to chime in. Thanks!

Related