diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-03-24 20:55:40 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-03-24 22:59:27 +0100 |
commit | 1ed238ec4373d5d7d7d0d3af797d20d5afaf378a (patch) | |
tree | ff335f6c51caa5354b16805c1b1b10b190a518e0 /c/src/lib/libbsp/arm/lm3s69xx/startup | |
parent | bsps: Shared ARMv7-M clock driver (diff) | |
download | rtems-1ed238ec4373d5d7d7d0d3af797d20d5afaf378a.tar.bz2 |
bsp/lm3s69xx: Use shared start.S
Diffstat (limited to 'c/src/lib/libbsp/arm/lm3s69xx/startup')
-rw-r--r-- | c/src/lib/libbsp/arm/lm3s69xx/startup/bspstarthook.c | 69 |
1 files changed, 6 insertions, 63 deletions
diff --git a/c/src/lib/libbsp/arm/lm3s69xx/startup/bspstarthook.c b/c/src/lib/libbsp/arm/lm3s69xx/startup/bspstarthook.c index 33d0670205..241e54e6ab 100644 --- a/c/src/lib/libbsp/arm/lm3s69xx/startup/bspstarthook.c +++ b/c/src/lib/libbsp/arm/lm3s69xx/startup/bspstarthook.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sebastian Huber. All rights reserved. + * Copyright (c) 2011-2012 Sebastian Huber. All rights reserved. * * embedded brains GmbH * Obere Lagerstr. 30 @@ -12,74 +12,17 @@ * http://www.rtems.com/license/LICENSE. */ -#include <bspopts.h> +#include <bsp.h> #include <bsp/start.h> -#include <bsp/linker-symbols.h> -static void BSP_START_TEXT_SECTION copy(int *dst, const int *src, int n) -{ - if (src != dst) { - const int *end = dst + (n + sizeof(int) - 1) / sizeof(int); - - while (dst != end) { - *dst = *src; - ++src; - ++dst; - } - } -} - -static void BSP_START_TEXT_SECTION clear_bss(void) +void BSP_START_TEXT_SECTION bsp_start_hook_0(void) { - int *dst = (int *) bsp_section_bss_begin; - int n = (int) bsp_section_bss_size; - const int *end = dst + (n + sizeof(int) - 1) / sizeof(int); - - while (dst != end) { - *dst = 0; - ++dst; - } + /* Do nothing */ } -void BSP_START_TEXT_SECTION bsp_start_hook_0(void) +void BSP_START_TEXT_SECTION bsp_start_hook_1(void) { - /* Copy .text section */ - copy( - (int *) bsp_section_text_begin, - (const int *) bsp_section_text_load_begin, - (size_t) bsp_section_text_size - ); - - /* Copy .rodata section */ - copy( - (int *) bsp_section_rodata_begin, - (const int *) bsp_section_rodata_load_begin, - (size_t) bsp_section_rodata_size - ); - - /* Copy .data section */ - copy( - (int *) bsp_section_data_begin, - (const int *) bsp_section_data_load_begin, - (size_t) bsp_section_data_size - ); - - /* Copy .fast_text section */ - copy( - (int *) bsp_section_fast_text_begin, - (const int *) bsp_section_fast_text_load_begin, - (size_t) bsp_section_fast_text_size - ); - - /* Copy .fast_data section */ - copy( - (int *) bsp_section_fast_data_begin, - (const int *) bsp_section_fast_data_load_begin, - (size_t) bsp_section_fast_data_size - ); - - /* Clear .bss section */ - clear_bss(); + bsp_start_copy_sections(); /* At this point we can use objects outside the .start section */ } |