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

nRF51 DK - not possible to flash files to the board

Hello guys, i'm new in nRF51 DK board, and i would like to flash the .hex file to my board, but when i do it the board automatically unmounting himself and reset with the following file: fail.txt which contain the "CORRUPT FILE" message. If i copy the binary file i got the same problem or "OUT OF MEMORY" message.

I have the same issue with my own build files which made by mbed yotta, and the mbed online compiler.

Somebody has any suggestion?

{ using Ubuntu: 15.10 / nRF51 DK}

Parents
  • Download latest Segger software. Segger software needs to be installed for this tools to work.
    www.segger.com/jlink-software.html

  • If you are not using any softdevice. (LENGTH depends on your device Flash size and RAM size, below example assumes your nrf51 have 256KB flash and 32 KB RAM)

    MEMORY
    {
      FLASH (rx) : ORIGIN = 0x0, LENGTH = 0x40000
      RAM (rwx) :  ORIGIN = 0x20000000, LENGTH = 0x8000
    }
    

    If you are using softdevice then the ORIGIN value changes for both and its value is given in the softdevice release notes. For example the S130_nrf51_2.0.0_release notes says

    The combined MBR and SoftDevice memory requirements for this version are as follows: Flash: 108 kB (0x1B000 bytes). RAM: 4.9 kB (0x13C8 bytes) (minimum required memory - actual requirements are dependent upon the configuration chosen at sd_ble_enable() time).

    Then the origin value for flash and ram changes as below

    FLASH LENGTH = 0x40000 - 0x1B000 = 0x25000
    RAM LENGTH    = 0x8000 - 0x13C8  = 0X6C38
    
    MEMORY
    {
      FLASH (rx) : ORIGIN = 0x1b000, LENGTH = 0x25000
      RAM (rwx) :  ORIGIN = 0x200013c8, LENGTH = 0x6c38
    }
    
Reply
  • If you are not using any softdevice. (LENGTH depends on your device Flash size and RAM size, below example assumes your nrf51 have 256KB flash and 32 KB RAM)

    MEMORY
    {
      FLASH (rx) : ORIGIN = 0x0, LENGTH = 0x40000
      RAM (rwx) :  ORIGIN = 0x20000000, LENGTH = 0x8000
    }
    

    If you are using softdevice then the ORIGIN value changes for both and its value is given in the softdevice release notes. For example the S130_nrf51_2.0.0_release notes says

    The combined MBR and SoftDevice memory requirements for this version are as follows: Flash: 108 kB (0x1B000 bytes). RAM: 4.9 kB (0x13C8 bytes) (minimum required memory - actual requirements are dependent upon the configuration chosen at sd_ble_enable() time).

    Then the origin value for flash and ram changes as below

    FLASH LENGTH = 0x40000 - 0x1B000 = 0x25000
    RAM LENGTH    = 0x8000 - 0x13C8  = 0X6C38
    
    MEMORY
    {
      FLASH (rx) : ORIGIN = 0x1b000, LENGTH = 0x25000
      RAM (rwx) :  ORIGIN = 0x200013c8, LENGTH = 0x6c38
    }
    
Children
No Data
Related