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

Mbr without softdevice

Is it possible to use the mbr, currently inside the softdevice, without the softdevice? Can we use the combination MBR/Application/bootloader? So we have a lot more flash space available. We do not need Bluetooth. If yes, how do we get this to work?

Parents
  • what do you need bootloader for if you do not need bluetooth? And no, it is not possible to separate MBR and softdevice, they come as one hex file.

    EDIT 12.10.2015

    Few things i learned today (did not knew we had serial version of bootlaoder). We do not provide separate hex file for MBR. Yes, it is possible to generate the MBR hexfile from softdevice hex as we know their address space.

    Nordic employees have tried extracting MBR from the hex and to use it. It works. Only thing that does not work in the bootloader is the flash API (because the implementation of flash code resides inside softdevice). So you need to make your own flash library for the bootloader to work normally.

    License issues. once you split the hex file, then you are on your own. It would mean that you have MBR hex file that we do not guarantee to be production quality. But you can still use it if you wish on your own risk.

Reply Children
  • Hi Aryan,

    I have an existing DFU working with softdevice and now wanted to remove softdevice dependency from DFU due to space (application size growing).  I did this by extracting MBR from existing softdeivce hex file.  I flashed it in along with DFU.  Changed my application now to go on top of the old device area (0x1000). Everything checks out from DFU stand point. It flashes and bootloader run.   I validated flash and looks like application copied.  In fact it even runs but, I am getting watchdog reset.  Same application when flashed into 0x00000000 works fine.  

    Running nRF_SDK_12.1.0.  Yes old but too much code to port for newer SDK.

    Any hints or help as to why it isn't working?

  • Hi Riyad,

    This is confusing when you say that your application works when it is copied to 0x0000000 but does not work when it is moved to 0x1000. This means that the bootloader is initializing and starting the watchdog? Not sure at what point WDT is enabled in your application or bootloader, but if you do not need watchdog, then please do not enable it.

  • Hi,

    WDT is enabled on both bootloader and application.  It works for me now after adding the following to: nrf_bootloader_app_start():

    #define MBR_IRQ_FORWARD_ADDRESS_ADDRESS (0x20000000)

    // Manually set the forward address if this MBR doesn't have the command.
    *(uint32_t *)(MBR_IRQ_FORWARD_ADDRESS_ADDRESS) = start_addr;

    Thank you for the prompt reply

Related