Merge pull request #503 from ADVANSEE/cc2538-nrdata-noload

cc2538: Clean up link stage
This commit is contained in:
George Oikonomou 2014-01-30 07:58:55 -08:00
commit c8fbf8ca6e
3 changed files with 8 additions and 4 deletions

View file

@ -21,7 +21,7 @@ OBJCOPY_FLAGS += -O binary --gap-fill 0xff
### Are we building with code size optimisations? ### Are we building with code size optimisations?
ifeq ($(SMALL),1) ifeq ($(SMALL),1)
CFLAGS += -ffunction-sections -fdata-sections CFLAGS += -ffunction-sections -fdata-sections
LDFLAGS += -Wl,--gc-sections LDFLAGS += -Wl,--gc-sections,--sort-section=alignment
endif endif
### If the user-specified a Node ID, pass a define ### If the user-specified a Node ID, pass a define

View file

@ -64,10 +64,14 @@ SECTIONS
_etext = .; _etext = .;
} > FLASH= 0 } > FLASH= 0
.socdata (NOLOAD) :
{
*(.udma_channel_control_table)
} > SRAM
.data : .data :
{ {
_data = .; _data = .;
*(vtable)
*(.data*) *(.data*)
_edata = .; _edata = .;
} > SRAM AT > FLASH } > SRAM AT > FLASH
@ -86,7 +90,7 @@ SECTIONS
} > SRAM } > SRAM
#if (LPM_CONF_MAX_PM==2) && (LPM_CONF_ENABLE != 0) #if (LPM_CONF_MAX_PM==2) && (LPM_CONF_ENABLE != 0)
.nrdata : .nrdata (NOLOAD) :
{ {
_nrdata = .; _nrdata = .;
*(.nrdata*) *(.nrdata*)

View file

@ -51,7 +51,7 @@ struct channel_ctrl {
}; };
static volatile struct channel_ctrl channel_config[UDMA_CONF_MAX_CHANNEL + 1] static volatile struct channel_ctrl channel_config[UDMA_CONF_MAX_CHANNEL + 1]
__attribute__ ((aligned(1024))); __attribute__ ((section(".udma_channel_control_table")));
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
void void
udma_init() udma_init()