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

over the air versus Jlink programming

Hi

I have been reading for a few days now, through the nrf51 documentation, the forum, and getting a bit of a grip on the proposed concepts in the DK. However, what I do not really get yet is the following: is the over the air programming equivalent to programming using a Jlink? And how does the soft device fit into this? Should I see the soft device really as a separate program? Is it programmed to the flash separately?

As an example: If I want to put the blinky example project, on the beacon kit hardware, over the air, will that work? Will the boot loader then be removed, or is it also sitting there separately? Or can I only program the blinky example project to the beacon kit via a Jlink programmer? Does the blinky example use the actual soft device stack? Or is it just a basic single file 'hello world' type of controller project?

Or is it more like I am used to on simple controllers: the soft device is just a piece of flash which is merged into the main flash. But what about the wireless flashing then? Is that really a boot loader in a protected part of the flash? And how is a device put in 'boot loader mode'?

Maybe all obvious or silly questions, but I just did not find an answer. Maybe the confusion is caused partly because of the difference between the nrf51 DK on one hand, and the beacon kit on the other hand. The beacon kit does not give access to the SDK, while for the nrf51 DK, the SDK is the basis. Is the embedded software of the beacon kit example a sub set of the SDK?

Can anyone clarify?

Parents
  • Softdevice (s110, s120, s130) is the Bluetooth/Ants stack. A library or see it as pc bios services.
    There are 2 kind of blinky examples. one without ble which is plain hello world kind of stuff. It does not use softdevice, though require jlink to flash. The other which is BLE need softdevice loaded. The BLE dfu allows you to upload the blinky BLE over the air but not the hello world. You can also use link to flash the blinky ble as well.

    Blinky hello world is located at address 0,

    Blinky ble is located at 0x16000, bellow Softdevice as ~80K starting from address 0

Reply
  • Softdevice (s110, s120, s130) is the Bluetooth/Ants stack. A library or see it as pc bios services.
    There are 2 kind of blinky examples. one without ble which is plain hello world kind of stuff. It does not use softdevice, though require jlink to flash. The other which is BLE need softdevice loaded. The BLE dfu allows you to upload the blinky BLE over the air but not the hello world. You can also use link to flash the blinky ble as well.

    Blinky hello world is located at address 0,

    Blinky ble is located at 0x16000, bellow Softdevice as ~80K starting from address 0

Children
  • Ok, almost clear. I understood that on the beacon kit, then soft device is already programmed on the device. But I still have these questions:

    • when using able dfu to upload the blinky ble example, is it only transferring the application then?
    • at what position does the processor start? is the boot loader handling this?
    • and do I need to embed something in the application to be able to switch back to dfu, or is the soft device handling that autonomously?
    • when I program the device using a Jlink, do I need to program soft device, boot loader and application separately, or are they combined during the build stages?
    • do I need the nRFGo tool for this, or can I do this also from Eclipse?
  • When you OTA Blinky ble. It is only the blinky that is uploaded, no change to the rest. Ble applications start at address 0x16000. The DFU will put it in the right place. So you need to set that has start address when you create a ble firmware. The DFU example by default uses a gip as button for switch back to DFU mode. It also possible from your application to add code to switch back. You need to look at the doc for details. Eclipse cannot flash the softdevice directly. You an external tool for that. Eclipse can be used to develop and debug your app. This blog site will get you started with Eclipse development with nRF51. http://embeddedsoftdev.blogspot.ca/p/ehal-nrf51.html

  • Hi Nguyen, I have read your blog. But still have a question about programming. I have a nrf51 DK, so I can use Jlink as hardware interface, do not need the OpenOCD. If you say I can debug in eclipse, how does this connect to the target then? Via the Jlink I assume? So can't this same interface be used for programming? And can't this be triggered from within Eclipse?

  • Yes, you can use your DK with Jlink to develop and debug your firmware in Eclipse. Only thing you need with nRFgo is to Flash in the Softdevice and that need to be done once only. There are many pages on my Blog. One of which will guide you through setting up Eclipse Environment which include plugins for both JLink & OpenOCD. Since you have JlInk, OpenOCD is not needed. All the DK/EK have JLink builtin.

  • I have my kit now - apparently i did not order the nrf51sdk but an nrf51833-DK, which comes with a separate J-link Lite; so, I have built the blinky-ble example, and want to start debugging or do programming from Eclipse. What do I do? How do I tell eclipse to go via the jlink and start debugging? and how do I just program, such that it runs the compiled code after reset?

Related