mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-09 08:37:58 +08:00
2008-11-20 Joel Sherrill <joel.sherrill@oarcorp.com>
* .cvsignore, ChangeLog, Makefile.am, README, bsp_specs, configure.ac, preinstall.am, console/console-io.c, include/.cvsignore, include/bsp.h, start/start.S, startup/linkcmds, tools/.cvsignore, tools/Makefile.am, tools/configure.ac, tools/runtest.in: New files.
This commit is contained in:
1 parent
1b5e5524e6
commit
858ea06c85
16 files changed
+908
No files matched your search
@@ -0,0 +1,8 @@
|
||||
aclocal.m4
|
||||
autom4te*.cache
|
||||
config.cache
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -0,0 +1,7 @@
|
||||
2008-11-20 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* .cvsignore, ChangeLog, Makefile.am, README, bsp_specs, configure.ac,
|
||||
preinstall.am, console/console-io.c, include/.cvsignore,
|
||||
include/bsp.h, start/start.S, startup/linkcmds, tools/.cvsignore,
|
||||
tools/Makefile.am, tools/configure.ac, tools/runtest.in: New files.
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../../../aclocal
|
||||
|
||||
include $(top_srcdir)/../../../../automake/compile.am
|
||||
include $(top_srcdir)/../../bsp.am
|
||||
|
||||
include_bspdir = $(includedir)/bsp
|
||||
|
||||
dist_project_lib_DATA = bsp_specs
|
||||
|
||||
include_HEADERS = include/bsp.h
|
||||
include_HEADERS += ../../shared/include/tm27.h
|
||||
|
||||
nodist_include_HEADERS = include/bspopts.h
|
||||
nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
|
||||
DISTCLEANFILES = include/bspopts.h
|
||||
noinst_PROGRAMS =
|
||||
|
||||
SUBDIRS = . tools
|
||||
|
||||
nodist_include_HEADERS += ../../shared/include/coverhd.h
|
||||
|
||||
EXTRA_DIST = start/start.S
|
||||
start.$(OBJEXT): start/start.S
|
||||
$(CPPASCOMPILE) -o $@ -c $<
|
||||
project_lib_DATA = start.$(OBJEXT)
|
||||
|
||||
dist_project_lib_DATA += startup/linkcmds
|
||||
|
||||
startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
|
||||
../../shared/bsppredriverhook.c ../../shared/bsppretaskinghook.c \
|
||||
../../shared/bspgetworkarea.c ../../shared/bsppost.c \
|
||||
../../shared/bspstart.c ../../shared/bootcard.c ../../shared/sbrk.c \
|
||||
../../shared/gnatinstallhandler.c
|
||||
clock_SOURCES = ../../shared/clock_driver_simidle.c
|
||||
console_SOURCES = ../../shared/console-polled.c console/console-io.c
|
||||
timer_SOURCES = ../../shared/timerstub.c
|
||||
|
||||
noinst_LIBRARIES = libbsp.a
|
||||
libbsp_a_SOURCES = $(startup_SOURCES) $(clock_SOURCES) $(console_SOURCES) \
|
||||
$(timer_SOURCES)
|
||||
|
||||
EXTRA_DIST += times
|
||||
|
||||
include $(srcdir)/preinstall.am
|
||||
include $(top_srcdir)/../../../../automake/local.am
|
||||
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
This BSP is designed to operate on the AVR Mega128 variants.
|
||||
|
||||
It has only been run on the AVRTEST simulator.
|
||||
|
||||
Download from sourceforge.net:
|
||||
|
||||
cvs -d:pserver:anonymous@winavr.cvs.sourceforge.net:/cvsroot/winavr login
|
||||
cvs -z3 -d:pserver:anonymous@winavr.cvs.sourceforge.net:/cvsroot/winavr \
|
||||
co -P avrtest
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
%rename endfile old_endfile
|
||||
%rename startfile old_startfile
|
||||
%rename link old_link
|
||||
|
||||
*startfile:
|
||||
%{!qrtems: %(old_startfile)} \
|
||||
%{!nostdlib: %{qrtems: start.o%s}}
|
||||
|
||||
*endfile:
|
||||
%{!qrtems: %(old_endfile)} \
|
||||
%{!nostdlib: %{qrtems:}}
|
||||
|
||||
*link:
|
||||
%(old_link) %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _start}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
## Process this file with autoconf to produce a configure script.
|
||||
##
|
||||
## $Id$
|
||||
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT([rtems-c-src-lib-libbsp-h8300-h8sim],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
|
||||
AC_CONFIG_SRCDIR([bsp_specs])
|
||||
RTEMS_TOP(../../../../../..)
|
||||
|
||||
RTEMS_CANONICAL_TARGET_CPU
|
||||
AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.10])
|
||||
RTEMS_BSP_CONFIGURE
|
||||
|
||||
RTEMS_CONFIG_BUILD_SUBDIRS(tools)
|
||||
|
||||
RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
|
||||
RTEMS_CANONICALIZE_TOOLS
|
||||
RTEMS_PROG_CCAS
|
||||
|
||||
BSP_BOOTCARD_OPTIONS
|
||||
|
||||
# Explicitly list all Makefiles here
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* This file contains the hardware specific portions of the TTY driver
|
||||
* for the serial ports on the erc32.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* 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 <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define STDIO_PORT 0x52
|
||||
#define EXIT_PORT 0x4F
|
||||
#define ABORT_PORT 0x49
|
||||
|
||||
/*
|
||||
* console_initialize_hardware
|
||||
*
|
||||
* This routine initializes the console hardware.
|
||||
*
|
||||
*/
|
||||
|
||||
void console_initialize_hardware(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* console_outbyte_polled
|
||||
*
|
||||
* This routine transmits a character using polling.
|
||||
*/
|
||||
void console_outbyte_polled(
|
||||
int port,
|
||||
char ch
|
||||
)
|
||||
{
|
||||
*((volatile unsigned char *) STDIO_PORT) = ch;
|
||||
}
|
||||
|
||||
/*
|
||||
* console_inbyte_nonblocking
|
||||
*
|
||||
* This routine polls for a character.
|
||||
*/
|
||||
|
||||
int console_inbyte_nonblocking(
|
||||
int port
|
||||
)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
void AVRsimBSP_output_char(char c) { console_outbyte_polled( 0, c ); }
|
||||
|
||||
BSP_output_char_function_type BSP_output_char = AVRsimBSP_output_char;
|
||||
BSP_polling_getchar_function_type BSP_poll_char = NULL;
|
||||
@@ -0,0 +1,5 @@
|
||||
bspopts.h
|
||||
bspopts.h.in
|
||||
coverhd.h
|
||||
stamp-h
|
||||
stamp-h.in
|
||||
@@ -0,0 +1,55 @@
|
||||
/* bsp.h
|
||||
*
|
||||
* This include file contains some definitions specific to the
|
||||
* h8 simulator in gdb.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#ifndef _BSP_H
|
||||
#define _BSP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <bspopts.h>
|
||||
|
||||
#include <rtems.h>
|
||||
#include <rtems/iosupp.h>
|
||||
#include <rtems/console.h>
|
||||
#include <rtems/clockdrv.h>
|
||||
|
||||
/* support for simulated clock tick */
|
||||
Thread clock_driver_sim_idle_body(uintptr_t);
|
||||
#define BSP_IDLE_TASK_BODY clock_driver_sim_idle_body
|
||||
|
||||
/*
|
||||
* Simple spin delay in microsecond units for device drivers.
|
||||
* This is very dependent on the clock speed of the target.
|
||||
*/
|
||||
|
||||
#define rtems_bsp_delay( microseconds ) \
|
||||
{ register uint32_t _delay=(microseconds); \
|
||||
register uint32_t _tmp = 0; /* initialized to avoid warning */ \
|
||||
asm volatile( "0: \
|
||||
remo 3,31,%0 ; \
|
||||
cmpo 0,%0 ; \
|
||||
subo 1,%1,%1 ; \
|
||||
cmpobne.t 0,%1,0b " \
|
||||
: "=d" (_tmp), "=d" (_delay) \
|
||||
: "0" (_tmp), "1" (_delay) ); \
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,67 @@
|
||||
## 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_INCLUDE)/bsp/$(dirstamp):
|
||||
@$(MKDIR_P) $(PROJECT_INCLUDE)/bsp
|
||||
@: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(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: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
|
||||
|
||||
$(PROJECT_INCLUDE)/tm27.h: ../../shared/include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.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)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.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
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
|
||||
#define SPL 0x3d
|
||||
#define SPH 0x3e
|
||||
#define SREG 0x3f
|
||||
#define RAMPZ 0x3b
|
||||
|
||||
#define RAMEND (64 * 1024)
|
||||
|
||||
/*
|
||||
.weak __stack
|
||||
.set __stack, RAMEND - 1
|
||||
*/
|
||||
|
||||
.weak __heap_end
|
||||
.set __heap_end, 0
|
||||
|
||||
|
||||
.section .vectors,"ax",@progbits
|
||||
.global __vectors
|
||||
.func __vectors
|
||||
__vectors:
|
||||
__reset:
|
||||
jmp __init
|
||||
.endfunc
|
||||
|
||||
.section .init0,"ax",@progbits
|
||||
.weak __init
|
||||
; .func __init
|
||||
__init:
|
||||
|
||||
.section .init2,"ax",@progbits
|
||||
clr r1
|
||||
out 0x3f, r1
|
||||
ldi r28,lo8(__stack)
|
||||
ldi r29,hi8(__stack)
|
||||
out SPH, r29
|
||||
out SPL, r28
|
||||
|
||||
/* Only for >64K devices with RAMPZ, replaces the default code
|
||||
provided by libgcc.S which is only linked in if necessary. */
|
||||
|
||||
.section .init4,"ax",@progbits
|
||||
.global __do_copy_data
|
||||
__do_copy_data:
|
||||
.global __do_clear_bss
|
||||
__do_clear_bss:
|
||||
#if 0
|
||||
ldi r17, hi8(__data_end)
|
||||
|
||||
ldi r26, lo8(__data_start)
|
||||
ldi r27, hi8(__data_start)
|
||||
|
||||
ldi r30, lo8(__data_load_start)
|
||||
ldi r31, hi8(__data_load_start)
|
||||
ldi r16, hh8(__data_load_start)
|
||||
out RAMPZ, r16
|
||||
|
||||
0:
|
||||
cpi r26, lo8(__data_end)
|
||||
cpc r27, r17
|
||||
breq 1f
|
||||
|
||||
elpm r0, Z+
|
||||
st X+, r0
|
||||
rjmp 0b
|
||||
1:
|
||||
#endif
|
||||
|
||||
.section .init9,"ax",@progbits
|
||||
call boot_card
|
||||
jmp exit
|
||||
; .endfunc
|
||||
|
||||
.global exit
|
||||
.func exit
|
||||
exit: out 0x2f, r0
|
||||
.endfunc
|
||||
|
||||
.global abort
|
||||
.func abort
|
||||
abort: out 0x29, r0
|
||||
.endfunc
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,9 @@
|
||||
aclocal.m4
|
||||
autom4te*.cache
|
||||
config.cache
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
Makefile
|
||||
Makefile.in
|
||||
runtest
|
||||
@@ -0,0 +1,26 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../../../../aclocal
|
||||
|
||||
transform =
|
||||
bsptools_bindir = ${exec_prefix}/@RTEMS_BSP@/tests
|
||||
bsptools_bin_SCRIPTS = runtest
|
||||
|
||||
all-local: $(TMPINSTALL_FILES)
|
||||
|
||||
TMPINSTALL_FILES =
|
||||
|
||||
$(PROJECT_ROOT)/@RTEMS_BSP@/tests/$(dirstamp):
|
||||
@$(MKDIR_P) $(PROJECT_ROOT)/@RTEMS_BSP@/tests
|
||||
@: > $(PROJECT_ROOT)/@RTEMS_BSP@/tests/$(dirstamp)
|
||||
TMPINSTALL_FILES += $(PROJECT_ROOT)/@RTEMS_BSP@/tests/$(dirstamp)
|
||||
|
||||
$(PROJECT_ROOT)/@RTEMS_BSP@/tests/runtest: runtest $(PROJECT_ROOT)/@RTEMS_BSP@/tests/$(dirstamp)
|
||||
$(INSTALL_SCRIPT) $< $(PROJECT_ROOT)/@RTEMS_BSP@/tests/runtest
|
||||
TMPINSTALL_FILES += $(PROJECT_ROOT)/@RTEMS_BSP@/tests/runtest
|
||||
|
||||
CLEANFILES = $(TMPINSTALL_FILES)
|
||||
|
||||
include $(top_srcdir)/../../../../../automake/host.am
|
||||
@@ -0,0 +1,25 @@
|
||||
## Process this file with autoconf to produce a configure script.
|
||||
##
|
||||
## $Id$
|
||||
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT([rtems-c-src-lib-libbsp-sparc-erc32-tools],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
|
||||
AC_CONFIG_SRCDIR([runtest.in])
|
||||
RTEMS_TOP(../../../../../../..)
|
||||
|
||||
RTEMS_CANONICAL_TARGET_CPU
|
||||
|
||||
AM_INIT_AUTOMAKE([no-define foreign 1.10])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
RTEMS_ENV_RTEMSBSP
|
||||
|
||||
RTEMS_PATH_KSH
|
||||
|
||||
RTEMS_PROJECT_ROOT
|
||||
RTEMS_TOOLPATHS
|
||||
|
||||
# Explicitly list all Makefiles here
|
||||
AC_CONFIG_FILES([Makefile
|
||||
runtest])
|
||||
AC_OUTPUT
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user