From e1147ec787b177b1126d4984676804a443a8f295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= Date: Fri, 13 Dec 2013 17:06:48 +0100 Subject: [PATCH] cc2538: Set the type of the .nrdata output section to NOLOAD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The .nrdata section is volatile, so its initialization must be controlled by the application, and not be automatically done by the startup code. It should neither be zeroed like .bss, nor be initialized from data in flash memory like .data. This was already supposed to be the case, but the output section type of .nrdata was not set to NOLOAD, causing the generated ELF .nrdata section header to be of type PROGBITS instead of NOBITS, i.e. load data was generated to be programmed in RAM, thus producing huge unprogrammable .bin files. Signed-off-by: Benoît Thébaudeau --- cpu/cc2538/cc2538.lds | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/cc2538/cc2538.lds b/cpu/cc2538/cc2538.lds index 635ec454b..df4fa2784 100644 --- a/cpu/cc2538/cc2538.lds +++ b/cpu/cc2538/cc2538.lds @@ -86,7 +86,7 @@ SECTIONS } > SRAM #if (LPM_CONF_MAX_PM==2) && (LPM_CONF_ENABLE != 0) - .nrdata : + .nrdata (NOLOAD) : { _nrdata = .; *(.nrdata*)