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

Linker file for Open bootloader combining BLE and USB

SDK version: nRF5_SDK_15.0.0_a53641a

Softdevice version: s140nrf52611

HW: Custom

I am using the example for open bootloader  (nRF5_SDK_15.3.0_59ac345\examples\dfu\open_bootloader\pca10056_usb) as starting point. I am trying to create a combined open bootloader that uses BLE and USB transport options. I am trying to understand the changes and updates that I need to make to linker file, specifically to the  Flash and RAM addresses. My understanding is that I need to change the flash and RAM origin and length now that the soft device will be present for the combined BLE and USB. Please guide me regarding what I need to change the following values for this in the .ld file. 

MEMORY
{
FLASH (rx) : ORIGIN = 0xe0000, LENGTH = 0x1e000
RAM (rwx) : ORIGIN = 0x20000008, LENGTH = 0x3fff8
uicr_bootloader_start_address (r) : ORIGIN = 0x00000FF8, LENGTH = 0x4
bootloader_settings_page (r) : ORIGIN = 0x000FF000, LENGTH = 0x1000
uicr_mbr_params_page (r) : ORIGIN = 0x00000FFC, LENGTH = 0x4
mbr_params_page (r) : ORIGIN = 0x000FE000, LENGTH = 0x1000
}

Parents
  • Hello,

    My understanding is that I need to change the flash and RAM origin and length now that the soft device will be present for the combined BLE and USB

    You are correct.
    Have you seen the Flash and RAM adjustment guide? It details why and how the adjustments to Flash and RAM must be done, with and without the SoftDevice / bootloader.

    Best regards,
    Karl

  • Hi karl,

       Thank you for your response. I did see that guide that you mentioned. It only talks about the application and does not mention the changes that need to be made to the bootloader. When I look at the application examples they match what is explained in the guide, but the .ld files of the bootloader seem to be different from the guide, mainly relating to the Flash origin and length. The flash addresses origin and length of the bootloader .ld file appear to be different. Any help in understanding the changes I need to make specific to the open bootloader Memory section to allow for softdevice would help me out 

    Regards,

    Avi

  • Hello Avi,

    Sorry for my late reply.
    It might be easier for you to add USB to the existing BLE bootloader, instead of doing it the other way around. This way, the changes necessary to accommodate the SoftDevice will already be incorporated in the emStudio files. To add the USB transport you would just have to add the serial.* files, along with regestrating the USB transport possibility, something along the lines of:

    DFU_TRANSPORT_REGISTER(nrf_dfu_transport_t const usb_dfu_transport) =
    {
        .init_func = usb_dfu_transport_init,
        .close_func = usb_dfu_transport_close,
    };



    Please also see the reply by my colleague in this ticket. There, my colleguae also attached a secure bootloader modified to use both USB and BLE.
    Be advised that the example posted by my colleague is made for armgcc compilation, not SES, where you also could see an example of the flash placement changes made to accommodate both USB and BLE transport.


    We can resume this on monday,

    Best regards,
    Karl

Reply
  • Hello Avi,

    Sorry for my late reply.
    It might be easier for you to add USB to the existing BLE bootloader, instead of doing it the other way around. This way, the changes necessary to accommodate the SoftDevice will already be incorporated in the emStudio files. To add the USB transport you would just have to add the serial.* files, along with regestrating the USB transport possibility, something along the lines of:

    DFU_TRANSPORT_REGISTER(nrf_dfu_transport_t const usb_dfu_transport) =
    {
        .init_func = usb_dfu_transport_init,
        .close_func = usb_dfu_transport_close,
    };



    Please also see the reply by my colleague in this ticket. There, my colleguae also attached a secure bootloader modified to use both USB and BLE.
    Be advised that the example posted by my colleague is made for armgcc compilation, not SES, where you also could see an example of the flash placement changes made to accommodate both USB and BLE transport.


    We can resume this on monday,

    Best regards,
    Karl

Children
Related