Changeset 1ed238e in rtems for c/src/lib/libbsp/arm/lm3s69xx


Ignore:
Timestamp:
Mar 24, 2012, 7:55:40 PM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
954393ca
Parents:
34c61517
git-author:
Sebastian Huber <sebastian.huber@…> (03/24/12 19:55:40)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/24/12 21:59:27)
Message:

bsp/lm3s69xx: Use shared start.S

Location:
c/src/lib/libbsp/arm/lm3s69xx
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/lm3s69xx/Makefile.am

    r34c61517 r1ed238e  
    4646noinst_LIBRARIES = libbspstart.a
    4747
    48 libbspstart_a_SOURCES = start/start.S
     48libbspstart_a_SOURCES = ../shared/start/start.S
    4949
    5050project_lib_DATA = start.$(OBJEXT)
     
    7676
    7777# Startup
    78 libbsp_a_SOURCES += startup/bspstart.c \
    79         startup/bspstarthook.c \
    80         startup/bspreset.c
     78libbsp_a_SOURCES += ../shared/startup/bsp-start-copy-sections.c
     79libbsp_a_SOURCES += ../shared/startup/bsp-start-memcpy.S
     80libbsp_a_SOURCES += startup/bspstart.c
     81libbsp_a_SOURCES += startup/bspstarthook.c
     82libbsp_a_SOURCES += startup/bspreset.c
    8183
    8284# IRQ
  • c/src/lib/libbsp/arm/lm3s69xx/startup/bspstarthook.c

    r34c61517 r1ed238e  
    11/*
    2  * Copyright (c) 2011 Sebastian Huber.  All rights reserved.
     2 * Copyright (c) 2011-2012 Sebastian Huber.  All rights reserved.
    33 *
    44 *  embedded brains GmbH
     
    1313 */
    1414
    15 #include <bspopts.h>
     15#include <bsp.h>
    1616#include <bsp/start.h>
    17 #include <bsp/linker-symbols.h>
    18 
    19 static void BSP_START_TEXT_SECTION copy(int *dst, const int *src, int n)
    20 {
    21   if (src != dst) {
    22     const int *end = dst + (n + sizeof(int) - 1) / sizeof(int);
    23 
    24     while (dst != end) {
    25       *dst = *src;
    26       ++src;
    27       ++dst;
    28     }
    29   }
    30 }
    31 
    32 static void BSP_START_TEXT_SECTION clear_bss(void)
    33 {
    34   int *dst = (int *) bsp_section_bss_begin;
    35   int n = (int) bsp_section_bss_size;
    36   const int *end = dst + (n + sizeof(int) - 1) / sizeof(int);
    37 
    38   while (dst != end) {
    39     *dst = 0;
    40     ++dst;
    41   }
    42 }
    4317
    4418void BSP_START_TEXT_SECTION bsp_start_hook_0(void)
    4519{
    46   /* Copy .text section */
    47   copy(
    48     (int *) bsp_section_text_begin,
    49     (const int *) bsp_section_text_load_begin,
    50     (size_t) bsp_section_text_size
    51   );
     20  /* Do nothing */
     21}
    5222
    53   /* Copy .rodata section */
    54   copy(
    55     (int *) bsp_section_rodata_begin,
    56     (const int *) bsp_section_rodata_load_begin,
    57     (size_t) bsp_section_rodata_size
    58   );
    59 
    60   /* Copy .data section */
    61   copy(
    62     (int *) bsp_section_data_begin,
    63     (const int *) bsp_section_data_load_begin,
    64     (size_t) bsp_section_data_size
    65   );
    66 
    67   /* Copy .fast_text section */
    68   copy(
    69     (int *) bsp_section_fast_text_begin,
    70     (const int *) bsp_section_fast_text_load_begin,
    71     (size_t) bsp_section_fast_text_size
    72   );
    73 
    74   /* Copy .fast_data section */
    75   copy(
    76     (int *) bsp_section_fast_data_begin,
    77     (const int *) bsp_section_fast_data_load_begin,
    78     (size_t) bsp_section_fast_data_size
    79   );
    80 
    81   /* Clear .bss section */
    82   clear_bss();
     23void BSP_START_TEXT_SECTION bsp_start_hook_1(void)
     24{
     25  bsp_start_copy_sections();
    8326
    8427  /* At this point we can use objects outside the .start section */
Note: See TracChangeset for help on using the changeset viewer.