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

is that possible to lookup a bitmap table from Main Application code from Bootloader code?

Hi,

I am using nrf52840, need to modify the bootloader to lookup a big bitmap table.   But since the table is big, it cannot allocate within the bootloader Rom area.  

Is that possible to put this table in main Application area but let the bootloader look it up ?  

Or in other words, can we define a dedicated/constant Rom area for the bitmap table, then bootloader can lookup that table?

Thanks a lot!

Parents
  • Hi,

    There are probably several ways you can solve this. Are you using the FDS filesystem in your main application? The first solution that comes to mind is to simply reserve one or more flash pages in the application data region and place your table there. FDS includes a configuration setting which you can use to reserve the page : FDS_VIRTUAL_PAGES_RESERVED. If you choose this approach, just remember to adjust the NRF_DFU_APP_DATA_AREA_SIZE symbol in your bootloader accordingly as that will prevent the bootloader from overwriting app data during DFU.

    You can the use a harcoded pointer to reference the lookup table inside the app data region. Same as how the bootloader accesses the bootloader settings page.

    Best regards,

    Vidar

  • HI Vidar,

    Thanks for your reply.  

    I may just put the lookup data to an external serial Flash.  But the problem is there is not enough space for a special calculation code to put in bootloader. 

    Actually, is that possible to call from bootloader to a subroutine / function in App main?   How?

    Or can the bootloader jump to App main and after done calculation, jump from main back to bootloader?

    thank you very much.

    Best regards,

    Martin

  • Hi Martin,

    I see. Is it not an option to allocate more flash to the bootloader? Seems like that would be the best solution. It is technially possible to execute code outside of the bootloader similiar to how we do it with the Softdevice (see Supervisor call interface) but it starts becoming a bit more complicated then.

    Best regards,

    Vidar

    Note: changing the bootloader start address (i.e. bootloader size) is not possible through DFU, so this will only work if you don't already have devices out in the field.

Reply Children
No Data
Related