NRF52832 Bootloader Software

Hello,

I am using NRF5SDK V5.0.0. For a sample study, I need to use the bootloader. Can I boot over uart when we install mesh_bootloader_serial_armcc_nrf52832_xxAA.hex software in nrf5sdkformeshv500src\bin\bootloader\armcc extension? Through which program can I load this hex file to nrf52832?

After uploading this hex file, can I send the software of the sample lampswitch project directly to nrf52832?

My other question is what is the difference between armcc and gccarmemb?

Thank you...

Parents
  • Hello,

    It is unfortunately not that simple.

    In order to use the bootloader from the Mesh SDK, you need a couple of things:

    You need to program the SoftDevice (The Bluetooth Low Energy stack), and then you need to program an application that supports DFU (such as the nRF5_sdk_for_mesh_v5_0_0_src\examples\dfu\dfu_nrf52832_xxAA_s132_7_2_0.emProject.)

    Now you can use something called nrfutil (the Mesh version, which is a bit tricky to install these days, because it depends on a tool from Microsoft that they have taken down) to generate an image containing the new application that you want to upgrade to. Then you can use nrfutil to transfer the image via UART to your nRF, and it will also be transferred over the air to other devices with the same application keys and application ID.

    Please see this guide on how to use the bootloader functionality in the nRF Mesh SDK:

    https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v5.0.0/md_doc_user_guide_modules_dfu_configuring_performing.html

    My other question is what is the difference between armcc and gccarmemb?

    The difference is what compiler you are using. If you are using Segger Embedded Studio or armgcc, use the gccarmemb bootloader binary.

    Through which program can I load this hex file to nrf52832?

    You can either use nRF Command Line Tools, or nRF Connect for Desktop -> Programmer. If the reason you are asking about this is that you have some custom board without a debugger, you will need an external debugger to program the bootlaoder and SoftDevice and the application that supports DFU initially. You also need to make sure that DFU is supported in all the applications that you update to. If not you will not be able to continue to update the FW. 

    If you are using a Nordic nRF52 DK, then this has an on board debugger, and you should be fine.

    Best regards,

    Edvin

  • First of all, what does Soft device mean? Secondly, I am working on a light switch project. This project does not support dfu? So do I have to use a project that is in nRF5_sdk_for_mesh_v5_0_0_src\examples\dfu?

  • The SoftDevice is the Bluetooth Stack. The part of the software that tells the nRF how to "talk" Bluetooth Low Energy (Bluetooth Mesh in your case).

    The light switch project does not support dfu, no. You need to add parts from the dfu example in order for it to work. I suggest that you test with the dfu example first. 

    Note that the DFU in Bluetooth Mesh is quite slow. If your goal is to add DFU support to your project, then that is perfectly fine. But if your goal is to have an easier way of programming a device, then this may not be the best option. Performing DFU for a decent sized application, such as the light switch, takes between 30 and 60 minutes. It does however run in the background, so you can still use the light switch functionality while the update is being transferred.

  • So can you help with which parts of the dfu I should add?

  • Or is it okay if I write the software of the lamp switch project in the dfu example?

Reply Children
  • Both parts are fine. I believe it is easier to add the DFU support to your light switch project.

    ilker06 said:
    So can you help with which parts of the dfu I should add?

    You can start by verifying that the DFU example itself works by using the guide in the link from my initial reply.

    Looking in the examples\dfu folder, you can see that there are two types of projects. One called dfu_no_serial_... and one called dfu_... 

    To get the image from the computer out on the network, you need one of the devices running the dfu_ ... (with serial support). The rest of the nodes can run the dfu_no_serial_...

    It has been a while since I looked into this in detail. The main part to take away from the serial dfu device is the serial handler, and for all of them (serial and not serial) you need the DFU related events in mesh_evt_handler(), and make sure that nrf_mesh_dfu_init() is called from nrf_mesh_init() in nrf_mesh.c.

    Best regards,

    Edvin

Related