Changeset 2efdd08 in rtems


Ignore:
Timestamp:
May 20, 1998, 5:06:57 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
27dccae
Parents:
17a8d603
Message:

Patch from Ralf Corseipus to fix latent configure problems suddenly triggered:

The breakdown:

  • CC_FOR_TARGET and CXX_FOR_TARGET were not correctly re-read from autoconf's configuration cache (config.cache)
  • If <target>-[gcc|g++] was not found while running configure, the config macros tried to use other (wrong) compilers (e.g. cc).

Changes:

  • New RTEMS_PROG_CC macro (aclocal/prog-cc.m4).
  • New RTEMS_PROG_CXX macro (aclocal/prog-cxx.m4)
  • Moved a shell script fragment from configure.in to a new m4-autoconf macro (New file: aclocal/tool-prefix.m4)
  • Minor changes to configure.in

I tested it with linux/posix (native gcc/primary libc) and
sh-rtems/gensh1 on a linux host and didn't notice any bugs
related to the problems mentioned above. There seem to be
more bugs with the posix bsp, but I consider them minor as
the build run completed successfully. It is just too late
for me to attempt to fix them now.

Files:
10 edited

Legend:

Unmodified
Added
Removed
  • aclocal/canonicalize-tools.m4

    r17a8d603 r2efdd08  
    2222dnl FIXME: What shall be done if they don't exist?
    2323
    24 dnl NOTE: CC_FOR_TARGET should always be valid at this point,
    25 dnl       cf. RTEMS_PROG_CC 
    26 AC_PATH_PROG(CC_FOR_TARGET,"$program_prefix"gcc,no)
    27 
    2824dnl FIXME: This may fail if the compiler has not been recognized as gcc
    2925dnl       and uses tools with different names
  • aclocal/prog-cc.m4

    r17a8d603 r2efdd08  
    44dnl Check for target gcc
    55dnl
    6 dnl Adaptation of autoconf-2.12's AC_PROG_CC to rtems
    7 dnl
    8 dnl 98/02/10 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
    9 dnl
     6dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
     7dnl                             Completely reworked
    108
    119AC_DEFUN(RTEMS_PROG_CC,
     
    1311AC_BEFORE([$0], [AC_PROG_CPP])dnl
    1412AC_BEFORE([$0], [AC_PROG_CC])dnl
    15 AC_CHECK_PROG(CC, gcc, gcc)
    16 if test -z "$CC"; then
    17   AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
    18   test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
    19 fi
     13AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
    2014
    21 RTEMS_PROG_CC_WORKS
     15dnl Only accept gcc and cc
     16dnl NOTE: This might be too restrictive for native compilation
     17AC_PATH_PROGS(CC_FOR_TARGET, "$program_prefix"gcc "$program_prefix"cc )
     18test -z "$CC_FOR_TARGET" \
     19  && AC_MSG_ERROR([no acceptable cc found in \$PATH])
     20
     21dnl backup
     22rtems_save_CC=$CC
     23rtems_save_CFLAGS=$CFLAGS
     24
     25dnl temporarily set CC
     26CC=$CC_FOR_TARGET
     27
     28AC_PROG_CC_WORKS
    2229AC_PROG_CC_GNU
    2330
     
    4350fi
    4451
    45 CC_FOR_TARGET=$CC
    4652rtems_cv_prog_gcc=$ac_cv_prog_gcc
    4753rtems_cv_prog_cc_g=$ac_cv_prog_cc_g
     54rtems_cv_prog_cc_works=$ac_cv_prog_cc_works
     55rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross
    4856
    4957dnl restore initial values
    50 unset CC
     58CC=$rtems_save_CC
     59CFLAGS=$rtems_save_CFLAGS
     60
    5161unset ac_cv_prog_gcc
    5262unset ac_cv_prog_cc_g
    53 unset ac_cv_prog_CC
     63unset ac_cv_prog_cc_works
     64unset ac_cv_prog_cc_cross
    5465])
    55 
    56 
    57 dnl Almost identical to AC_PROG_CC_WORKS
    58 dnl added malloc to program fragment, because rtems has its own malloc
    59 dnl which is not available while bootstrapping rtems
    60 
    61 AC_DEFUN(RTEMS_PROG_CC_WORKS,
    62 [AC_MSG_CHECKING([whether the target C compiler ($CC $CFLAGS $LDFLAGS) works])
    63 AC_LANG_SAVE
    64 AC_LANG_C
    65 AC_TRY_COMPILER(
    66 [main(){return(0);}],
    67 rtems_cv_prog_cc_works, rtems_cv_prog_cc_cross)
    68 AC_LANG_RESTORE
    69 AC_MSG_RESULT($rtems_cv_prog_cc_works)
    70 if test $rtems_cv_prog_cc_works = no; then
    71   AC_MSG_ERROR([installation or configuration problem: target C compiler cannot create executables.])
    72 fi
    73 AC_MSG_CHECKING([whether the target C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler])
    74 AC_MSG_RESULT($rtems_cv_prog_cc_cross)
    75 ])
  • aclocal/prog-cxx.m4

    r17a8d603 r2efdd08  
    44dnl Check for target g++
    55dnl
    6 dnl Adaptation of autoconf-2.12's AC_PROG_CXX to rtems
    7 dnl
    8 dnl 98/02/10 Ralf Corsepius (corsepiu@faw.uni-ulm.de)
    9 dnl
    10  
     6dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
     7dnl                             Completely reworked
     8
    119AC_DEFUN(RTEMS_PROG_CXX,
    1210[
    1311AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
    1412AC_BEFORE([$0], [AC_PROG_CXX])dnl
    15 AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
     13AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
    1614
    17 RTEMS_PROG_CXX_WORKS
     15dnl Only accept g++ and c++
     16dnl NOTE: This might be too restrictive for native compilation
     17AC_PATH_PROGS(CXX_FOR_TARGET, "$program_prefix"g++ "$program_prefix"c++)
     18test -z "$CXX_FOR_TARGET" \
     19  && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
     20
     21dnl backup
     22rtems_save_CXX=$CXX
     23rtems_save_CXXFLAGS=$CXXFLAGS
     24
     25dnl temporarily set CXX
     26CXX=$CXX_FOR_TARGET
     27
     28AC_PROG_CXX_WORKS
    1829AC_PROG_CXX_GNU
    1930
     
    3849  test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
    3950fi
    40 CXX_FOR_TARGET=$CXX
     51
     52rtems_cv_prog_gxx=$ac_cv_prog_gxx
     53rtems_cv_prog_cxx_g=$ac_cv_prog_cxx_g
     54rtems_cv_prog_cxx_works=$ac_cv_prog_cxx_works
     55rtems_cv_prog_cxx_cross=$ac_cv_prog_cxx_cross
     56
     57CXX=$rtems_save_CXX
     58CXXFLAGS=$rtems_save_CXXFLAGS
    4159
    4260dnl restore initial values
    43 unset CXX
    4461unset ac_cv_prog_gxx
     62unset ac_cv_prog_cc_g
     63unset ac_cv_prog_cxx_works
     64unset ac_cv_prog_cxx_cross
    4565])
    46 
    47 
    48 dnl Almost identical to AC_PROG_CXX_WORKS
    49 dnl Additional handling of malloc
    50 dnl NOTE: using newlib with a native compiler is cross-compiling, indeed.
    51 AC_DEFUN(RTEMS_PROG_CXX_WORKS,
    52 [AC_MSG_CHECKING([whether the target C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works])
    53 AC_LANG_SAVE
    54 AC_LANG_CPLUSPLUS
    55 
    56 dnl this fails if rtems uses newlib, because rtems has its own malloc which
    57 dnl is not available at bootstrap
    58 AC_TRY_COMPILER(
    59   [main(){return(0);}],
    60   rtems_cv_prog_cxx_works, rtems_cv_prog_cxx_cross)
    61 AC_LANG_RESTORE
    62 AC_MSG_RESULT($rtems_cv_prog_cxx_works)
    63 if test $rtems_cv_prog_cxx_works = no; then
    64   AC_MSG_ERROR([installation or configuration problem: target C++ compiler cannot create executables.])
    65 fi
    66 AC_MSG_CHECKING([whether the target C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler])
    67 AC_MSG_RESULT($rtems_cv_prog_cxx_cross)
    68 ])
  • c/src/lib/libbsp/i386/pc386/console/Makefile.in

    r17a8d603 r2efdd08  
    1818H_FILES=
    1919
     20# Assembly source names, if any, go here -- minus the .s
     21S_PIECES=videoAsm
     22S_FILES=$(S_PIECES:%=%.s)
     23S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
     24
    2025SRCS=$(C_FILES) $(H_FILES)
    21 OBJS=$(C_O_FILES)
     26OBJS=$(C_O_FILES) $(S_O_FILES)
    2227
    2328include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
  • c/src/lib/libbsp/i386/pc386/console/outch.c

    r17a8d603 r2efdd08  
    1 /*-------------------------------------------------------------------------+
    2 | outch.c v1.1 - PC386 BSP - 1997/08/07
    3 +--------------------------------------------------------------------------+
    4 | (C) Copyright 1997 -
    5 | - NavIST Group - Real-Time Distributed Systems and Industrial Automation
    6 |
    7 | http://pandora.ist.utl.pt
    8 |
    9 | Instituto Superior Tecnico * Lisboa * PORTUGAL
    10 +--------------------------------------------------------------------------+
    11 | Disclaimer:
    12 |
    13 | This file is provided "AS IS" without warranty of any kind, either
    14 | expressed or implied.
    15 +--------------------------------------------------------------------------+
    16 | This code is based on:
    17 |   outch.c,v 1.4 1995/12/19 20:07:27 joel Exp - go32 BSP
    18 | With the following copyright notice:
    19 | **************************************************************************
    20 | *  COPYRIGHT (c) 1989-1998.
    21 | *  On-Line Applications Research Corporation (OAR).
    22 | *  Copyright assigned to U.S. Government, 1994.
    23 | *
    24 | *  The license and distribution terms for this file may be
    25 | *  found in found in the file LICENSE in this distribution or at
    26 | *  http://www.OARcorp.com/rtems/license.html.
    27 | **************************************************************************
    28 |
    29 |  $Id$
    30 +--------------------------------------------------------------------------*/
     1/*
     2 * outch.c  - This file contains code for displaying characters
     3 *            on the console uisng information that should be
     4 *            maintained by the BIOS in its data Area.
     5 *
     6 * Copyright (C) 1998  valette@crf.canon.fr
     7 *
     8 * Canon Centre Recherche France.
     9 *
     10 * This code is free software; you can redistribute it and/or
     11 * modify it under the terms of the GNU Library General Public
     12 * License as published by the Free Software Foundation; either
     13 * version 2 of the License, or (at your option) any later version.
     14 *
     15 * This code is distributed in the hope that it will be useful,
     16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     18 * Library General Public License for more details.
     19 *
     20 * You should have received a copy of the GNU Library General Public
     21 * License along with this file; if not, write to the Free Software
     22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
     23 *
     24 * $Header$
     25 */
    3126
    3227
     
    3631#include <string.h>
    3732
    38 /*-------------------------------------------------------------------------+
    39 | Constants
    40 +--------------------------------------------------------------------------*/
    41 #define DISPLAY_CELL_COUNT (MAX_ROW * MAX_COL)
    42                                        /* Number of display cells.            */
    43 #define TABSIZE 4                      /* Number of spaces for TAB (\t) char. */
    44 #define WHITE   0x0700                 /* White on Black background colour.   */
    45 #define BLANK   (WHITE | ' ')          /* Blank character.                    */
     33#include <crt.h>
     34
     35extern void wr_cursor(int, unsigned short);
     36
     37#define TAB_SPACE 4
     38static unsigned short *bitMapBaseAddr;
     39static unsigned short ioCrtBaseAddr;
     40static unsigned short maxCol;
     41static unsigned short maxRow;
     42static unsigned char  row;
     43static unsigned char  column;
     44static unsigned short attribute;
     45static unsigned int   nLines;
     46
     47    static void
     48scroll()
     49{
     50    int i, j;                               /* Counters */
     51    unsigned short *pt_scroll, *pt_bitmap;  /* Pointers on the bit-map  */
     52     
     53    pt_bitmap = bitMapBaseAddr;
     54    j = 0;
     55    pt_bitmap = pt_bitmap + j;
     56    pt_scroll = pt_bitmap + maxCol;
     57    for (i = j; i < (maxRow - 1) * maxCol; i++) {
     58        *pt_bitmap++ = *pt_scroll++;
     59    }
     60   
     61    /*
     62     * Blank characters are displayed on the last line.
     63     */
     64    for (i = 0; i < maxCol; i++) {     
     65        *pt_bitmap++ = (short) (' ' | attribute);
     66    }
     67}
     68
     69    static void
     70endColumn()
     71{
     72    if (++row == maxRow) {
     73        scroll();       /* Scroll the screen now */
     74        row = maxRow - 1;
     75    }
     76    column = 0;
     77    nLines++;
     78    /* Move cursor on the next location  */
     79    wr_cursor(row * maxCol + column, ioCrtBaseAddr);
     80}
    4681
    4782
    48 /*-------------------------------------------------------------------------+
    49 | Global Variables
    50 +--------------------------------------------------------------------------*/
    51 static rtems_unsigned16 *videoRam    = TVRAM;
    52                            /* Physical address of start of video text memory. */
    53 static rtems_unsigned16 *videoRamPtr = TVRAM;
    54                            /* Pointer for current output position in display. */
    55 static rtems_unsigned8  videoRows = MAX_ROW; /* Number of rows in display.    */
    56 static rtems_unsigned8  videoCols = MAX_COL; /* Number of columns in display. */
    57 static rtems_unsigned8  cursRow   = 0;       /* Current cursor row.           */
    58 static rtems_unsigned8  cursCol   = 0;       /* Current cursor column.        */
    5983
     84    static void
     85videoPutChar(char car)
     86{
     87    unsigned short *pt_bitmap = bitMapBaseAddr + row * maxCol;
     88 
     89    switch (car) {
     90        case '\b': {
     91            if (column) column--;
     92            /* Move cursor on the previous location  */
     93            wr_cursor(row * maxCol + column, ioCrtBaseAddr);
     94            return;
     95        }
     96        case '\t': {
     97            int i;
    6098
    61 /*-------------------------------------------------------------------------+
    62 |         Function: setHardwareCursorPos
    63 |      Description: Set hardware video cursor at given offset into video RAM.
    64 | Global Variables: None.
    65 |        Arguments: videoCursor - Offset into video memory.
    66 |          Returns: Nothing.
    67 +--------------------------------------------------------------------------*/
    68 static inline void
    69 setHardwareCursorPos(rtems_unsigned16 videoCursor)
     99            i = TAB_SPACE - (column & (TAB_SPACE - 1));
     100            pt_bitmap += column;
     101            column += i;
     102            if (column >= maxCol) {
     103                endColumn();
     104                return;
     105            }
     106            while (i--) *pt_bitmap++ = ' ' | attribute;         
     107            wr_cursor(row * maxCol + column, ioCrtBaseAddr);
     108            return;
     109        }
     110        case '\n': {
     111            endColumn();
     112            return;
     113        }
     114        case 7: {       /* Bell code must be inserted here */
     115            return;
     116        }
     117        case '\r' : {   /* Already handled via \n */
     118            return;
     119        }
     120        default: {
     121            pt_bitmap += column;
     122            *pt_bitmap = car | attribute;
     123            if (++column == maxCol) endColumn();
     124            else wr_cursor(row * maxCol + column,
     125                          ioCrtBaseAddr);
     126            return;
     127        }
     128    }
     129}       
     130
     131    void
     132clear_screen()
    70133{
    71   outport_byte(GDC_REG_PORT, 0xe);
    72   outport_byte(GDC_VAL_PORT, (videoCursor >> 8) & 0xff);
    73   outport_byte(GDC_REG_PORT, 0xf);
    74   outport_byte(GDC_VAL_PORT, videoCursor & 0xff);
    75 } /* setHardwareCursorPos */
     134    int i,j;
    76135
    77 
    78 /*-------------------------------------------------------------------------+
    79 |         Function: updateVideoRamPtr
    80 |      Description: Updates value of global variable "videoRamPtr" based on
    81 |                   current window's cursor position.
    82 | Global Variables: videoRamPtr, cursRow, cursCol.
    83 |        Arguments: None.
    84 |          Returns: Nothing.
    85 +--------------------------------------------------------------------------*/
    86 static inline void
    87 updateVideoRamPtr(void)
    88 {
    89   videoRamPtr = videoRam + cursRow * videoCols + cursCol;
    90 } /* updateVideoRamPtr */
    91 
    92 
    93 /*-------------------------------------------------------------------------+
    94 |         Function: scrollUp
    95 |      Description: Scrolls display up n lines.
    96 | Global Variables: None.
    97 |        Arguments: lines - number of lines to scroll.
    98 |          Returns: Nothing.
    99 +--------------------------------------------------------------------------*/
    100 static void
    101 scrollUp(rtems_unsigned8 lines)
    102 {
    103   rtems_unsigned16 blankCount;
    104                         /* Number of blank display cells on bottom of window. */
    105   rtems_unsigned16 *ptrDst, *ptrSrc;
    106                /* Source and destination pointers for memory copy operations. */
    107 
    108   if (lines < videoRows)  /* Move window's contents up. */
    109   {
    110     rtems_unsigned16 nonBlankCount;
    111        /* Number of non-blank cells on upper part of display (total - blank). */
    112 
    113     blankCount = lines * videoCols;
    114     nonBlankCount = DISPLAY_CELL_COUNT - blankCount;
    115     ptrSrc = videoRam + blankCount;
    116     ptrDst = videoRam;
    117 
    118     while(nonBlankCount--)
    119       *ptrDst++ = *ptrSrc++;
    120   }
    121   else                    /* Clear the whole display.   */
    122   {
    123     blankCount = DISPLAY_CELL_COUNT;
    124     ptrDst = videoRam;
    125   }
    126 
    127   /* Fill bottom with blanks. */
    128   while (blankCount-- > 0)
    129     *ptrDst++ = BLANK;
    130 } /* scrollUp */
    131 
    132 
    133 /*-------------------------------------------------------------------------+
    134 |         Function: printCHAR
    135 |      Description: Print printable character to display.
    136 | Global Variables: videoRamPtr, cursRow, cursCol.
    137 |        Arguments: c - character to write to display.
    138 |          Returns: Nothing.
    139 +--------------------------------------------------------------------------*/
    140 static void
    141 printCHAR(char c)
    142 {
    143   *videoRamPtr++ = c | WHITE;
    144   cursCol++;
    145   if (cursCol == videoCols)
    146   {
    147     cursCol = 0;
    148     cursRow++;
    149     if (cursRow == videoRows)
    150     {
    151       cursRow--;
    152       scrollUp(1);
    153       videoRamPtr -= videoCols;
     136    for (j = 0; j <= maxRow; j++) {
     137      for (i = 0; i <= maxCol; i++) {
     138        videoPutChar(' ');
     139      }
    154140    }
    155   }
    156 } /* printCHAR */
    157 
    158 
    159 /*-------------------------------------------------------------------------+
    160 |         Function: printBS
    161 |      Description: Print BS (BackSpace - '\b') character to display.
    162 | Global Variables: videoRamPtr, cursRow, cursCol.
    163 |        Arguments: None.
    164 |          Returns: Nothing.
    165 +--------------------------------------------------------------------------*/
    166 static inline void
    167 printBS(void)
    168 {
    169   /* Move cursor back one cell. */
    170   if (cursCol > 0)
    171     cursCol--;
    172   else if (cursRow > 0)
    173   {
    174     cursRow--;
    175     cursCol = videoCols - 1;
    176   }
    177   else
    178     return;
    179 
    180   /* Write a whitespace. */
    181   *(--videoRamPtr) = BLANK;
    182 } /* printBS */
    183 
    184 
    185 /*-------------------------------------------------------------------------+
    186 |         Function: printHT
    187 |      Description: Print HT (Horizontal Tab - '\t') character to display.
    188 | Global Variables: cursCol.
    189 |        Arguments: None.
    190 |          Returns: Nothing.
    191 +--------------------------------------------------------------------------*/
    192 static inline void
    193 printHT(void)
    194 {
    195   do
    196     printCHAR(' ');
    197   while (cursCol % TABSIZE);
    198 } /* printHT */
    199 
    200 
    201 /*-------------------------------------------------------------------------+
    202 |         Function: printLF
    203 |      Description: Print LF (Line Feed  - '\n') character to display.
    204 | Global Variables: cursRow.
    205 |        Arguments: None.
    206 |          Returns: Nothing.
    207 +--------------------------------------------------------------------------*/
    208 static inline void
    209 printLF(void)
    210 {
    211   cursRow++;
    212   if (cursRow == videoRows)
    213   {
    214     cursRow--;
    215     scrollUp(1);
    216   }
    217   updateVideoRamPtr();
    218 } /* printLF */
    219 
    220 
    221 /*-------------------------------------------------------------------------+
    222 |         Function: printCR
    223 |      Description: Print CR (Carriage Return - '\r') to display.
    224 | Global Variables: cursCol.
    225 |        Arguments: None.
    226 |          Returns: Nothing.
    227 +--------------------------------------------------------------------------*/
    228 static inline void
    229 printCR(void)
    230 {
    231   cursCol = 0;
    232   updateVideoRamPtr();
    233 } /* printCR */
    234 
    235 
    236 /*-------------------------------------------------------------------------+
    237 |         Function: consPutc
    238 |      Description: Print a character to display at current position.
    239 | Global Variables: videoRamPtr, videoRam.
    240 |        Arguments: c - character to write to display.
    241 |          Returns: Nothing.
    242 +--------------------------------------------------------------------------*/
    243 static void
    244 consPutc(char c)
    245 {
    246   switch (c)
    247   {
    248     case '\b': printBS();    break;
    249     case '\t': printHT();    break;
    250     case '\n': printLF();    break;
    251     case '\r': printCR();    break;
    252     default:   printCHAR(c); break;
    253   } /* switch */
    254 
    255   setHardwareCursorPos(videoRamPtr - videoRam);
    256                                            /* At current offset into videoRam */
    257 } /* consPutc */
    258 
     141    column  = 0;
     142    row     = 0;
     143}
    259144
    260145/*-------------------------------------------------------------------------+
     
    268153_IBMPC_outch(char c)
    269154{
    270   consPutc(c);
     155  videoPutChar(c);
    271156} /* _IBMPC_outch */
    272157
     
    275160|         Function: _IBMPC_initVideo
    276161|      Description: Video system initialization. Hook for any early setup.
    277 | Global Variables: videoRows.
     162| Global Variables: bitMapBaseAddr, ioCrtBaseAddr, maxCol, maxRow, row
     163|                   column, attribute, nLines;
    278164|        Arguments: None.
    279165|          Returns: Nothing.
     
    282168_IBMPC_initVideo(void)
    283169{
    284   scrollUp(videoRows);     /* Clear entire screen         */
    285   setHardwareCursorPos(0); /* Cursor at upper left corner */
     170    unsigned char* pt = (unsigned char*) (VIDEO_MODE_ADDR);
     171
     172    if (*pt == VGAMODE7) {
     173      bitMapBaseAddr = (unsigned short*) V_MONO;
     174    }
     175    else {
     176      bitMapBaseAddr = (unsigned short*) V_COLOR;
     177    }
     178    ioCrtBaseAddr = *(unsigned short*) DISPLAY_CRT_BASE_IO_ADDR;
     179    maxCol  = * (unsigned short*) NB_MAX_COL_ADDR;
     180    maxRow  = * (unsigned char*)  NB_MAX_ROW_ADDR;
     181    column  = 0;
     182    row     = 0;
     183    attribute = ((BLACK << 4) | WHITE)<<8;
     184    nLines = 0;
     185    clear_screen();
     186#ifdef DEBUG_EARLY_STAGE   
     187    printk("bitMapBaseAddr = %X, display controller base IO = %X\n",
     188           (unsigned) bitMapBaseAddr,
     189           (unsigned) ioCrtBaseAddr);
     190    videoPrintf("maxCol = %d, maxRow = %d\n", (unsigned) maxCol, (unsigned) maxRow);
     191#endif
    286192} /* _IBMPC_initVideo */
  • c/src/lib/libbsp/i386/pc386/include/Makefile.in

    r17a8d603 r2efdd08  
    99PROJECT_ROOT = @PROJECT_ROOT@
    1010
    11 H_FILES = $(srcdir)/bsp.h $(srcdir)/coverhd.h  $(srcdir)/irq.h
     11H_FILES = $(srcdir)/bsp.h $(srcdir)/coverhd.h  $(srcdir)/irq.h $(srcdir)/crt.h
    1212
    1313#
  • c/src/lib/libbsp/i386/pc386/include/bsp.h

    r17a8d603 r2efdd08  
    1010|
    1111| Instituto Superior Tecnico * Lisboa * PORTUGAL
     12+--------------------------------------------------------------------------+
     13| Modified by Eric Valette the 20/05/98 in order to add definitions used
     14| to enhance video putchar capabilities.
     15|
     16| Copyright (C) 1998  valette@crf.canon.fr
     17|
     18| Canon Centre Recherche France.
     19|
    1220+--------------------------------------------------------------------------+
    1321| Disclaimer:
     
    5866| Video (console) related constants.
    5967+--------------------------------------------------------------------------*/
    60 #define COLOUR  1  /* Assume colour console */
    6168
    62 #if COLOUR
    63 
    64 # define        GDC_REG_PORT    0x3D4
    65 # define        GDC_VAL_PORT    0x3D5
    66 # define        TVRAM           ((rtems_unsigned16 *)0xB8000)
    67 
    68 #else
    69 
    70 # define        GDC_REG_PORT    0x3B4
    71 # define        GDC_VAL_PORT    0x3B5
    72 # define        TVRAM           ((rtems_unsigned16 *)0xB0000)
    73 
    74 #endif /* COLOUR */
    75 
    76 /* Number of Video Lines & Columns */
    77 
    78 #define MAX_COL 80
    79 
    80 #ifdef RTEMS_VIDEO_80x50
    81 #define MAX_ROW 50
    82 #else
    83 #define MAX_ROW 25
    84 #endif /* RTEMS_VIDEO_80x50 */
    85 
     69#include <crt.h> 
     70 
    8671/*-------------------------------------------------------------------------+
    8772| Constants relating to the 8254 (or 8253) programmable interval timers.
  • c/src/lib/libbsp/i386/pc386/start/start.s

    r17a8d603 r2efdd08  
    1212|
    1313| Instituto Superior Tecnico * Lisboa * PORTUGAL
     14+--------------------------------------------------------------------------+
     15|
     16| Modified the 20/05/1998  by valette@crf.canon.fr in order to give a working
     17| example of eraly stage debugging via the DEBUG_EARLY_START define.
     18|
    1419+--------------------------------------------------------------------------+
    1520| Disclaimer:
     
    6368        EXTERN (load_segments)
    6469        EXTERN (exit)
    65 
     70        EXTERN (_IBMPC_initVideo)
     71        EXTERN (debugPoolingGetChar)
     72
     73/*
     74 * In case it crash on your machine and this is not due
     75 * to video mode set by the loader, you may try to define
     76 * the follwoing variable
     77#define DEBUG_EARLY_START
     78 */
     79       
    6680SYM (start):
    6781
    6882        nop
    6983        cli                     # DISABLE INTERRUPTS!!!
     84#ifdef DEBUG_EARLY_START
     85        cld
     86        /*
     87         * Must get video attribute to have a working printk.
     88         * Note that the following code assume we already have
     89         * valid segments and a stack. It should be true for
     90         * any loader starting RTEMS in protected mode (or
     91         * at least I hope so : -)).
     92         */
     93        call _IBMPC_initVideo
     94        /*
     95         * try printk and a getchar in polling mode ASAP
     96         */
     97        pushl   $welcome_msg
     98        call    printk
     99        addl    $4, esp
     100
     101        call    debugPoolingGetChar
     102#endif 
    70103
    71104/*----------------------------------------------------------------------------+
     
    266299        .long   0
    267300
     301#ifdef DEBUG_EARLY_START
     302       
     303        PUBLIC (welcome_msg)
     304SYM (welcome_msg) :
     305        .string "Ready to debug RTEMS ?\nEnter <CR>\n"
     306
     307#endif
     308               
    268309END_DATA
    269310
  • c/src/lib/libbsp/i386/pc386/startup/exit.c

    r17a8d603 r2efdd08  
    4040| External Prototypes
    4141+--------------------------------------------------------------------------*/
    42 extern rtems_boolean _IBMPC_scankey(char *);  /* define in 'inch.c' */
    43 
     42extern rtems_boolean _IBMPC_scankey(char *);  /* defined in 'inch.c' */
    4443
    4544/*-------------------------------------------------------------------------+
    4645|         Function: rtemsReboot
    47 |      Description: Reboot the PC. 
     46|      Description: Reboot the PC.
    4847| Global Variables: None.
    4948|        Arguments: None.
    50 |          Returns: Nothing. 
     49|          Returns: Nothing.
    5150+--------------------------------------------------------------------------*/
    5251inline void rtemsReboot(void)
  • configure.in

    r17a8d603 r2efdd08  
    166166fi
    167167
    168 dnl NOTE: host_os is automatically set by autoconf
    169 
    170 if [[ "${program_prefix}" = "NONE" ]] ; then
    171   if [[ "${target}" = "${host}" ]] ; then
    172     program_prefix=
    173   else
    174     program_prefix=${target}-
    175   fi
    176 fi
     168RTEMS_TOOL_PREFIX
    177169
    178170dnl check target cc
    179 CC="$program_prefix"gcc
    180171RTEMS_PROG_CC
    181172dnl check if the compiler supports --specs
     
    191182  fi
    192183fi
     184test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe"
    193185
    194186dnl check for g++
    195187if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
    196   CXX="$program_prefix"g++
    197188  RTEMS_PROG_CXX
    198189  if test "$rtems_cv_prog_cc_cross" != "$rtems_cv_prog_cxx_cross"; then
     
    201192     [Target C compiler and Target C++ compiler]
    202193     [must both ether be cross compilers or native compilers]
    203      [Hint: LD_LIBRARY_PATH ?] )
     194     [Hint: If building a posix bsp: LD_LIBRARY_PATH?] )
    204195  fi
    205   AC_PATH_PROG(CXX_FOR_TARGET,"$program_prefix"g++,no)
    206196else
    207197  CXX_FOR_TARGET="no"
     
    209199
    210200RTEMS_CANONICALIZE_TOOLS
    211 test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe"
    212201
    213202dnl check host cc
Note: See TracChangeset for help on using the changeset viewer.