Changeset 1d4048b2 in rtems
- Timestamp:
- 08/11/99 23:45:57 (24 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 8aefe83
- Parents:
- 91e9ab8
- Location:
- c/src/lib/libbsp/i386/ts_386ex
- Files:
-
- 44 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/i386/ts_386ex/README
r91e9ab8 r1d4048b2 12 12 cross-compilation tools with this support. The BSP also supports the 13 13 on-board RTC, and an NE2000 compatible network card. It has been used 14 successfully with C (gcc-2.8.1) and Ada95 (gnat-3.11p), including15 networking applications in both languages.14 successfully with C/C++ (egcs-1.1.2) and Ada95 (gnat-3.11p), including 15 networking applications. 16 16 17 17 The TS-1325 runs a version of DOS, and should be configured with a RAM … … 26 26 A typical development cycle involves these steps: 27 27 28 1. Cross-compile the application, yielding a COFF executable. Convert this29 t o raw binary format, using objcopy or the coff2bin script (see the30 t ools subdirectory in the BSP).28 1. Cross-compile the application, yielding an ELF executable. Convert 29 this to raw binary format, using objcopy or the elf2exe script (see 30 the tools subdirectory in the BSP). 31 31 32 2. Use Zmodem to download the raw exec to the TS-1325's ram-disk32 2. Use Zmodem to download the raw executable to the TS-1325's ram-disk 33 33 (faster than the A: flash disk). A terminal program supporting 34 34 Zmodem is needed on the host e.g. minicom under Linux. 35 35 36 36 3. Use the DOS-based RTEMS loader "loader.com" (see tools 37 subdirectory) to load and run the executable .37 subdirectory) to load and run the executable on the TS-1325. 38 38 39 Additional documentation and support software is in the tools BSP subdirectory. 39 Additional documentation and support software is in the tools subdirectory 40 of the BSP. 40 41 41 42 Happy Coding! 42 43 43 Tony Ambardar, 4/21/9944 Tony Ambardar, 8/8/99 -
c/src/lib/libbsp/i386/ts_386ex/bsp_specs
r91e9ab8 r1d4048b2 17 17 %{!qrtems: %(old_startfile)} %{qrtems: \ 18 18 %{!qrtems_debug: start.o%s} \ 19 %{qrtems_debug: start_g.o%s} }19 %{qrtems_debug: start_g.o%s} crti.o%s crtbegin.o%s} 20 20 21 21 *link: 22 22 %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _init_i386ex} 23 23 24 *endfile: 25 %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s} -
c/src/lib/libbsp/i386/ts_386ex/console/console.c
r91e9ab8 r1d4048b2 219 219 console_last_close, /* lastClose */ 220 220 NULL, /* poll read */ 221 BSP_uart_termios_write_com 2, /* write */221 BSP_uart_termios_write_com1, /* write */ 222 222 conSetAttr, /* setAttributes */ 223 223 NULL, /* stopRemoteTx */ -
c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.in
r91e9ab8 r1d4048b2 52 52 #DEFINES += -DPRINTON 53 53 54 DEFINES += - I$(srcdir)54 DEFINES += -DUSE_INIT_FINI 55 55 CPPFLAGS += 56 56 CFLAGS += -
c/src/lib/libbsp/i386/ts_386ex/startup/bspstart.c
r91e9ab8 r1d4048b2 79 79 heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */ 80 80 81 heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */82 81 bsp_libc_init((void *) heap_start, heap_size, 0); 83 82 -
c/src/lib/libbsp/i386/ts_386ex/startup/linkcmds
r91e9ab8 r1d4048b2 22 22 23 23 ENTRY(_init_i386ex) ; 24 24 25 SECTIONS 25 26 { … … 28 29 * initial section: 29 30 * 30 * This s ection is the first in memory, preceding the text and data sections.31 * It initializes the i386ex, sets up the gdt in RAM, loads the gdt,31 * This subsection of ".text" is the first in memory, and executed by the DOS 32 * loader. It initializes the i386ex, sets up the gdt in RAM, loads the gdt, 32 33 * jumps to protected mode, loads the idt, zeros the bss section, sets up 33 34 * the stack and calls the rest of the RTEMS initialization. … … 35 36 36 37 _DOS_ld_addr = 0x0008000 ; 37 38 .initial _DOS_ld_addr :39 {40 *(.initial);41 }42 38 43 39 /*************************************************************************** … … 47 43 ***************************************************************************/ 48 44 49 .text BLOCK(0x10):45 .text _DOS_ld_addr : 50 46 { 51 47 CREATE_OBJECT_SYMBOLS 52 48 text_start = . ; 53 49 _text_start = . ; 54 *(.text ) ;55 . = ALIGN (16);56 50 57 *(.eh_fram) 58 . = ALIGN (16); 51 *(.initial); 52 . = ALIGN(0x20); 53 54 *(.text ); 55 . = ALIGN (0x20); 56 57 *(.eh_frame) 58 . = ALIGN (0x20); 59 60 *(.gnu.linkonce.t*) 61 . = ALIGN(0x20); 59 62 60 63 /* 61 64 * C++ constructors 62 65 */ 66 63 67 __CTOR_LIST__ = .; 64 68 LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) … … 72 76 LONG(0) 73 77 __DTOR_END__ = .; 78 74 79 _rodata_start = . ; 75 80 *(.rodata) 81 . = ALIGN(0x20); 82 _erodata = .; 83 76 84 *(.gnu.linkonce.r*) 77 _erodata = ALIGN( 0x10 ) ; 78 _etext = ALIGN( 0x10 ); 85 . = ALIGN(0x20); 79 86 _endtext = . ; 80 87 } 88 89 /*************************************************************************** 90 * ctor/dtor sections: 91 * 92 * These sections house the global constructors and destructors. 93 ***************************************************************************/ 94 95 .init BLOCK(0x20) : 96 { 97 *(.init) 98 } = 0x9090 99 100 .fini BLOCK(0x20) : 101 { 102 *(.fini) 103 } = 0x9090 81 104 82 105 /*************************************************************************** … … 86 109 ***************************************************************************/ 87 110 88 .data BLOCK(0x 10) :111 .data BLOCK(0x20) : 89 112 { 90 113 _sdata = .; 91 114 *(.data); 115 . = ALIGN(0x20); 116 *(.gnu.linkonce.d*) 117 . = ALIGN(0x20); 118 *(.gcc_except_table) 119 . = ALIGN(0x20); 92 120 _edata = .; 93 121 } … … 105 133 *(.bss); 106 134 *(COMMON); 107 _ebss = ALIGN(0x 10);135 _ebss = ALIGN(0x20); 108 136 } 109 137 _bss_size = _ebss - _bss_start ; 138 139 /*************************************************************************** 140 * discard section: 141 * 142 * This section is used to throw away stuff we don't want. 143 ***************************************************************************/ 144 145 /DISCARD/ : 146 { 147 *(.comment); 148 *(.note); 149 } 110 150 111 151 /*************************************************************************** -
c/src/lib/libbsp/i386/ts_386ex/tools/README
r91e9ab8 r1d4048b2 10 10 included. 11 11 12 Once an application has been compiled and the resulting COFF12 Once an application has been compiled and the resulting ELF format 13 13 executable converted to raw binary format and transferred to the 14 14 TS-1325, the DOS loader program must be used to load and execute … … 21 21 the C: disk. Once completed, an application may copied to the 22 22 (non-volatile) A: disk. Additionally, one may add the line "loader 23 filename" to the AUTOEXEC.BAT file, allow 23 filename" to the AUTOEXEC.BAT file, allowing the application to be 24 24 run automatically at boot time. 25 25 26 26 Note that the DOS loader will abort and exit if it detects that the 27 27 push-button switch is pressed, thus allowing one to break out of a 28 patho logical "boot loop" situation. 28 pathological "boot loop" situation i.e. abort an automatic load from 29 the AUTOEXEC.BAT file. 29 30 30 31 31 coff2bin 32 elf2exe 32 33 ======== 33 34 34 The coff2binscript is just a convenient wrapper for the objcopy35 command. It can convert a list of RTEMS-generated COFF files to raw35 The elf2exe script is just a convenient wrapper for the objcopy 36 command. It can convert a list of RTEMS-generated ELF files to raw 36 37 binary images that can be loaded on the TS-1325. The converted files 37 are saved in the current directory with a ". bin" extension.38 are saved in the current directory with a ".exe" extension. 38 39 39 40 … … 43 44 The TS-1325 includes a few peripherals which are very useful for 44 45 embedded development: a push-button switch, an LED, and a parallel 45 port which may be used for digital I/O. Note that the pin out for the46 port which may be used for digital I/O. Note that the pin-out for the 46 47 parallel port is given in the TS-1325 manual. 47 48 … … 65 66 66 67 67 Tony Ambardar, 4/21/99 68 Serial Debugging Support 69 ======================== 68 70 71 RTEMS supports an Ada95 and RTEMS aware version of the GNU gdb 72 debugger, which can be configured to debug targets over a serial 73 line. 74 75 The port COM2 on the TS-1325 is normally used for console I/O, leaving 76 COM1 for use by gdb; an appropriate cable should be connected from the 77 development host to the TS-1325's COM1. The serial port used on the host 78 should match the line "target remote /dev/tty??" in the "cmds" file. 79 80 Sample C and Ada95 applications showing how to add debugging support 81 are given in the debug_c and debug_ada sub-directories. Once the 82 debugging-enabled executable is running on the TS-1325, gdb must be 83 started on the Linux host, taking as argument the RTEMS ELF executable. 84 85 Using a graphical front end to gdb such as the program ddd is highly 86 recommended. The script ddd-rtems shows how to invoke gdb using ddd as 87 a front end. 88 89 90 Ada95 Networking Support 91 ======================== 92 93 The sub-directory network_ada contains code and examples for an Ada95 94 binding to BSD network sockets. The code is based on Samuel Tardieu's 95 adasockets-0.1.3 package, but has been modified to work under RTEMS. 96 97 The binding itself is in the adasockets sub-directory. Edit the 98 Makefile to reflect your choice of installation directory, then type 99 the command "make install" to compile and install the binding. The 100 file networkconfig.h should also be edited according to the RTEMS 101 networking document. 102 103 The directories listener and tcprelay contain networking examples that 104 use the binding. The listener application simply accepts connections 105 on a certain port and echoes back any received data. The tcprelay 106 program accepts connections on a port and then relays all subsequent 107 data to and from another remote host. The makefiles in both 108 directories should be edited to reflect the installation point of the 109 adasockets binding. 110 111 112 113 Tony Ambardar, 8/8/99 -
c/src/lib/libbsp/i386/ts_386ex/tools/ts_1325_ada/Makefile.ts_386ex
r91e9ab8 r1d4048b2 7 7 # Tool paths 8 8 tooldir=/usr/local/rtems 9 rtemsdir=${tooldir}/ rtems/ts_386ex9 rtemsdir=${tooldir}/ts_386ex 10 10 11 11 # Tool names 12 GCC=${tooldir}/bin/i386-rtems -gcc13 GNATMAKE=${tooldir}/bin/i386-rtems -gnatmake14 SIZE=${tooldir}/bin/i386-rtems -size12 GCC=${tooldir}/bin/i386-rtemself-gcc 13 GNATMAKE=${tooldir}/bin/i386-rtemself-gnatmake 14 SIZE=${tooldir}/bin/i386-rtemself-size 15 15 SIS=${tooldir}/bin/sis 16 16 GDB=${tooldir}/bin/sis-gdb … … 18 18 CARGS=-B${rtemsdir}/lib/ -specs bsp_specs -qrtems \ 19 19 -msoft-float -mno-fp-ret-in-387 20 #CARGS=-B/usr/local/rtems/tools/build-i386-rtems/ts_386ex/lib/ -specs bsp_specs -qrtems21 20 22 21 all: init.o
Note: See TracChangeset
for help on using the changeset viewer.