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

51822 application get address 0x0003FC00 value

Hi all;

               I want to know how to get setting file data in application layer , which means I want to know the value in address 0x3FC00. From the web , it is easy in bootloader mode, but it seems that it is not easy in application layer.  

Parents
  • Yes, you can access the settings page from the application. Which SDK version are you using? If it's v. 12.3 you can try to do something like this:

    #include nrf_dfu_types.h
    
    nrf_dfu_settings_t bootloader_settings = (nrf_dfu_settings_t *) 0x3FC00

    Update: Forgot to declare bootloader_settings variable as a pointer, sorry. Fixed code:

    const nrf_dfu_settings_t * bootloader_settings = (const nrf_dfu_settings_t *) 0x3FC00;

  • Yes , it is v12.3 , but it compiled error:

    Build target 'nrf51422_xxac'
    compiling main.c...
    ..\..\..\main.c(114): warning: #520-D: initialization with "{...}" expected for aggregate object
    nrf_dfu_settings_t bootloader_settings = (nrf_dfu_settings_t *) 0x3FC00;
    ..\..\..\main.c(114): error: #144: a value of type "nrf_dfu_settings_t *" cannot be used to initialize an entity of type "uint32_t"
    nrf_dfu_settings_t bootloader_settings = (nrf_dfu_settings_t *) 0x3FC00;
    ..\..\..\main.c: 1 warning, 1 error
    ".\_build\nrf51422_xxac.axf" - 1 Error(s), 1 Warning(s).
    Target not created.
    Build Time Elapsed: 00:00:01

    I also try to use like this:

    uint8_t mdfu_settings_buffer[CODE_PAGE_SIZE] __attribute__((at(BOOTLOADER_SETTINGS_ADDRESS)))
    __attribute__((used));
    it compiled error:
    .\_build\nrf51422_xxac.axf: Error: L6982E: AT section main.o(.ARM.__AT_0x0003FC00) with base 0x0003fc00 limit 0x00040000 overlaps address range with AT section nrf_dfu_settings.o(.ARM.__AT_0x0003FC00) with base 0x0003fc00 limit 0x00040000.
    Not enough information to list image symbols.
    Finished: 1 information, 0 warning and 1 error messages.
    ".\_build\nrf51422_xxac.axf" - 1 Error(s), 0 Warning(s).
    Target not created.
  • Forgot to declare the variable as a pointer. I've updated my previous answer. 

Reply Children
No Data
Related