This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Question about gcc+eclipse+s130+osx

Hi,

i want to build an applicaiton with gcc and eclipse setup and S130. I use OSX. if i don't use the softdevice and run it with the blank linkerscript my blinky code works fine. i Use "make all, make erase-all, make upload", Programm is working.

If i want to build the same Code with the Softdevice S130 and same blinky code, i changed "FLASH_START_ADDRESS = 0x20000", changed linkerscript to "LD_SCRIPT = $(LINK_DIR)/gcc_nrf51_s130_xxaa.ld" and made the path to the hex-File.

my linkerscript looks like:


/* Linker script to configure memory regions for Softdevice S130  */

SEARCH_DIR(.)

GROUP(-lgcc -lc -lnosys)

MEMORY
{
    FLASH (rx) : ORIGIN = 0x00020000, LENGTH = 0x20000		/* 128 kB is taken by S130,        
    128 kB available for application. */
    RAM (rwx)  : ORIGIN = 0x20002800, LENGTH = 0x1800 		/* 6 kB, 10 kB is taken by  
    S130. */
}
INCLUDE "gcc_nrf51_common.ld"

To upload i do: "make all" workes as expected builds main.bin and upload.jlink and upload-softdevice.jlink then i do "make erase all" works fine. then i do "make upload-softdevice" and then "make upload" and ther are no errors and everything looks correct to me.

Why does the blinky code run witout the softdevice and does not run with softdevice. What did i forget.

i atached my project with makefile. nrf51Demo.zip Hope some one can help me, it is realy tricky :D

best regards, nils minor

  • Hi,

    does really no one have any idea.

    Maybe it is because of this setting ind makefile where i flash the soft device.

    echo "device nrf51822\nspeed 1000\nw4 4001e504 1\nw4 0x10001000    
    $(FLASH_START_ADDRESS)\nw4 0x10001010 0xFFFF0053\nloadbin 
     $(PWD)/$(OUTPUT_DIR)/sd_s120.bin 0\nr\ng\nexit\n" > $(OUTPUT_DIR)/upload-softdevice.jlink
    

    for what is nw4 0x10001000 $(FLASH_START_ADDRESS)\nw4 0x10001010 0xFFFF0053 good for? maybe this require a boot loader, but first i do not need any boot loader.

    Best regards, Nils

  • Hi,

    I'm sorry for the late response. I tried to recreate this problem with gcc when I found that there was a typo in the SD document. The flash origin should be 0x1C000 and not 0x2000 as stated in the documentation. This will be fixed in the next release.

    linker script:

    /* Linker script to configure memory regions. */
    
    SEARCH_DIR(.)
    GROUP(-lgcc -lc -lnosys)
    
    MEMORY
    {
      FLASH (rx) : ORIGIN = 0x0001C000, LENGTH = 0x24000 
      RAM (rwx) :  ORIGIN = 0x20002800, LENGTH = 0x1800 
    }
    
    
    INCLUDE "gcc_nrf51_common.ld"
    
Related