Merge branch 'bugfix/dram_attr' into 'master'

fix DRAM_ATTR attribute

Variables marked with DRAM_ATTR were not placed in any specific section and were appended to the last section, causing some errors at binary file generation stage.
This change places contents of .dram1 section into .dram0.data.
Also removes .iram1pro/.iram1app/.dram1pro/.dram1app which weren't used anywhere.

See merge request !23
This commit is contained in:
Ivan Grokhotkov 2016-08-25 10:19:17 +08:00
commit 2cd1da31f9
2 changed files with 4 additions and 9 deletions

View file

@ -20,16 +20,10 @@
//and all variables in shared RAM. This can be redirected to IRAM if
//needed using these macros.
//Forces data and flash into IRAM instead of flash / shared RAM
// Forces code into IRAM instead of flash
#define IRAM_ATTR __attribute__((section(".iram1")))
// Forces data into DRAM instead of flash
#define DRAM_ATTR __attribute__((section(".dram1")))
//Forces data and flash into the IRAM section of a specific core.
//Normally, you shouldn't have to use this: the linker will take care of
//only linking in the functions for that specific core.
#define IRAM_C0_ATTR __attribute__((section(".iram1pro")))
#define DRAM_C0_ATTR __attribute__((section(".iram1pro")))
#define IRAM_C1_ATTR __attribute__((section(".dram1app")))
#define DRAM_C1_ATTR __attribute__((section(".dram1app")))
#endif /* __ESP_ATTR_H__ */

View file

@ -106,6 +106,7 @@ SECTIONS
KEEP(*(.sdata2.*))
KEEP(*(.gnu.linkonce.s2.*))
KEEP(*(.jcr))
*(.dram1 .dram1.*)
_data_end = ABSOLUTE(.);
. = ALIGN(4);
_heap_start = ABSOLUTE(.);