mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			Merge pull request #7957 from andrewleech/nrf_override_ram_linker
nRF5x: pass ram linker start/length from config systempull/8298/head
						commit
						0ded1fa0d7
					
				| 
						 | 
				
			
			@ -10,12 +10,14 @@
 | 
			
		|||
#endif
 | 
			
		||||
 | 
			
		||||
/* If softdevice is present, set aside space for it */
 | 
			
		||||
#if defined(SOFTDEVICE_PRESENT)
 | 
			
		||||
  #define MBED_RAM_START  0x200031D0
 | 
			
		||||
  #define MBED_RAM_SIZE   0xCE30
 | 
			
		||||
#else
 | 
			
		||||
  #define MBED_RAM_START  0x20000000
 | 
			
		||||
  #define MBED_RAM_SIZE   0x10000
 | 
			
		||||
#if !defined(MBED_RAM_START)
 | 
			
		||||
  #if defined(SOFTDEVICE_PRESENT)
 | 
			
		||||
    #define MBED_RAM_START  0x200031D0
 | 
			
		||||
    #define MBED_RAM_SIZE   0xCE30
 | 
			
		||||
  #else
 | 
			
		||||
    #define MBED_RAM_START  0x20000000
 | 
			
		||||
    #define MBED_RAM_SIZE   0x10000
 | 
			
		||||
  #endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define MBED_RAM0_START MBED_RAM_START
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,12 +26,14 @@
 | 
			
		|||
#endif
 | 
			
		||||
 | 
			
		||||
/* If softdevice is present, set aside space for it */
 | 
			
		||||
#if defined(SOFTDEVICE_PRESENT)
 | 
			
		||||
  #define MBED_RAM_START  0x200031D0
 | 
			
		||||
  #define MBED_RAM_SIZE   0xCE30
 | 
			
		||||
#else
 | 
			
		||||
  #define MBED_RAM_START  0x20000000
 | 
			
		||||
  #define MBED_RAM_SIZE   0x10000
 | 
			
		||||
#if !defined(MBED_RAM_START)
 | 
			
		||||
  #if defined(SOFTDEVICE_PRESENT)
 | 
			
		||||
    #define MBED_RAM_START  0x200031D0
 | 
			
		||||
    #define MBED_RAM_SIZE   0xCE30
 | 
			
		||||
  #else
 | 
			
		||||
    #define MBED_RAM_START  0x20000000
 | 
			
		||||
    #define MBED_RAM_SIZE   0x10000
 | 
			
		||||
  #endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define MBED_RAM0_START MBED_RAM_START
 | 
			
		||||
| 
						 | 
				
			
			@ -189,7 +191,7 @@ SECTIONS
 | 
			
		|||
        PROVIDE(__start_fs_data = .);
 | 
			
		||||
        KEEP(*(.fs_data))
 | 
			
		||||
        PROVIDE(__stop_fs_data = .);
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
        *(.jcr)
 | 
			
		||||
        . = ALIGN(4);
 | 
			
		||||
        /* All data end */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,12 +12,14 @@ if (!isdefinedsymbol(MBED_APP_SIZE)) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
/* If softdevice is present, set aside space for it */
 | 
			
		||||
if (isdefinedsymbol(SOFTDEVICE_PRESENT)) {
 | 
			
		||||
  define symbol MBED_RAM_START = 0x200031D0;
 | 
			
		||||
  define symbol MBED_RAM_SIZE  = 0xCE30;
 | 
			
		||||
} else {
 | 
			
		||||
  define symbol MBED_RAM_START = 0x20000000;
 | 
			
		||||
  define symbol MBED_RAM_SIZE  = 0x10000;
 | 
			
		||||
if (!isdefinedsymbol(MBED_RAM_START)) {
 | 
			
		||||
  if (isdefinedsymbol(SOFTDEVICE_PRESENT)) {
 | 
			
		||||
    define symbol MBED_RAM_START = 0x200031D0;
 | 
			
		||||
    define symbol MBED_RAM_SIZE  = 0xCE30;
 | 
			
		||||
  } else {
 | 
			
		||||
    define symbol MBED_RAM_START = 0x20000000;
 | 
			
		||||
    define symbol MBED_RAM_SIZE  = 0x10000;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
define symbol MBED_RAM0_START = MBED_RAM_START;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,13 +9,15 @@
 | 
			
		|||
  #define MBED_APP_SIZE 0x100000
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* If app_start is 0, do not set aside space for the softdevice */
 | 
			
		||||
#if MBED_APP_START == 0
 | 
			
		||||
  #define MBED_RAM_START  0x20000000
 | 
			
		||||
  #define MBED_RAM_SIZE   0x40000
 | 
			
		||||
#else
 | 
			
		||||
  #define MBED_RAM_START  0x20003188
 | 
			
		||||
  #define MBED_RAM_SIZE   0x3CE78
 | 
			
		||||
/* If softdevice is present, set aside space for it */
 | 
			
		||||
#if !defined(MBED_RAM_START)
 | 
			
		||||
  #if defined(SOFTDEVICE_PRESENT)
 | 
			
		||||
    #define MBED_RAM_START  0x20003188
 | 
			
		||||
    #define MBED_RAM_SIZE   0x3CE78
 | 
			
		||||
  #else
 | 
			
		||||
    #define MBED_RAM_START  0x20000000
 | 
			
		||||
    #define MBED_RAM_SIZE   0x40000
 | 
			
		||||
  #endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define MBED_RAM0_START MBED_RAM_START
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -25,13 +25,15 @@
 | 
			
		|||
  #define MBED_APP_SIZE 0x100000
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* If app_start is 0, do not set aside space for the softdevice */
 | 
			
		||||
#if MBED_APP_START == 0
 | 
			
		||||
  #define MBED_RAM_START  0x20000000
 | 
			
		||||
  #define MBED_RAM_SIZE   0x40000
 | 
			
		||||
#else
 | 
			
		||||
  #define MBED_RAM_START  0x20003188
 | 
			
		||||
  #define MBED_RAM_SIZE   0x3CE78
 | 
			
		||||
/* If softdevice is present, set aside space for it */
 | 
			
		||||
#if !defined(MBED_RAM_START)
 | 
			
		||||
  #if defined(SOFTDEVICE_PRESENT)
 | 
			
		||||
    #define MBED_RAM_START  0x20003188
 | 
			
		||||
    #define MBED_RAM_SIZE   0x3CE78
 | 
			
		||||
  #else
 | 
			
		||||
    #define MBED_RAM_START  0x20000000
 | 
			
		||||
    #define MBED_RAM_SIZE   0x40000
 | 
			
		||||
  #endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define MBED_RAM0_START MBED_RAM_START
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,13 +11,15 @@ if (!isdefinedsymbol(MBED_APP_SIZE)) {
 | 
			
		|||
    define symbol MBED_APP_SIZE = 0x100000;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* If app_start is 0, do not set aside space for the softdevice */
 | 
			
		||||
if (MBED_APP_START == 0) {
 | 
			
		||||
  define symbol MBED_RAM_START = 0x20000000;
 | 
			
		||||
  define symbol MBED_RAM_SIZE  = 0x40000;
 | 
			
		||||
} else {
 | 
			
		||||
  define symbol MBED_RAM_START = 0x20003188;
 | 
			
		||||
  define symbol MBED_RAM_SIZE  = 0x3CE78;
 | 
			
		||||
/* If softdevice is present, set aside space for it */
 | 
			
		||||
if (!isdefinedsymbol(MBED_RAM_START)) {
 | 
			
		||||
  if (isdefinedsymbol(SOFTDEVICE_PRESENT)) {
 | 
			
		||||
    define symbol MBED_RAM_START = 0x20003188;
 | 
			
		||||
    define symbol MBED_RAM_SIZE  = 0x3CE78;
 | 
			
		||||
  } else {
 | 
			
		||||
    define symbol MBED_RAM_START = 0x20000000;
 | 
			
		||||
    define symbol MBED_RAM_SIZE  = 0x40000;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
define symbol MBED_RAM0_START = MBED_RAM_START;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -495,7 +495,8 @@ class Config(object):
 | 
			
		|||
        self.target_labels = self.target.labels
 | 
			
		||||
        for override in BOOTLOADER_OVERRIDES:
 | 
			
		||||
            _, attr = override.split(".")
 | 
			
		||||
            setattr(self.target, attr, None)
 | 
			
		||||
            if not hasattr(self.target, attr):
 | 
			
		||||
                setattr(self.target, attr, None)
 | 
			
		||||
 | 
			
		||||
        self.cumulative_overrides = {key: ConfigCumulativeOverride(key)
 | 
			
		||||
                                     for key in CUMULATIVE_ATTRIBUTES}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue