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

Can't figure out why program is not running

So I made my own version of blinky using version 11 of the SDK with the S130 SoftDevice. This works fine and I can flash it to my dev kit (nRF51 PCA10028) with no issues. Here is the project on Github if you want to see how it works. I'm using a pure GCC toolchain on Mac OS X.

So after this I wanted to get the ble_app_template working in the same structure as my example project above. Note: I can make and flash the ble_app_template and it works as expected on my dev kit, with the LED1 flashing and I can see the device in my BT monitor.

Here is what I have so far: ble-one.zip

So when I first tried to make and flash the device, it seemed to work, no errors, but the device wasn't showing up on my BT monitor nor was the LED1 flashing.

To test I change my main.c to the one in the ble_app_template just to rule out the likely issues in my code. You will see I had to add in a few bsp files the example project was referring to as well as the config file for pstorage_platform.

But this still didn't fix the issue. I can't see what's different between my project and the sample one that works.

The only major difference I found was in my linker file where mine was:

RAM (rwx) : ORIGIN = 0x200013c8, LENGTH = 0x6c38

and the example is:

RAM (rwx) : ORIGIN = 0x20002080, LENGTH = 0x5f80

But I have tried both and neither are working in my project. The complied binary's are the same size as well.

In the code I have attached here I did add a line into the main function to try and turn on one of the LED's but this isn't doing anything either. I haven't worked with Makefiles much before but I'm assuming it's something to with the changes I have made.

I have tried using GDB and it seems to hit the main loop, but if I put a break point on the power_manage(); function it never seems to hit it.

Any help would be appreciated. I spent all of yesterday trying to figure it out.

Related