source: rtems/c/src/lib/libbsp/powerpc/helas403/startup/linkcmds.dl @ 238f450

4.104.114.84.95
Last change on this file since 238f450 was be4284d0, checked in by Joel Sherrill <joel.sherrill@…>, on 09/30/98 at 21:50:42

BSP submitted by Thomas Doerfler <td@…>:

Finally I am through: I have found the last bugs that made RTEMS-
4.0-beta3 start on my ppc403 board from ROM. So now the '403
support is up to date again.

Roughly I have added the following features:

  • support for the on-chip interrupt controller (in a separate module)
  • interrupt support for the console device
  • termios support for the console device

==============================================
Since the BSP behaivour changed in some details (console no
longer is polling, other memory layout etc) I have created a new
BSP "helas403" rather than changing the "papyrus" BSP. The old
"polled" console driver still sticks around in "console.c.polled"
To get the BSP up and running, I had to create the new BSP files
(derived from papyrus). Besides that, the following source areas
have been changed:

  • c/src/lib/libcpu/powerpc/ppc403: changes to console driver, small changes to clock driver, new "ictrl" interrupt controller driver
  • c/src/exec/score/cpu/powerpc/ppc.h: some small changes (added ppc403 characteristics like a exception vector prefix register, some special register definitions). I am quite sure, they are compatible with the existing sources, although I did not check
  • c/src/exec/score/cpu/powerpc/cpu.c: There is one severe limitation in the exception entries: Due to the current code arrangement, the "branch absolute" to the ISR handler may only jump to the first 128MByte or the last 128MByte of the 4GByte address range. When the ppc403 is running out of ROM, the ROM functions are located in the last 128MByte (0xFFF00000 and up). These addresses were not handled correctly (sign reduced) in "install_raw_handler". The change I added should work on existing ppc BSPs aswell...
  • c/src/lib/libc/termios.c: During my tests, I added one change you sent me, so this patch will already be incorporated in the current source tree.

There are some smaller changes, see the attached diff file.

=========================================
Concerning the GNU toolchain:

I tried several tool chains. Finally I almost succeeded with

egcs-1.0.3a with patch egcs-1.0.3-rtems-diff-19980527

I had to add the following lines to the egcs files. Without them
configure complaint that the cross compiler could not generate
executable output.

  • additional lines needed in egcs distribution in file gcc/config/rs6000/rtems.h:

+++ lines start
#undef STARTFILE_DEFAULT_SPEC
#define STARTFILE_DEFAULT_SPEC "ecrti.o%s"

#undef ENDFILE_DEFAULT_SPEC
#define ENDFILE_DEFAULT_SPEC "ecrtn.o%s"
++++ lines end

As far as I have seen in the Changelog of egcs, you have recently
sent two patches affecting the powerpc support, but they were
added in the wrong order.... :-(

egcs-19980628 with patch egcs-19980628-rtems-diff-19980707 does
not work!

I used binutils 2.9.1 with patch binutils-2.9.1-rtems-diff-19980515

(binutils 2.8.1 does not work, internal error in gas)

and newlib-1.8.0 with patch newlib-1.8.0-rtems-diff-19980707

Finally I had to poke a line in the "bit" script, since, on my LINUX
machine, the GNU make is only available as "make", not as
"gmake"...

For all the tools and newlib I selected configuration "powerpc-
rtems".


IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler Herbststrasse 8
D-82178 Puchheim Germany
email: td@…

  • Property mode set to 100644
File size: 2.6 KB
Line 
1/*
2 *  This file contains directives for the GNU linker which are specific
3 *  to the helas403
4 *  This file is intended to be used together with dlentry.s
5 *  it will generate downloadable code
6 *
7 *  $Id$
8 */
9
10OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
11              "elf32-powerpc")
12OUTPUT_ARCH(powerpc)
13 SEARCH_DIR(/usr/local/powerpc-rtems/lib);
14 
15ENTRY(download_entry)
16 
17MEMORY
18  {
19        RAM : ORIGIN = 0, LENGTH = 8M
20        FLASH : ORIGIN = 0xFFF00000, LENGTH = 512K
21  }
22 
23SECTIONS
24{
25  .vectors : 0x00010100
26  {
27    *(.vectors)
28  } > RAM
29
30  .text :
31  {
32     text.start = . ;
33     *(.entry)
34     *(.entry2)
35     *(.text)
36     *(.rodata)
37     *(.rodata1)
38     *(.descriptors)
39     *(rom_ver)
40     etext = ALIGN(0x10);
41     _etext = .;
42
43
44     __CTOR_LIST__ = .;
45     LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
46     *(.ctors)
47     LONG(0)
48     __CTOR_END__ = .;
49
50     __DTOR_LIST__ = .;
51     LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
52     *(.dtors)
53     LONG(0)
54     __DTOR_END__ = .;
55
56     *(.lit)
57     *(.shdata)
58     *(.init)
59     *(.fini)
60     _endtext = ALIGN(0x10);
61     text.end = .;
62  } > RAM
63
64  text.size = text.end - text.start;
65
66  /* R/W Data */
67  .data :
68  {
69    *(.data)
70    *(.data1)
71    PROVIDE (__SDATA_START__ = .);
72    *(.sdata)
73  } > RAM
74 
75  PROVIDE (__EXCEPT_START__ = .);
76  .gcc_except_table   :
77  {
78        *(.gcc_except_table)
79  } >RAM
80  PROVIDE (__EXCEPT_END__ = .);
81
82  __GOT_START__ = .;
83  .got :
84  {
85     s.got = .;
86     *(.got.plt) *(.got)
87  } > RAM
88  __GOT_END__ = .;
89
90  .got1 :
91  {
92        *(.got1)               
93  } >RAM
94
95  PROVIDE (__GOT2_START__ = .);
96  PROVIDE (_GOT2_START_ = .);
97  .got2           : 
98  {
99        *(.got2)       
100  } >RAM
101  PROVIDE (__GOT2_END__ = .);
102  PROVIDE (_GOT2_END_ = .);
103
104  PROVIDE (__FIXUP_START__ = .);
105  PROVIDE (_FIXUP_START_ = .);
106  .fixup          : { *(.fixup)         } >RAM
107  PROVIDE (_FIXUP_END_ = .);
108  PROVIDE (__FIXUP_END__ = .);
109 
110  PROVIDE (__SDATA2_START__ = .);
111  .sdata2         : { *(.sdata2)        } >RAM
112  .sbss2          : { *(.sbss2)         } >RAM
113  PROVIDE (__SBSS2_END__ = .);
114
115  .sbss2          : { *(.sbss2)         } >RAM
116  PROVIDE (__SBSS2_END__ = .);
117
118  __SBSS_START__ = .;
119  .bss :
120  {
121    bss.start = .;
122    *(.bss) *(.sbss) *(COMMON)
123    bss.end = ALIGN(4);
124  } > RAM
125  __SBSS_END__ = .;
126 
127  bss.size = bss.end - bss.start;
128  PROVIDE(_end = bss.end);
129
130  .line 0 : { *(.line) }
131  .debug 0 : { *(.debug) }
132  .debug_sfnames 0 : { *(.debug_sfnames) }
133  .debug_srcinfo 0 : { *(.debug_srcinfo) }
134  .debug_pubnames 0 : { *(.debug_pubnames) }
135  .debug_aranges 0 : { *(.debug_aranges) }
136  .debug_aregion 0 : { *(.debug_aregion) }
137  .debug_macinfo 0 : { *(.debug_macinfo) }
138  .stab 0 : { *(.stab) }
139  .stabstr 0 : { *(.stabstr) }
140}
141
142
Note: See TracBrowser for help on using the repository browser.