* ChangeLog, Makefile.am, README, bsp_specs, configure.ac,
	preinstall.am, include/bsp.h, include/bspopts.h.in, startup/linkcmds,
	startup/memmap.c: New files.
This commit is contained in:
Joel Sherrill
2008-05-06 21:01:27 +00:00
parent 2226b8f80b
commit 1781f59fcb
10 changed files with 531 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
2008-05-06 Ray Xu <rayx.cn@gmail.com>
* ChangeLog, Makefile.am, README, bsp_specs, configure.ac,
preinstall.am, include/bsp.h, include/bspopts.h.in, startup/linkcmds,
startup/memmap.c: New files.
2008-04-06 Ray Xu <rayx.cn@gmail.com>
* Add note in README, cleanup code, merge it with gp32 and submit it to RTEMS
2007-10-12 ZhangZhiMin <paopaoerzhang@gmail.com>
* Fix clock defect, verified BSP on skyeye
2007-08-06 XiaJiaShan <ximenpiaoxue4016@sina.com>
* Frist draft, port from GBA BSP, add console, ethernet driver

View File

@@ -0,0 +1,59 @@
##
## $Id$
##
ACLOCAL_AMFLAGS = -I ../../../../aclocal
include $(top_srcdir)/../../../../automake/compile.am
include $(top_srcdir)/../../bsp.am
dist_project_lib_DATA = bsp_specs
include_HEADERS = ../gp32/include/bsp.h
include_HEADERS += ../gp32/smc/smc.h
nodist_include_HEADERS = include/bspopts.h
DISTCLEANFILES = include/bspopts.h
noinst_PROGRAMS =
nodist_include_HEADERS += ../../shared/include/coverhd.h
EXTRA_DIST = ../gp32/start/start.S
start.$(OBJEXT): ../gp32/start/start.S
$(CPPASCOMPILE) -o $@ -c $<
project_lib_DATA = start.$(OBJEXT)
dist_project_lib_DATA += startup/linkcmds
noinst_PROGRAMS += startup.rel
startup_rel_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
../gp32/startup/bspstart.c ../gp32/startup/exit.c startup/memmap.c \
../../shared/bootcard.c ../../shared/sbrk.c \
../../shared/gnatinstallhandler.c
startup_rel_CPPFLAGS = $(AM_CPPFLAGS)
startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
noinst_PROGRAMS += console.rel
console_rel_SOURCES = ../gp32/console/uart.c ../../shared/console.c
console_rel_CPPFLAGS = $(AM_CPPFLAGS)
console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
noinst_PROGRAMS += abort.rel
abort_rel_SOURCES = ../shared/abort/abort.c
abort_rel_CPPFLAGS = $(AM_CPPFLAGS)
abort_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
noinst_PROGRAMS += smc.rel
smc_rel_SOURCES = ../gp32/smc/smc.c ../gp32/smc/smc.h
smc_rel_CPPFLAGS = $(AM_CPPFLAGS)
smc_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
noinst_LIBRARIES = libbsp.a
libbsp_a_SOURCES =
libbsp_a_LIBADD = startup.rel console.rel smc.rel abort.rel
libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/arm920.rel \
../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/clock.rel \
../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/timer.rel \
../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/irq.rel
include $(srcdir)/preinstall.am
include $(top_srcdir)/../../../../automake/local.am

View File

@@ -0,0 +1,8 @@
SMDK2410 is a standard evaluation board for samsung s3c2410 ARM9 CPU
This BSP was first developed by xiajiashan <ximenchuixue4016@sina.com>, based on gp32 Apr/2007
ZhiMing, Zhang <paopaoerzhang@gmail.com> fix timer defect and run it on skeyey
Ray, Xu merge this bsp with gp32 on Apr/2008
pls refer to wiki on how to run this BSP on skyeye.

View File

@@ -0,0 +1,13 @@
%rename endfile old_endfile
%rename startfile old_startfile
%rename link old_link
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _start}
*endfile:
%{!qrtems: *(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }

View File

@@ -0,0 +1,23 @@
## Process this file with autoconf to produce a configure script.
##
## configure.ac,v 1.5 2003/03/11 09:39:07 ralf Exp
AC_PREREQ(2.60)
AC_INIT([rtems-c-src-lib-libbsp-arm-smdk2410],[_RTEMS_VERSION],[rtems-bugs@OARcorp.com])
AC_CONFIG_SRCDIR([bsp_specs])
RTEMS_TOP(../../../../../..)
RTEMS_CANONICAL_TARGET_CPU
AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.10])
RTEMS_BSP_CONFIGURE
RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
RTEMS_CANONICALIZE_TOOLS
RTEMS_PROG_CCAS
RTEMS_CHECK_NETWORKING
AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View File

@@ -0,0 +1,33 @@
/*-------------------------------------------------------------------------+
| bsp.h - ARM BSP
|
| Copyright (c) Ray,Xu mailto:ray.cn AT gmail dot com
|
| The license and distribution terms for this file may be
| found in found in the file LICENSE in this distribution or at
| http://www.rtems.com/license/LICENSE.
|
| $Id$
+--------------------------------------------------------------------------*/
#ifndef _BSP_H
#define _BSP_H
#ifdef __cplusplus
extern "C" {
#endif
/**
* This file will not pre-installed
* smdk2410 BSP use bsp.h in gp32 now, This file is a place
* holder If you need to add sth specical for your 2410 bsp pls
* overide this file with your own. and change Makefile.am
*/
#ifdef __cplusplus
}
#endif
#endif /* _BSP_H */

View File

@@ -0,0 +1,16 @@
/* include/bspopts.h.in. Generated from configure.ac by autoheader. */
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION

View File

@@ -0,0 +1,58 @@
## Automatically generated by ampolish3 - Do not edit
if AMPOLISH3
$(srcdir)/preinstall.am: Makefile.am
$(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
endif
PREINSTALL_DIRS =
DISTCLEANFILES += $(PREINSTALL_DIRS)
all-local: $(TMPINSTALL_FILES)
TMPINSTALL_FILES =
CLEANFILES = $(TMPINSTALL_FILES)
all-am: $(PREINSTALL_FILES)
PREINSTALL_FILES =
CLEANFILES += $(PREINSTALL_FILES)
$(PROJECT_LIB)/$(dirstamp):
@$(MKDIR_P) $(PROJECT_LIB)
@: > $(PROJECT_LIB)/$(dirstamp)
PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
$(PROJECT_INCLUDE)/$(dirstamp):
@$(MKDIR_P) $(PROJECT_INCLUDE)
@: > $(PROJECT_INCLUDE)/$(dirstamp)
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
$(PROJECT_INCLUDE)/bsp.h: ../gp32/include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
$(PROJECT_INCLUDE)/smc.h: ../gp32/smc/smc.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/smc.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/smc.h
$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
$(PROJECT_INCLUDE)/coverhd.h: ../../shared/include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT)
$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds

View File

@@ -0,0 +1,275 @@
/*
* GP32 Linker script
*
* Written by Philippe Simons <loki_666@fastmail.fm>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
*
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm","elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
/* SEARCH_DIR(/usr/local/rtems-arm-dev-tools/arm-rtems/lib); */
MEMORY {
sdram : ORIGIN = 0x30000000, LENGTH = 64M
}
/*
* Declare some sizes.
*/
/* The base for SDRAM is set to umon's APPRAMBASE */
_sdram_base = DEFINED(_sdram_base) ? _sdram_base : 0x30000000;
_sdram_size = DEFINED(_sdram_size) ? _sdram_size : 64M;
_irq_stack_size = DEFINED(_irq_stack_size) ? _irq_stack_size : 0x1000;
_fiq_stack_size = DEFINED(_fiq_stack_size) ? _fiq_stack_size : 0x400;
_abt_stack_size = DEFINED(_abt_stack_size) ? _abt_stack_size : 0x100;
_svc_stack_size = DEFINED(_svc_stack_size) ? _svc_stack_size : 0x1000;
/* Do we need any of these for elf?
__DYNAMIC = 0; */
SECTIONS
{
.base :
{
arm_exception_table = .;
arm_reset_vect = .; /* 0x00 */
. += 4;
arm_undef_vect = .; /* 0x04 */
. += 4;
arm_swi_vect = .; /* 0x08 */
. += 4;
arm_iabrt_vect = .; /* 0x0c */
. += 4;
arm_dabrt_vect = .; /* 0x10 */
. += 4;
/* no vector here */
. += 4;
arm_irq_vect = .; /* 0x18 */
. += 4;
arm_fiq_vect = .; /* 0x1c */
. += 4;
/* FIXME: */
rtems_vector_table = .;
. += (8 * 4); /* 8 ARM interrupts */
bsp_vector_table = .;
. += (32 * 4); /* 32 S3C2400 interrupts */
. = ALIGN (0x100);
} > sdram
.text :
{
_axf_text_start = . ;
*(EXCLUDE_FILE (*text.iwram*) .text)
*(.text.*)
*(.stub)
/*
* Special FreeBSD sysctl sections.
*/
. = ALIGN (16);
__start_set_sysctl_set = .;
*(set_sysctl_*);
__stop_set_sysctl_set = ABSOLUTE(.);
*(set_domain_*);
*(set_pseudo_*);
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
*(.gnu.linkonce.t*)
*(.glue_7)
*(.glue_7t)
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} > sdram
__text_end = . ;
.init :
{
*(.init)
} > sdram /*=0*/
.jcr :
{
*(.jcr)
} > sdram
.fini :
{
*(.fini)
} > sdram /*=0*/
.rodata :
{
*(.rodata)
*all.rodata*(*)
*(.roda)
*(.rodata.*)
*(.gnu.linkonce.r*)
SORT(CONSTRUCTORS)
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} > sdram = 0xff
.ctors :
{
/* gcc uses crtbegin.o to find the start of the constructors, so
we make sure it is first. Because this is a wildcard, it
doesn't matter if the user does not actually link against
crtbegin.o; the linker won't look for a file to match a
wildcard. The wildcard also means that it doesn't matter which
directory crtbegin.o is in. */
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >sdram = 0
.dtors :
{
KEEP (*crtbegin.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >sdram = 0
.eh_frame :
{
KEEP (*(.eh_frame))
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >sdram = 0
.gcc_except_table :
{
*(.gcc_except_table)
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >sdram = 0
_axf_ro_end = . ;
.data ALIGN(4) :
{
_axf_data_start = ABSOLUTE(.);
*(.data)
*(.data.*)
*(.gnu.linkonce.d*)
CONSTRUCTORS
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >sdram = 0xff
__data_end = . ;
.bss ALIGN(4):
{
_axf_bss_start = ABSOLUTE(.);
_clear_start = .;
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN(64);
_clear_end = .;
. = ALIGN (256);
_abt_stack = .;
. += _abt_stack_size;
. = ALIGN (256);
_irq_stack = .;
. += _irq_stack_size;
. = ALIGN (256);
_fiq_stack = .;
. += _fiq_stack_size;
. = ALIGN (256);
_svc_stack = .;
. += _svc_stack_size;
/*
* Ideally, the MMU's translation table would be in SRAM. But we
* don't have any. If we don't use more regions than TLB entries (64),
* the lookup will only happen once for each region.
*/
. = ALIGN (16 * 1024);
_ttbl_base = .;
. += (16 * 1024);
. = ALIGN (1024);
_bss_free_start = .;
} > sdram
_axf_bss_end = . ;
_end = . ;
__end__ = . ;
PROVIDE (end = _end);
/* Debugging stuff follows? */
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/*.stack 0x80000 : { _stack = .; *(.stack) }*/
/* These must appear regardless of . */
}

View File

@@ -0,0 +1,28 @@
/*
* GP32 Memory Map
*
* Copyright (c) 2004 by Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
*
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#include <rtems.h>
#include <libcpu/mmu.h>
/* Remember, the ARM920 has 64 TLBs. If you have more 1MB sections than
* that, you'll have TLB lookups, which could hurt performance.
*/
mmu_sect_map_t mem_map[] = {
/* <phys addr> <virt addr> <size> <flags> */
{0x30000000, 0x00000000, 1, MMU_CACHE_NONE}, /* SDRAM for vectors */
{0x30000000, 0x30000000, 32, MMU_CACHE_WTHROUGH}, /* SDRAM W cache */
{0x32000000, 0x32000000, 32, MMU_CACHE_NONE}, /* SDRAM W/O cache */
{0x48000000, 0x48000000, 256, MMU_CACHE_NONE}, /* Internals Regs - */
{0x50000000, 0x50000000, 256, MMU_CACHE_NONE}, /* Internal Regs - */
{0x00000000, 0x00000000, 0, 0} /* The end */
};