OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc
    from Rev 452 to Rev 453
    Reverse comparison

Rev 452 → Rev 453

/trunk/gnu-src/gcc-4.5.1/libgcc/config/or32/crti.S
22,6 → 22,7
 
.section .init
.global __init
l.nop # So __init doesn't start at 0
__init:
l.addi r1,r1,-4
l.sw 0(r1),r9
/trunk/gnu-src/gcc-4.5.1/libgcc/config/or32/crtn.S
21,13 → 21,11
# <http://www.gnu.org/licenses/>.
 
.section .init
__init:
l.lwz r9,0(r1)
l.jr r9
l.addi r1,r1,4
 
.section .fini
__fini:
l.lwz r9,0(r1)
l.jr r9
l.addi r1,r1,4
/trunk/gnu-src/gcc-4.5.1/gcc/ChangeLog.or32
1,3 → 1,13
2010-12-19 Jeremy Bennett <jeremy.bennett@embecosm.com>
 
* config.gcc <or32-*-linux*>: Remove extra_parts.
* config/or32/crti.S (__init): Add l.nop, so doesn't start at zero.
 
2010-12-19 Jeremy Bennett <jeremy.bennett@embecosm.com>
 
* config/or32/crtn.S (__init, __fini): remove labels.
* config.gcc <or32-*-linux*>: Add crti.o and crt.n to extra_parts.
 
2010-12-16 Joern Rennecke <joern.rennecke@embecosm.com>
 
* config.gcc (or32-*-elf*) <tm_defines>:
/trunk/gnu-src/gcc-4.5.1/gcc/config/or32/crti.S
20,8 → 20,11
# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
# <http://www.gnu.org/licenses/>.
 
# This is not needed in Linux, and probably not needed in ELF, but left here
# until we've checked it out.
.section .init
.global __init
l.nop # So __init doesn't start at 0
__init:
l.addi r1,r1,-4
l.sw 0(r1),r9
/trunk/gnu-src/gcc-4.5.1/gcc/config/or32/crtn.S
21,13 → 21,11
# <http://www.gnu.org/licenses/>.
 
.section .init
__init:
l.lwz r9,0(r1)
l.jr r9
l.addi r1,r1,4
 
.section .fini
__fini:
l.lwz r9,0(r1)
l.jr r9
l.addi r1,r1,4
/trunk/gnu-src/site.exp
3,6 → 3,9
set boards_dir {}
}
 
send_user "tool_root_dir = $tool_root_dir\n"
send_user "target_triplet = $target_triplet\n"
 
# Crude way of finding the boards directory
lappend boards_dir "${tool_root_dir}/../boards"
lappend boards_dir "${tool_root_dir}/../../boards"
12,6 → 15,9
global target_list
case "$target_triplet" in {
{ "or32-*-elf" } {
set target_list { "or32-sim" }
set target_list { "or32-elf-sim" }
}
{ "or32-*-linux*" } {
set target_list { "or32-linux-sim" }
}
}
/trunk/gnu-src/gdb-7.2/gdb/gdbserver/linux-or32-low.c
108,8 → 108,15
}
 
 
/*! Some useful GDB register numbers. */
#define GDB_REGNUM_R0 0
#define GDB_REGNUM_R31 31
#define GDB_REGNUM_PPC 32
#define GDB_REGNUM_NPC 33
#define GDB_REGNUM_SR 34
 
/*! This is the number of *GDB* registers. I.e. r0-r31, PPC, NPC and SR. */
#define or32_num_regs 35
#define or32_num_regs (GDB_REGNUM_SR + 1)
 
 
/* -------------------------------------------------------------------------- */
130,7 → 137,7
/* -------------------------------------------------------------------------- */
/*!Predicate to indicate if a register can be read.
 
For now, we believe all OR32 registers are readable.
We mark r0 as not readable.
 
@param[in] regno Register to read.
 
140,7 → 147,7
static int
or32_cannot_fetch_register (int regno)
{
return (regno >= or32_num_regs);
return (GDB_REGNUM_R0 == regno) || (regno >= or32_num_regs);
 
} /* or32_cannot_fetch_register () */
 
148,7 → 155,7
/* -------------------------------------------------------------------------- */
/*!Predicate to indicate if a register can be written.
 
For now, we believe all OR32 registers are writable.
We mark r0 and the SR as not writeable.
 
@param[in] regno Register to write.
 
158,7 → 165,8
static int
or32_cannot_store_register (int regno)
{
return (regno >= or32_num_regs);
return (GDB_REGNUM_R0 == regno) || (GDB_REGNUM_SR == regno) ||
(regno >= or32_num_regs);
 
} /* or32_cannot_store_register () */
 
/trunk/gnu-src/boards/or32-linux-sim.exp
0,0 → 1,201
#!/bin/bash
 
# Copyright (C) 2010 Embecosm Limited
 
# Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
# Contributor Joern Rennecke <joern.rennecke@embecosm.com>
 
# This file is a board description for testing OpenRISC with uClibc and
# Or1ksim running Linux.
 
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option)
# any later version.
 
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
 
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
 
# This is a list of toolchains that are supported on this board.
set_board_info target_install {or32-linux}
 
# No multilib options needed by default.
process_multilib_options ""
 
# Load the generic configuration for this board. This will define a basic set
# of routines needed by the tool to communicate with the board.
load_generic_config "unix"
 
# Set up remote target info
set_board_info hostname "192.168.0.3"
set_board_info username root
 
# Use the installed compilers to ensure we get search paths that will find
# uClibc.
send_user "set_board_info compiler /opt/or32-new/bin/or32-linux-gcc\n"
global GCC_UNDER_TEST
set GCC_UNDER_TEST "/opt/or32-new/bin/or32-linux-gcc"
set_board_info compiler /opt/or32-new/bin/or32-linux-gcc
set_board_info c++compiler /opt/or32-new/bin/or32-linux-g++
 
set_board_info connect telnet
set_board_info shell_prompt "~ # "
set_board_info telnet_username "root"
set_board_info telnet_password ""
 
set_board_info file_transfer ftp
set_board_info ftp_username root
set_board_info ftp_password ""
 
# Custom proc to close a telnet session
proc telnet_close {boardname} {
set spawn_id [board_info $boardname fileid]
verbose "Closing $boardname:$spawn_id"
 
if { $spawn_id >= 0 } {
catch {close -i $spawn_id}
catch wait
set spawn_id -1
 
set board_info($boardname,fileid) $spawn_id
}
}
 
 
# Custom proc to exec programs using telnet
proc telnet_exec {boardname cmd args} {
global timeout
global verbose
set output "(no output)"
 
verbose "Executing $boardname:$cmd $args"
 
if { [llength $args] > 0 } {
set pargs [lindex $args 0];
} else {
set pargs ""
}
 
if [board_info $boardname exists shell_prompt] {
set shell_prompt [board_info $boardname shell_prompt]
}
if ![info exists shell_prompt] { # if no prompt, then set it to
something generic
set shell_prompt ".*> "
}
 
#Start a new telnet session if one dosen't already exist
if ![board_info $boardname exists fileid] {
if {[telnet_open $boardname] == -1} {
return [list -1
"telnet to $boardname failed for $cmd, couldn't begin
telnet session"]
}
}
 
set spawn_id [board_info $boardname fileid]
set timeout 30
 
#Hit enter to make sure you get a shell prompt
send -- "\r"
 
expect {
-re "$shell_prompt.*$" {
verbose "Got a prompt"
}
default {
telnet_close $boardname
if {[telnet_open $boardname] != -1} {
verbose "started new telnet session, spawn_id is [board_info
$boardname fileid]"
send -- "\r"
exp_continue
} else {
return [list -1 "telnet to $boardname failed for $cmd, couldn't get
a shell prompt"]
}
send -- "\r"
exp_continue
}
}
set timeout 10
send "$cmd $pargs\r"
 
expect {
-re "$shell_prompt.*$" {
}
timeout {
if [info exists expect_out(buffer)] {
set execute_output_string $expect_out(buffer)
}
telnet_close $boardname
return "fail timeout"
}
}
#Remove unesesary strings from the output string
#
#If the file path contains any "+" signs, it will mess things up when $cmd
#is used as a regsub pattern (2 lines down), so we replace all "+"s with "."
regsub -all "\\+" $cmd "." cmd
regsub -all $cmd "$expect_out(buffer)" {} output
regsub $shell_prompt $output {} output
regsub -all "\[\r\n\]" $output {} output
 
#Check the return status
set timeout 30
send -- "echo \$?\r"
expect -re "$shell_prompt.*$"
 
#Regsub the output to get the status number
regsub -all {echo \$\?} $expect_out(buffer) {} status
regsub $shell_prompt $status {} status
regsub -all "\[\r\n \]" $status {} status
 
#This probably isn't neccessary..
if {[regexp {[0123456789]+} $status] != 1} {
warning "status not a number, it is <$status>, setting it to 1"
set status 1
}
 
if {$status == 0} {
return [list "0" "$output"]
} else {
return [list "1" "$output"]
}
}
 
# Options for the simulator
# set cfg_file [lookfor_file ${srcdir} libgloss/or32/sim.cfg]
# set_board_info sim,options "-a \"-f ${cfg_file}\""
 
# We only support uClibc on this target. We assume that all multilib options
# have been specified before we get here.
# set_board_info compiler "[find_gcc]"
 
# No linker script needed.
set_board_info ldscript ""
 
# This simulator isn't slow.
set_board_info slow_simulator 0
 
# Can't pass arguments to programs on this target..
set_board_info noargs 1
 
# Used by a few gcc.c-torture testcases to delimit how large the stack can
# be.
set_board_info gcc,stack_size 65536
 
# GDB options
 
# We can't do input in GDB (yet! HA!). It *will* do output, hurrah.
set_board_info gdb,noinferiorio 1
# Or pass arguments.
set_board_info gdb,noargs 1
set_board_info noargs 1
# And there's no support for signals.
set_board_info gdb,nosignals 1
/trunk/gnu-src/boards/or32-elf-sim.exp
0,0 → 1,78
#!/bin/bash
 
# Copyright (C) 2010 Embecosm Limited
 
# Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
# Contributor Joern Rennecke <joern.rennecke@embecosm.com>
 
# This file is a board description for testing OpenRISC with newlib and Or1ksim
 
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option)
# any later version.
 
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
 
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
 
# This is a list of toolchains that are supported on this board.
set_board_info target_install {or32-elf}
 
# Load the generic configuration for this board. This will define a basic set
# of routines needed by the tool to communicate with the board.
load_generic_config "sim"
 
# basic-sim.exp is a basic description for the standard Cygnus simulator.
load_base_board_description "basic-sim"
 
# The name of the sim subdir in src/sim.
setup_sim or32
 
# Options for the simulator
# set cfg_file [lookfor_file ${srcdir} libgloss/or32/sim.cfg]
# set_board_info sim,options "-a \"-f ${cfg_file}\""
 
# No multilib options needed by default.
process_multilib_options ""
 
# We only support newlib on this
# target. We assume that all multilib options have been specified
# before we get here.
 
# We do not specify the newlib include flags, since our strange file structure
# doesn't work with the standard expect commands, and will end up generating a
# blank -isystem option, which confuses things severely.
 
# It's sufficient just to specify -mor32-newlib. Bit of a shame to specify it
# both in cflags, which are also used when linking, so we'll get the libraries
# OK as well.
set_board_info compiler "[find_gcc]"
set_board_info cflags "-mor32-newlib"
 
# No linker script needed.
set_board_info ldscript ""
 
# This simulator isn't slow.
set_board_info slow_simulator 0
 
# Can't pass arguments to programs on this target..
set_board_info noargs 1
 
# Used by a few gcc.c-torture testcases to delimit how large the stack can
# be.
set_board_info gcc,stack_size 65536
 
# GDB options
 
# We can't do input in GDB (yet! HA!). It *will* do output, hurrah.
set_board_info gdb,noinferiorio 1
# Or pass arguments.
set_board_info gdb,noargs 1
set_board_info noargs 1
# And there's no support for signals.
set_board_info gdb,nosignals 1

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.