2003-01-20 Duane Gustavus <duane@unt.edu>

* console/sci.c, include/mrm332.h, startup/linkcmds,
	startup/linkcmds_ROM: Various updates to make this run properly
	from ROM.
This commit is contained in:
Joel Sherrill
2003-01-20 20:33:17 +00:00
parent 1d36d2af1e
commit c0c6168fea
5 changed files with 77 additions and 16 deletions

View File

@@ -1,3 +1,9 @@
2003-01-20 Duane Gustavus <duane@unt.edu>
* console/sci.c, include/mrm332.h, startup/linkcmds,
startup/linkcmds_ROM: Various updates to make this run properly
from ROM.
2002-12-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* clock/Makefile.am: Don't include @RTEMS_BSP@.cfg.

View File

@@ -36,6 +36,11 @@
* $Id$
*
* $Log$
* Revision 1.2 2002/11/04 14:26:47 joel
* 2002-11-04 Joel Sherrill <joel@OARcorp.com>
*
* * console/sci.c, spurious/spinit.c: Removed warnings.
*
* Revision 1.1 2002/02/28 23:10:39 joel
* 2002-02-28 Mike Panetta <ahuitzot@mindspring.com>
*
@@ -117,6 +122,7 @@
Section A - Include Files
*****************************************************************************/
#include <rtems.h>
#include <bsp.h>
#include <rtems/bspIo.h>
#include <stdio.h>
@@ -560,6 +566,7 @@ static void SciRcvBufFlush( void )
* Func: SciInterruptOpen
* Desc: open routine for the interrupt based device driver
* Default state is 9600 baud, 8 bits, No parity, and 1 stop bit. ??
**CHANGED** Default baud rate is now 19200, 8N1
* called from rtems_termios_open which is called from console_open
* Inputs: major - device number
* minor - device number
@@ -598,8 +605,8 @@ signed32 SciInterruptOpen(
// SciSetBaud(115200); // set the baud rate
// SciSetBaud( 57600); // set the baud rate
// SciSetBaud( 38400); // set the baud rate
// SciSetBaud( 19200); // set the baud rate
SciSetBaud( 9600); // set the baud rate
SciSetBaud( 19200); // set the baud rate
// SciSetBaud( 9600); // set the baud rate
SciSetParity(SCI_PARITY_NONE); // set parity to none
@@ -724,7 +731,8 @@ signed32 SciSetAttributes(
if (!baud_requested)
{
baud_requested = B9600; // default to 9600 baud
// baud_requested = B9600; // default to 9600 baud
baud_requested = B19200; // default to 19200 baud
}
sci_rate = termios_baud_to_number( baud_requested );
@@ -832,8 +840,8 @@ signed32 SciPolledOpen(
// SciSetBaud(115200); // set the baud rate
// SciSetBaud( 57600); // set the baud rate
// SciSetBaud( 38400); // set the baud rate
// SciSetBaud( 19200); // set the baud rate
SciSetBaud( 9600); // set the baud rate
SciSetBaud( 19200); // set the baud rate
// SciSetBaud( 9600); // set the baud rate
SciSetParity(SCI_PARITY_NONE); // set no parity
@@ -1457,6 +1465,8 @@ void SciWriteCharWait(unsigned8 c)
* are ignoring flow control from the other end).
* In the first case, higher baud rates will help.
*/
/* relinquish processor while waiting */
rtems_task_wake_after(RTEMS_YIELD_PROCESSOR);
}
*SCDR = c; // send the charcter
@@ -1506,7 +1516,8 @@ unsigned8 inline SciReadCharWait( void )
while ( SciCharAvailable() == 0 ) // anything there?
{
// do nothing
/* relinquish processor while waiting */
rtems_task_wake_after(RTEMS_YIELD_PROCESSOR);
}
// if you have rcv ints enabled, then the isr will probably

View File

@@ -33,14 +33,14 @@
/* System Clock definitions */
#define XTAL 32768.0 /* crystal frequency in Hz */
#if 1
#if 0
/* Default MRM clock rate (8.388688 MHz) set by CPU32: */
#define MRM_W 0 /* system clock parameters */
#define MRM_X 0
#define MRM_Y 0x3f
#endif
#if 0
#if 1
/* 16.77722 MHz: */
#define MRM_W 1 /* system clock parameters */
#define MRM_X 1
@@ -55,7 +55,7 @@
#endif
#define SYS_CLOCK (XTAL*4.0*(MRM_Y+1)*(1 << (2*MRM_W+MRM_X)))
#define SCI_BAUD 9600 /* RS232 Baud Rate */
#define SCI_BAUD 19200 /* RS232 Baud Rate */
/* macros/functions */

View File

@@ -33,15 +33,15 @@ __DYNAMIC = 0;
/*
* Declare some sizes.
*/
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x03000;
_RamSize = DEFINED(_RamSize) ? _RamSize : 0x7d000;
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x10000;
_RamSize = DEFINED(_RamSize) ? _RamSize : 0x70000;
_RamEnd = _RamBase + _RamSize;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x2000;
MEMORY
{
ram : ORIGIN = 0x03000, LENGTH = 0x7d000
ram : ORIGIN = 0x10000, LENGTH = 0x70000
}
_copy_data_from_rom = 0;
@@ -90,6 +90,16 @@ SECTIONS
*(.fini)
*crtn.o(.fini)
/*
* Special FreeBSD sysctl sections.
*/
. = ALIGN (16);
__start_set_sysctl_set = .;
*(set_sysctl_*);
__stop_set_sysctl_set = ABSOLUTE(.);
*(set_domain_*);
*(set_pseudo_*);
/*
* C++ constructors/destructors
*
@@ -143,7 +153,6 @@ SECTIONS
*(COMMON)
. = ALIGN (16);
PROVIDE (end = .);
. += _StackSize;
. = ALIGN (16);
_stack_init = .;

View File

@@ -50,7 +50,7 @@ _RamEnd = _RamBase + _RamSize;
__end_of_ram = 0x080000;
_copy_data_from_rom = 1;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x2000;
/*
*
@@ -91,7 +91,37 @@ SECTIONS
*(.fini)
*crtn.o(.fini)
*(.eh_fram)
/*
* Special FreeBSD sysctl sections.
*/
. = ALIGN (16);
__start_set_sysctl_set = .;
*(set_sysctl_*);
__stop_set_sysctl_set = ABSOLUTE(.);
*(set_domain_*);
*(set_pseudo_*);
/*
* C++ constructors/destructors
*
* gcc uses crtbegin.o to find the start of the constructors
* and destructors 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. The
* constructor and destructor list are terminated in
* crtend.o. The same comments apply to it.
*/
. = ALIGN (16);
*crtbegin.o(.ctors)
*(.ctors)
*crtend.o(.ctors)
*crtbegin.o(.dtors)
*(.dtors)
*crtend.o(.dtors)
*(.eh_frame)
. = ALIGN (16);
/*
@@ -99,7 +129,7 @@ SECTIONS
*/
. = ALIGN (16);
_rodata_start = . ;
*(.rodata)
*(.rodata*)
*(.gnu.linkonce.r*)
etext = ALIGN(0x10);
@@ -130,6 +160,10 @@ SECTIONS
_copy_start = .;
_sdata = . ;
*(.data)
*(.gnu.linkonce.d*)
*(.gcc_except_table)
*(.jcr)
CONSTRUCTORS
edata = ALIGN(0x10);
_edata = .;
@@ -146,6 +180,7 @@ SECTIONS
_clear_start = .;
*(.bss)
*(COMMON)
. = ALIGN (16);
end = .;
_end = ALIGN(0x8);
__end = ALIGN(0x8);