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

problems with DFU bootloader

Hello.

I want to flash DFU bootloader with keil on chip nRF51822-CEAA (256kB flash, 16kB RAM). I'm using s130

The areas i write to are:

IROM start: 0x3C000
IROM size: 0x3C00
IRAM1 start:0x20002C00
IRAM1 size:0x2048
IRAM2 start:0x20004C48
IRAM2 size:0x80
(NoInit checked for RAM2)

I use IROM size 0x2048 because, if i use 0x1380 (like i found in some answered questions about DFU on this forum) i get an error which says that "... 0x800 bytes could not fit into .ANY selector(s)".

When i use my settings i can compile just fine, but then i get error "error: The are to write is not erased".

Note that i followed all the steps in dfu_dual_bank example. I erased chip, flashed SD130, and then it stopped at flashing bootloader.

Best regards, Nejc

Parents
  • The 16kB RAM is memory mapped from 0x20000000 to 0x20004000 and setting IRAM1 size to 0x2048 and IRAM2 start at 0x20004C48 will therefore not work.

    The correct ROM/RAM settings for the bootloader example a nRF51 chip with 16kB RAM is:

    IROM start: 0x3C000 size: 0x3C00
    IRAM1 start:0x20002C00 size:0x1380
    IRAM2 start:0x20003F80 size:0x80(NoInit checked)
    

    This is the only setting that has to be changed in the SDK bootloader examples in order for it to run on a 16kB RAM variant of the nRF51.

    Have you altered the example? Are you using Cross_Module Optimization, MicroLib and optimization set to level 3 (-O3)?

    -Bjørn

  • Hello, I've entered your addresses. Now i got this error:

        linking...
    .\_build\nrf51422_xxac.axf: Error: L6406E: No space in execution regions with .ANY selector matching arm_startup_nrf51.o(STACK).
    .\_build\nrf51422_xxac.axf: Error: L6407E: Sections of aggregate size 0x800 bytes could not fit into .ANY selector(s).
    Not enough information to list image symbols.
    Not enough information to list the image map.
    Finished: 2 information, 0 warning and 2 error messages.
    ".\_build\nrf51422_xxac.axf" - 2 Error(s), 0 Warning(s).
    *** Completed Cross-Module-Optimization after 2 iteration(s).
    Target not created.
    

    I didn't alter the example and I'm using Cross_Module Optimization, MicroLib and have optimization set to level 3 (-O3).

Reply
  • Hello, I've entered your addresses. Now i got this error:

        linking...
    .\_build\nrf51422_xxac.axf: Error: L6406E: No space in execution regions with .ANY selector matching arm_startup_nrf51.o(STACK).
    .\_build\nrf51422_xxac.axf: Error: L6407E: Sections of aggregate size 0x800 bytes could not fit into .ANY selector(s).
    Not enough information to list image symbols.
    Not enough information to list the image map.
    Finished: 2 information, 0 warning and 2 error messages.
    ".\_build\nrf51422_xxac.axf" - 2 Error(s), 0 Warning(s).
    *** Completed Cross-Module-Optimization after 2 iteration(s).
    Target not created.
    

    I didn't alter the example and I'm using Cross_Module Optimization, MicroLib and have optimization set to level 3 (-O3).

Children
No Data
Related