osd-contiki/cpu/cc2538/dev
Benoît Thébaudeau 37e73894f1 cc2538: Move SoC data to a dedicated section to save space
Some SoC data requires huge alignments. E.g., the µDMA channel control table has
to be 1024-byte aligned. This table was simply aligned to 1024 bytes in the C
code, which had the following consequences, wasting a lot of RAM:
 - As this table could be placed anywhere in .bss, there could be an alignment
   gap of up to 1023 bytes between the preceding data and this table.
 - The size of this table was also aligned to 1024 bytes, regardless of
   UDMA_CONF_MAX_CHANNEL, making this configuration option supposed to save RAM
   just useless.
 - .bss was also aligned to at least 1024 bytes, creating a huge alignment gap
   between .data and .bss.

Instead of relying on the compiler to force this alignment, and on the linker to
automatically place data, this change places carefully such SoC data in RAM
using the linker script. A dedicated section is created to place such SoC data
requiring huge alignments, and it is put at the beginning of the SRAM in order
to ensure a maximal alignment without any gap. In this way, the alignment of
.bss also remains normal, and the size of this table is not constrained by its
alignment, but only by its contents (i.e. by UDMA_CONF_MAX_CHANNEL).

In the case of the µDMA channel control table, the data is still zeroed by
udma_init() (instead of also being zeroed as part of .bss).

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2013-12-23 15:06:13 +01:00
..
ana-regs.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
cc2538-rf.c Added a function for setting promiscous mode on the CC2538 RF core 2013-11-23 15:05:15 +01:00
cc2538-rf.h Added missing argument declaration 2013-11-23 15:05:16 +01:00
flash-cca.h cc2538: Add header file for flash CCA page and use it 2013-12-05 18:45:51 +01:00
gpio.c cc2538: lpm: Fix RTIMER_NOW() upon wake-up 2013-12-05 20:23:29 +01:00
gpio.h cc2538: gpio: Add macros to use GPIO power-up interrupts 2013-11-26 22:10:47 +01:00
gptimer.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
ioc.c New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
ioc.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
mpu.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
nvic.c New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
nvic.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
random.c New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
rfcore-ffsm.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
rfcore-sfr.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
rfcore-xreg.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
rfcore.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
rom-util.h cc2538: Add driver for the rom utility function library 2013-11-18 12:38:06 +01:00
scb.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
smwdthrosc.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
soc-adc.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
spi.c cc2538: Clean up port and pin definitions 2013-11-25 15:00:41 +01:00
ssi.h Added SPI driver for CC2538 2013-09-27 17:46:15 -04:00
sys-ctrl.c cc2538: sys_ctrl: Make it possible to use the 32-kHz crystal 2013-11-15 15:52:10 +01:00
sys-ctrl.h cc2538: sys_ctrl: Make it possible to use the 32-kHz crystal 2013-11-15 15:52:10 +01:00
systick.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
uart.c cc2538: Clean up port and pin definitions 2013-11-25 15:00:41 +01:00
uart.h Make the CC2538 UART driver more configurable 2013-08-09 12:20:25 +01:00
uart1.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
udma.c cc2538: Move SoC data to a dedicated section to save space 2013-12-23 15:06:13 +01:00
udma.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
usb-regs.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
watchdog.c New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00