diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-11-15 08:39:01 -0500 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2012-04-11 16:52:17 -0400 |
commit | b81655333f0a7378eec66cfef668a7282d7a4b17 (patch) | |
tree | 35d49387c3fb32455e832c3730f36e9b18a13007 | |
parent | 4b245f8744ae7abc8d77a9b90f273106eee3541f (diff) | |
download | librambutan-b81655333f0a7378eec66cfef668a7282d7a4b17.tar.gz librambutan-b81655333f0a7378eec66cfef668a7282d7a4b17.zip |
Remove "CS3" prefix from libmaple symbol names.
We're no longer even marginally compatible with CS3, so it's
inappropriate to use that prefix in our names.
Rename:
__cs3_stm32_vector_table -> __stm32_vector_table.
__cs3_stack -> __msp_init
__cs3_reset -> __exc_reset
__cs3_start_c -> start_c
Also add an MIT license header and assert LeafLabs copyright over
wirish/start.S and wirish/start_c.c. These files are modified from
the original CodeSourcery versions, which were distributed under a
license that permits modifications to be distributed under a different
copyright and licensing terms than the originals.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
-rw-r--r-- | libmaple/stm32f1/vector_table_performance.S | 12 | ||||
-rw-r--r-- | support/ld/common.inc | 14 | ||||
-rw-r--r-- | support/ld/stm32/f1/performance/vector_symbols.inc | 4 | ||||
-rw-r--r-- | wirish/start.S | 34 | ||||
-rw-r--r-- | wirish/start_c.c | 35 |
5 files changed, 78 insertions, 21 deletions
diff --git a/libmaple/stm32f1/vector_table_performance.S b/libmaple/stm32f1/vector_table_performance.S index 7067d95..0392a02 100644 --- a/libmaple/stm32f1/vector_table_performance.S +++ b/libmaple/stm32f1/vector_table_performance.S @@ -2,13 +2,13 @@ .section ".stm32.interrupt_vector" - .globl __cs3_stm32_vector_table - .type __cs3_stm32_vector_table, %object + .globl __stm32_vector_table + .type __stm32_vector_table, %object -__cs3_stm32_vector_table: +__stm32_vector_table: /* CM3 core interrupts */ - .long __cs3_stack - .long __cs3_reset + .long __msp_init + .long __exc_reset .long __exc_nmi .long __exc_hardfault .long __exc_memmanage @@ -87,4 +87,4 @@ __cs3_stm32_vector_table: .long __irq_dma2_channel4_5 #endif /* STM32_HIGH_DENSITY */ - .size __cs3_stm32_vector_table, . - __cs3_stm32_vector_table + .size __stm32_vector_table, . - __stm32_vector_table diff --git a/support/ld/common.inc b/support/ld/common.inc index 0d1f4ed..926f9eb 100644 --- a/support/ld/common.inc +++ b/support/ld/common.inc @@ -22,21 +22,21 @@ GROUP(libgcc.a libc.a libm.a) INCLUDE vector_symbols.inc /* STM32 vector table. */ -EXTERN(__cs3_stm32_vector_table) +EXTERN(__stm32_vector_table) -/* libcs3 C start function. */ -EXTERN(__cs3_start_c) +/* C runtime initialization function. */ +EXTERN(start_c) /* main entry point */ EXTERN(main) /* Initial stack pointer value. */ -EXTERN(__cs3_stack) -PROVIDE(__cs3_stack = ORIGIN(ram) + LENGTH(ram)); +EXTERN(__msp_init) +PROVIDE(__msp_init = ORIGIN(ram) + LENGTH(ram)); /* Reset vector and chip reset entry point */ EXTERN(_start) -PROVIDE(__cs3_reset = _start); +PROVIDE(__exc_reset = _start); /* Heap boundaries, for libmaple */ EXTERN(_lm_heap_start); @@ -162,7 +162,7 @@ SECTIONS * to go about this. [mbolivar] */ _lm_heap_start = DEFINED(_lm_heap_start) ? _lm_heap_start : _end; - _lm_heap_end = DEFINED(_lm_heap_end) ? _lm_heap_end : __cs3_stack; + _lm_heap_end = DEFINED(_lm_heap_end) ? _lm_heap_end : __msp_init; . = ALIGN (8); _edata = .; } > REGION_DATA AT> REGION_TEXT diff --git a/support/ld/stm32/f1/performance/vector_symbols.inc b/support/ld/stm32/f1/performance/vector_symbols.inc index 6d7ff6e..f8519bb 100644 --- a/support/ld/stm32/f1/performance/vector_symbols.inc +++ b/support/ld/stm32/f1/performance/vector_symbols.inc @@ -1,5 +1,5 @@ -EXTERN(__cs3_stack) -EXTERN(__cs3_reset) +EXTERN(__msp_init) +EXTERN(__exc_reset) EXTERN(__exc_nmi) EXTERN(__exc_hardfault) EXTERN(__exc_memmanage) diff --git a/wirish/start.S b/wirish/start.S index 4d1d405..cb87d62 100644 --- a/wirish/start.S +++ b/wirish/start.S @@ -1,4 +1,34 @@ +/****************************************************************************** + * The MIT License + * + * Copyright (c) 2011 LeafLabs, LLC. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + *****************************************************************************/ + /* + * This file is a modified version of a file obtained from + * CodeSourcery Inc. (now part of Mentor Graphics Corp.), in which the + * following text appeared: + * * The authors hereby grant permission to use, copy, modify, distribute, * and license this software and its documentation for any purpose, provided * that existing copyright notices are retained in all copies and that this @@ -18,9 +48,9 @@ .type _start, %function _start: .fnstart - ldr r1,=__cs3_stack + ldr r1,=__msp_init mov sp,r1 - ldr r1,=__cs3_start_c + ldr r1,=start_c bx r1 .pool .cantunwind diff --git a/wirish/start_c.c b/wirish/start_c.c index cb96fc5..a80334d 100644 --- a/wirish/start_c.c +++ b/wirish/start_c.c @@ -1,4 +1,33 @@ -/* CS3 start_c routine. +/****************************************************************************** + * The MIT License + * + * Copyright (c) 2011 LeafLabs, LLC. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + *****************************************************************************/ + +/* + * This file is a modified version of a file obtained from + * CodeSourcery Inc. (now part of Mentor Graphics Corp.), in which the + * following text appeared: * * Copyright (c) 2006, 2007 CodeSourcery Inc * @@ -30,9 +59,7 @@ struct rom_img_cfg { extern char _lm_rom_img_cfgp; -void __attribute__ ((noreturn)) -__cs3_start_c (void) -{ +void __attribute__((noreturn)) start_c(void) { struct rom_img_cfg *img_cfg = (struct rom_img_cfg*)&_lm_rom_img_cfgp; long long *src; long long *dst; |