diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-11-15 03:10:04 -0500 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2012-04-11 16:52:17 -0400 |
commit | 4b245f8744ae7abc8d77a9b90f273106eee3541f (patch) | |
tree | 9c8f1b239d4baf80349071ef7e3d9c777f163035 /support/ld/maple_native | |
parent | 19fbeddca7111d751a22740ed5016ba50ad6dc95 (diff) | |
download | librambutan-4b245f8744ae7abc8d77a9b90f273106eee3541f.tar.gz librambutan-4b245f8744ae7abc8d77a9b90f273106eee3541f.zip |
Remove CS3-style initialization.
Remove libcs3-related bits from support/ld. Break them out into
libmaple proper and Wirish as appropriate: vector table definition and
ISR declarations go into libmaple proper, and startup code goes into
Wirish. Vector table symbols are included into common.inc from an
STM32 family-specific directory under support/ld/stm32.
This is a combination of 5 commits. Individual commit messages follow:
libcs3_stm32_src: Don't depend on cs3.h.
So we can use the existing toolchain.
Move ISR decls/vector table into libmaple proper.
This allows us to configure the vector table on a per-family basis.
- Move
support/ld/libcs3_stm32_src/stm32_isrs.S
stm32_vector_table.S
to
libmaple/stm32f1/isrs_performance.S
vector_table_performance.S,
respectively.
The directory libmaple/stm32f1/ is intended to hold all
STM32F1-specific code within libmaple. Obviously, there's a lot of
work to do before this becomes true.
- support/ld/libcs3_stm32_src/Makefile: Don't try to compile
stm32_isrs.S and stm32_vector_table.S anymore.
- Add libmaple/stm32f1/rules.mk to include these new files in the
standard libmaple build.
- support/make/target-config.mk: Add LIBMAPLE_MODULE_FAMILY, which
selects a directory to use as a family-specific libmaple
submodule.
- Makefile: Add LIBMAPLE_MODULE_FAMILY to LIBMAPLE_MODULES.
Remove support/ld/libcs3_stm32_src and derived object files.
From support/ld/libcs3_stm32_src, move start.S and start_c.c into
Wirish. Modify wirish/rules.mk accordingly.
Delete support/ld/libcs3_stm32_*_density.a. These are no longer
necessary, as the relevant objects are included in the standard Wirish
build. Remove the GROUP statements from the board linker scripts
accordingly.
Remove SEARCH_DIR(.) from common.inc; it's no longer necessary. Also
fix up some comments that are now out of date.
wirish/start_c.c: Don't use CS3-style memory initialization.
Switch memory initialization to a simpler style of initializing .data
if necessary, then zeroing .bss. Initializing .data is only necessary
during Flash builds, since during RAM builds, LOADADDR(.data) ==
ADDR(.data).
This makes libmaple completely incompatible with the CS3 startup
sequence. Subsequent commits will clean up the namespace to reflect
that fact.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'support/ld/maple_native')
-rw-r--r-- | support/ld/maple_native/flash.ld | 5 | ||||
-rw-r--r-- | support/ld/maple_native/jtag.ld | 5 | ||||
-rw-r--r-- | support/ld/maple_native/ram.ld | 5 |
3 files changed, 0 insertions, 15 deletions
diff --git a/support/ld/maple_native/flash.ld b/support/ld/maple_native/flash.ld index b6e10f8..aac5325 100644 --- a/support/ld/maple_native/flash.ld +++ b/support/ld/maple_native/flash.ld @@ -8,11 +8,6 @@ MEMORY rom (rx) : ORIGIN = 0x08005000, LENGTH = 492K } -/* - * Use high density device vector table - */ -GROUP(libcs3_stm32_high_density.a) - REGION_ALIAS("REGION_TEXT", rom); REGION_ALIAS("REGION_DATA", ram); REGION_ALIAS("REGION_BSS", ram); diff --git a/support/ld/maple_native/jtag.ld b/support/ld/maple_native/jtag.ld index 9af2a11..412348e 100644 --- a/support/ld/maple_native/jtag.ld +++ b/support/ld/maple_native/jtag.ld @@ -9,11 +9,6 @@ MEMORY rom (rx) : ORIGIN = 0x08000000, LENGTH = 512K } -/* - * Use high density device vector table - */ -GROUP(libcs3_stm32_high_density.a) - REGION_ALIAS("REGION_TEXT", rom); REGION_ALIAS("REGION_DATA", ram); REGION_ALIAS("REGION_BSS", ram); diff --git a/support/ld/maple_native/ram.ld b/support/ld/maple_native/ram.ld index 7264316..eeec761 100644 --- a/support/ld/maple_native/ram.ld +++ b/support/ld/maple_native/ram.ld @@ -8,11 +8,6 @@ MEMORY rom (rx) : ORIGIN = 0x08005000, LENGTH = 0K } -/* - * Use high density device vector table - */ -GROUP(libcs3_stm32_high_density.a) - REGION_ALIAS("REGION_TEXT", ram); REGION_ALIAS("REGION_DATA", ram); REGION_ALIAS("REGION_BSS", ram); |