summaryrefslogtreecommitdiff
path: root/src/stm/altos.ld
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-07-17 01:24:52 -0700
committerKeith Packard <keithp@keithp.com>2012-07-17 01:24:52 -0700
commita5d873d47b3b16ca32559b4de668bf07b25eddb0 (patch)
tree47c2ca395d776b4e4574ca59dbfdb49d8b6ea870 /src/stm/altos.ld
parent20877ae9de8bb5d3a29e2a96024e53afbd396f55 (diff)
altos: Place STM config values at fixed addresses for re-use
Just like cc1111, stick the serial number and radio calibration values at known fixed addresses so that when re-flashing the board, we can go find the existing values. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/altos.ld')
-rw-r--r--src/stm/altos.ld21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/stm/altos.ld b/src/stm/altos.ld
index f5a84f4c..f78a45d6 100644
--- a/src/stm/altos.ld
+++ b/src/stm/altos.ld
@@ -25,18 +25,22 @@ INCLUDE registers.ld
EXTERN (stm_interrupt_vector)
SECTIONS {
- . = ORIGIN(rom);
-
/*
* Rom contents
*/
- __text_start__ = .;
-
- .text : {
+ .text ORIGIN(rom) : {
+ __text_start__ = .;
*(.interrupt) /* Interrupt vectors */
+
+ . = ORIGIN(rom) + 0x100;
+
+ ao_romconfig.o(.romconfig*)
+ ao_product.o(.romconfig*)
+
*(.text*) /* Executable code */
*(.rodata*) /* Constants */
+
} > rom
.ARM.exidx : {
@@ -44,12 +48,10 @@ SECTIONS {
__text_end__ = .;
} > rom
- . = ORIGIN(ram);
- __data_start__ = .;
-
/* Data -- relocated to RAM, but written to ROM
*/
- .data : AT (ADDR(.ARM.exidx) + SIZEOF (.ARM.exidx)) {
+ .data ORIGIN(ram) : AT (ADDR(.ARM.exidx) + SIZEOF (.ARM.exidx)) {
+ __data_start__ = .;
*(.data) /* initialized data */
__data_end__ = .;
__bss_start__ = .;
@@ -63,7 +65,6 @@ SECTIONS {
PROVIDE(__stack__ = ORIGIN(ram) + LENGTH(ram));
PROVIDE(end = .);
-
}
ENTRY(start);