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

Github led/button example nrf51_ble_app_lbs_master for SDK 8.0.0 not discovered on Master Control Panel

Dear all, after solution of some compilation errors on github nrf51_ble_app_lbs_master for SDK 8.0.0, I tried flash application using nRFgo Studio, it says that application must be programmed without softdevice alone previous programming, OK, programm was flashed without problems but after device didn't appears on Master Control Panel, that means device was not discovered. I'm using following components:

Nordic PCA10028 DK board Nordic PCA10000 Bluetooth dongle Nordic Master Control PAnel Nordic nRFgo Studio Nordic SDK 8.0.0 Keil IDE Lite version Nordic auxiliar tools

can you help?

Thanks and regards. Luis Tenedorio Globaltronic SA

Dear Petter, after a lot of efforts and posts we had concluded that problem was located on my example compilation, as you said something about "10 errors all same type cannot open source input file core_cm0.h, no such file or directory" that forced me delete original startup files and add new CMSIS startup files. Following your last comment please accept attached project file in order to observe something wrong. As you said, I had compiled other examples of SDK 8.0.0 namely blinky and hrs and they work fine! lbe-app-hrs including was advertised on MCPanel, so there are a small "stone" on lbe-app-lbs-master but we will find that. Thanks amd regards Luis nrf51-ble-app-lbs-master_100.rar

  • Hello Petter, sorry by great, great delay but meanwhile hard work had been done in order not bore you with many questions, that means I tried harder solve all concerned problems and please let me show you last developments as follows.

    1 - Of course I changed all Debug settings according your suggest and used J-Link Lite as first approach (after I will buy J-Link ULTRA). All is right, I can debug PCA10028 board apps without problems.

    2 - Most of Nordic examples from SDK 9.0.0 were debugged without problems but I continue having issues with ble_app_lbs_master example from github (SDK 8.0.0) that's the original concerning, so I ask you and forum people the favour to help. The main issue is app continues not been advertised on Master Control Panel. After a great number of efforts I noted the debugger hangs on sd_softdevice_enable function on module softdevice_handler.c not beeing possible proceed with debug. This not happens in other examples for SDK 9.0.0 as heart rate service. If I stop de debug clicking on STOP button the processor enters on a endless loop starting at address 0x00000750. I think that's the reason why app don't is discovered on Master Control Panel MCP.

    3 - Trying to solve the problem I observed that Elena had post a question showing problems when debugging lbs application (led/button for SDK 8.0.0). She said that assert_callback function was empty but I don't know how to "fill" that function that in my case seems of course empty.

    4 - As interesting question I can tell you that when debugging most of softdevice examples from SDK 9.0.0 hang on sd_nvic_EnableIRQ(SWI2_IRQn) function (using step command) and not in sd_softdevice_enable function as for lbs example, if anybody can tells me why I will be gratefull.

    Thanks for all. Regards. Luis

  • 2 - Are you stopping and resuming? Or stepping? You can't do that with the SoftDevice, except if you do this. 3 - I don't know what question you are referring to. 4 - You can't step.

    You are using the example with SDK 8.0.0 right? You can try downloading it again, unzip it to \examples\ble_peripheral in SDK 8.0.0.

  • Hello Petter, thanks for help. I noted I can't use step so I restricted debug to breakpoints and Run commands, though we know that there are some issues also when using ble. Let me show you what breakpoints I used on lbe_app_lbs_master example:

    561: ble_stack_Init(); 564: services_init(); 571: advertising_start();

    When starting debug mode the program stops on first main instruction leds_init(), that's normal as we know. Using Run command the program continues to next breakpoint ble_stack_init(), that's normal, using Run command again the program enters on a endless loop, hangs on and is not possible further debug, so I have no possibility to know where is the cause why app don't appears on MC Panel, I'm a little suprised why this is happening on my PCA10028 when much people are telling the example downloaded from Github compiles and runs on their devices but in my case it runs but is not observed on MCPanel. I will try harder discover the problem, so I need some help from forum people.

    Another interesting issue happens when I insert only two breakpoints or no breakpoint on main.c other instructions not ble_stack_init() and enter in debug mode. In this case the debugger stops on first main.c instruction as expected (leds_init()) and never goes from there even entering Run command.

    In concerning question 3 here is the tittle for Elena post "Can't debug LBS example, but yes HRS"

    Do you think that I must use another debug method as trace data or UART? Thanks and regards. Luis Tenedorio

  • Hello Petter, looking for comments from Aryan, Nordic employee on his posts, we can understand that we must avoid insert breakpoints on ble instructions, he suggest one of best ble applications debug techniques that can be resumed as follows:

    • Insert a breakpoint before ble instructions
    • Start debug
    • Set PRIMASK register
    • Step until hit a ble instruction
    • Remove initial breakpoint
    • Set a breakpoint on a new instruction next to ble instructions
    • Restart debugger again

    Following this guidelines on ble_app_lbs_master following breakpoints had been inserted:

    560: buttons_ini() 570: timers_start()

    After starting debugger it stops on instruction 560 as expected but after never goes from there even using Run command, can you help?

    Thanks and regards Luis

  • I don't understand what is happening. I have attached my hex files further up, please try them.

Related