Changeset 91333c2 in rtems


Ignore:
Timestamp:
Jul 31, 1997, 10:04:17 PM (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
0074691
Parents:
13f09e6
Message:

Merged very large and much appreciated patch from Chris Johns
<cjohns@…>. This patch includes the ods68302 bsp,
the RTEMS++ class library, and the rtems++ test.

Files:
14 edited

Legend:

Unmodified
Added
Removed
  • Makefile.in

    r13f09e6 r91333c2  
    4141RTEMS_HOST = @RTEMS_HOST@
    4242PROJECT_ROOT = @PROJECT_ROOT@
     43RTEMS_USE_OWN_PDIR = @RTEMS_USE_OWN_PDIR@
    4344RTEMS_HAS_POSIX_API = @RTEMS_HAS_POSIX_API@
    4445RTEMS_HAS_KA9Q = @RTEMS_HAS_KA9Q@
     46RTEMS_HAS_CPLUSPLUS = @RTEMS_HAS_CPLUSPLUS@
    4547RTEMS_USE_MACROS = @RTEMS_USE_MACROS@
    4648RTEMS_USE_GCC272 = @RTEMS_USE_GCC272@
     
    8688            \"PROJECT_HOME=$(PROJECT_ROOT)/$$bsp\" \
    8789            \"PROJECT_ROOT=$(PROJECT_ROOT)\" \
     90            \"RTEMS_USE_OWN_PDIR=$(RTEMS_USE_OWN_PDIR)\" \
    8891            \"RTEMS_HAS_POSIX_API=$(RTEMS_HAS_POSIX_API)\" \
    8992            \"RTEMS_HAS_KA9Q=$(RTEMS_HAS_KA9Q)\" \
     93            \"RTEMS_HAS_CPLUSPLUS=$(RTEMS_HAS_CPLUSPLUS)\" \
    9094            \"RTEMS_USE_MACROS=$(RTEMS_USE_MACROS)\" \
    9195            \"RTEMS_USE_GCC272=$(RTEMS_USE_GCC272)\" \
  • README.configure

    r13f09e6 r91333c2  
    2121        --disable-tests
    2222        --disable-ka9q
     23        --enable-cpp
    2324        --enable-gcc28
    2425        --enable-libcdir=<DIRECTORY>
     
    3031By default, the RTEMS port of the KA9Q TCP/IP stack is build for targets
    3132that support it.  It can be disabled with the --disable-ka9q option.
     33
     34By default, the RTEMS support of C++ is disabled.  It can be enabled
     35with the --enable-cpp option. If the rtems++ C++ library is installed
     36it will also be build.
    3237
    3338By default, the RTEMS test suites are configured.  The --disable-tests
  • c/Makefile.in

    r13f09e6 r91333c2  
    3232LIBKA9Q = $(LIBKA9Q_$(HAS_KA9Q)_V)
    3333
     34# We only make the rtems++ install point if it is enabled.
     35LIBRTEMSCPLUSPLUS_yes_V = include/rtems++
     36LIBRTEMSCPLUSPLUS = $(LIBRTEMSCPLUSPLUS_$(HAS_CPLUSPLUS)_V)
     37
    3438# directories to be created in install point
    3539CREATE_DIRS =   include include/sys \
     
    3741                include/netinet include/libc include/libc/sys \
    3842                $(LIBKA9Q) \
     43                $(LIBRTEMSCPLUSPLUS) \
    3944                lib bin samples \
    4045                tests tests/screens tests/screens/sptests \
     
    9499
    95100env:    $(SRCS) dirs
    96 
  • c/src/exec/score/cpu/m68k/m68302.h

    r13f09e6 r91333c2  
    6969#define RBIT_SCR_HWDEN          0x00000800
    7070#define RBIT_SCR_HWDCN2         0x00000400
    71 #define RBIT_SCR_HWDCN1         0x00000200
    72 #define RBIT_SCR_HWDCN0         0x00000100
     71#define RBIT_SCR_HWDCN1         0x00000200  /* 512 clocks */
     72#define RBIT_SCR_HWDCN0         0x00000100  /* 128 clocks */
    7373
    7474#define RBIT_SCR_LPREC          0x00000080
     
    540540    rtems_unsigned16    res6;
    541541    rtems_unsigned16    res7;
     542
    542543    rtems_unsigned16    br0;            /* Base Register   (CS0) */
    543544    rtems_unsigned16    or0;            /* Option Register (CS0) */
     
    598599} m302_dualPortRAM_t;
    599600
     601/* some useful defines the some of the registers above */
     602 
     603
     604/* ----
     605   MC68302 Chip Select Registers
     606      p3-46 2nd Edition
     607
     608 */
     609#define BR_ENABLED     1
     610#define BR_DISABLED    0
     611#define BR_FC_NULL     0
     612#define BR_READ_ONLY   0
     613#define BR_READ_WRITE  2
     614#define OR_DTACK_0     0x0000
     615#define OR_DTACK_1     0x2000
     616#define OR_DTACK_2     0x4000
     617#define OR_DTACK_3     0x6000
     618#define OR_DTACK_4     0x8000
     619#define OR_DTACK_5     0xA000
     620#define OR_DTACK_6     0xC000
     621#define OR_DTACK_EXT   0xE000
     622#define OR_SIZE_64K    0x1FE0
     623#define OR_SIZE_128K   0x1FC0
     624#define OR_SIZE_256K   0x1F80
     625#define OR_SIZE_512K   0x1F00
     626#define OR_SIZE_1M     0x1E00
     627#define OR_SIZE_2M     0x1C00
     628#define OR_MASK_RW     0x0000
     629#define OR_NO_MASK_RW  0x0002
     630#define OR_MASK_FC     0x0000
     631#define OR_NO_MASK_FC  0x0001
     632
     633#define MAKE_BR(base_address, enable, rw, fc) \
     634    ((base_address >> 11) | fc | rw | enable)
     635
     636#define MAKE_OR(bsize, DtAck, RW_Mask, FC_Mask) \
     637    (DtAck | ((~(bsize - 1) & 0x00FFFFFF) >> 11) | FC_Mask | RW_Mask)
     638
     639#define __REG_CAT(r, n) r ## n
     640#define WRITE_BR(csel, base_address, enable, rw, fc) \
     641          __REG_CAT(m302.reg.br, csel) = MAKE_BR(base_address, enable, rw, fc)
     642#define WRITE_OR(csel, bsize, DtAck, RW_Mask, FC_Mask) \
     643          __REG_CAT(m302.reg.or, csel) = MAKE_OR(bsize, DtAck, RW_Mask, FC_Mask)
     644
     645/* ----
     646   MC68302 Watchdog Timer Enable Bit
     647
     648 */
     649#define WATCHDOG_ENABLE    (1)
     650#define WATCHDOG_TRIGGER() (m302.reg.wrr = 0x10 | WATCHDOG_ENABLE, m302.reg.wcn = 0)
     651#define WATCHDOG_TOGGLE()  (m302.reg.wcn = WATCHDOG_TIMEOUT_PERIOD)
     652#define DISABLE_WATCHDOG() (m302.reg.wrr = 0)
    600653
    601654/*
  • c/src/lib/Makefile.in

    r13f09e6 r91333c2  
    1111include $(PROJECT_ROOT)/make/directory.cfg
    1212
     13# We only build the rtems++ library if HAS_CPLUSPLUS was defined
     14LIBRTEMSCPLUSPLUS_yes_V = librtems++
     15LIBRTEMSCPLUSPLUS = $(LIBRTEMSCPLUSPLUS_$(HAS_CPLUSPLUS)_V)
     16
    1317# General Hardware API library
    1418LIBHWAPI=$(wildcard libhwapi)
    1519
    1620SUB_DIRS=start include libmisc libc libcpu libbsp \
    17          $(LIBHWAPI) wrapup
     21         $(LIBKA9Q) $(LIBHWAPI) $(LIBRTEMSCPLUSPLUS) wrapup
  • c/src/lib/include/Makefile.in

    r13f09e6 r91333c2  
    1919KA9Q_H_FILES=$(KA9Q_H_PIECES:%=$(srcdir)/ka9q/%.h)
    2020
     21RTEMSCPLUSPLUS_H_PIECES= rtemsEvent rtemsInterrupt rtemsMessageQueue \
     22  rtemsSemaphore rtemsStatusCode rtemsTask rtemsTaskMode rtemsTimer
     23RTEMSCPLUSPLUS_H_FILES=$(RTEMSCPLUSPLUS_H_PIECES:%=$(srcdir)/rtems++/%.h)
     24
    2125SYS_H_FILES=
    2226
     
    3539        $(INSTALL) -m 444 $(KA9Q_H_FILES) ${PROJECT_RELEASE}/include/ka9q
    3640endif
     41ifeq ($(HAS_CPLUSPLUS),yes)
     42        $(INSTALL) -m 444 $(RTEMSCPLUSPLUS_H_FILES) ${PROJECT_RELEASE}/include/rtems++
     43endif
  • c/src/tests/libtests/Makefile.in

    r13f09e6 r91333c2  
    1111include $(PROJECT_ROOT)/make/directory.cfg
    1212
    13 SUB_DIRS=cpuuse rtmonuse malloctest stackchk
     13# We only build the tests for the rtems++ library if HAS_CPLUSPLUS was defined
     14LIBRTEMSCPLUSPLUS_yes_V = rtems++
     15LIBRTEMSCPLUSPLUS = $(LIBRTEMSCPLUSPLUS_$(HAS_CPLUSPLUS)_V)
     16
     17SUB_DIRS=cpuuse rtmonuse malloctest stackchk $(LIBRTEMSCPLUSPLUS)
  • c/src/tests/samples/cdtest/Makefile.in

    r13f09e6 r91333c2  
    4242
    4343DEFINES  +=
    44 CPPFLAGS +=
     44CPPFLAGS += -I$(LIBCC_INCLUDE)
    4545CFLAGS   +=
    4646
  • c/src/tests/samples/cdtest/main.cc

    r13f09e6 r91333c2  
    2222#include <rtems.h>
    2323#include <stdio.h>
     24#ifdef RTEMS_TEST_IO_STREAM
    2425#include <iostream.h>
     26#endif
    2527
    2628extern "C" {
     
    109111    B bleak;
    110112
     113#ifdef RTEMS_TEST_IO_STREAM
    111114    cout << "Testing a C++ I/O stream" << endl;
     115#else
     116    printf("IO Stream not tested\n");
     117#endif
    112118
    113119    bar = blech;
  • configure

    r13f09e6 r91333c2  
    1414ac_help="$ac_help
    1515  --with-cross-host=HOST      host (cygnus)"
     16ac_help="$ac_help
     17\
     18  --enable-gmake-print-directory    enable GNU Make's print directory"
    1619ac_help="$ac_help
    1720\
     
    2326\
    2427  --disable-rtems-inlines           disable RTEMS inline functions (use macros)"
     28ac_help="$ac_help
     29\
     30+   --enable-cpp                           enable C++ support, and build the rtems++ library"
    2531ac_help="$ac_help
    2632\
     
    668674c/src/lib/libbsp/m68k/mvme162/tools/Makefile \
    669675c/src/lib/libbsp/m68k/mvme162/wrapup/Makefile \
     676c/src/lib/libbsp/m68k/ods68302/Makefile \
     677c/src/lib/libbsp/m68k/ods68302/clock/Makefile \
     678c/src/lib/libbsp/m68k/ods68302/console/Makefile \
     679c/src/lib/libbsp/m68k/ods68302/include/Makefile \
     680c/src/lib/libbsp/m68k/ods68302/start302/Makefile \
     681c/src/lib/libbsp/m68k/ods68302/startup/Makefile \
     682c/src/lib/libbsp/m68k/ods68302/timer/Makefile \
     683c/src/lib/libbsp/m68k/ods68302/wrapup/Makefile \
    670684c/src/lib/libcpu/m68k/Makefile \
    671685c/src/lib/libcpu/m68k/m68040/Makefile \
     
    772786
    773787ka9q_mk="c/src/lib/libka9q/Makefile"
     788
     789rtemscpp_mk="c/src/lib/librtems++/Makefile"
    774790
    775791hwapi_mk="\
     
    820836c/src/tests/libtests/rtmonuse/Makefile \
    821837c/src/tests/libtests/stackchk/Makefile \
     838c/src/tests/libtests/rtems++/Makefile \
    822839c/src/tests/mptests/Makefile \
    823840c/src/tests/mptests/mp01/Makefile \
     
    961978
    962979echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
    963 echo "configure:964: checking whether ${MAKE-make} sets \${MAKE}" >&5
     980echo "configure:981: checking whether ${MAKE-make} sets \${MAKE}" >&5
    964981set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
    965982if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
     
    10341051
    10351052echo $ac_n "checking host system type""... $ac_c" 1>&6
    1036 echo "configure:1037: checking host system type" >&5
     1053echo "configure:1054: checking host system type" >&5
    10371054
    10381055host_alias=$host
     
    10551072
    10561073echo $ac_n "checking target system type""... $ac_c" 1>&6
    1057 echo "configure:1058: checking target system type" >&5
     1074echo "configure:1075: checking target system type" >&5
    10581075
    10591076target_alias=$target
     
    10731090
    10741091echo $ac_n "checking build system type""... $ac_c" 1>&6
    1075 echo "configure:1076: checking build system type" >&5
     1092echo "configure:1093: checking build system type" >&5
    10761093
    10771094build_alias=$build
     
    11001117  \
    11011118host=$withval
     1119fi
     1120
     1121
     1122# Check whether --enable-gmake-print-directory or --disable-gmake-print-directory was given.
     1123if test "${enable_gmake_print_directory+set}" = set; then
     1124  enableval="$enable_gmake_print_directory"
     1125  \
     1126case "${enableval}" in
     1127  yes) RTEMS_USE_OWN_PDIR=yes ;;
     1128  no) RTEMS_USE_OWN_PDIR=no ;;
     1129  *)  { echo "configure: error: bad value ${enableval} for gmake-print-directory option" 1>&2; exit 1; } ;;
     1130esac
     1131else
     1132  RTEMS_USE_OWN_PDIR=yes
    11021133fi
    11031134
     
    11441175fi
    11451176
     1177
     1178+ # Check whether --enable-cpp or --disable-cpp was given.
     1179if test "${enable_cpp+set}" = set; then
     1180  enableval="$enable_cpp"
     1181  \
     1182  yes
     1183fi
     1184 RTEMS_HAS_CPLUSPLUS=yes ;;
     1185  no) RTEMS_HAS_CPLUSPLUS=no ;;
     1186  *)  { echo "configure: error: bad value ${enableval} for enable-cpp option" 1>&2; exit 1; } ;;
     1187esac],RTEMS_HAS_CPLUSPLUS=no)
    11461188
    11471189# Check whether --enable-gcc28 or --disable-gcc28 was given.
     
    12051247  m68k-rtems*)
    12061248        rtems_bsp="dmv152 efi332 efi68k gen68302 gen68360 gen68360_040 idp \
    1207                    mvme136 mvme147 mvme147s mvme162 mvme162lx"
     1249                   mvme136 mvme147 mvme147s mvme162 mvme162lx ods68302"
    12081250        makefiles=$m68k_mk
    12091251        ;;
     
    12641306set dummy $ac_prog; ac_word=$2
    12651307echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1266 echo "configure:1267: checking for $ac_word" >&5
     1308echo "configure:1309: checking for $ac_word" >&5
    12671309if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
    12681310  echo $ac_n "(cached) $ac_c" 1>&6
     
    12931335
    12941336echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
    1295 echo "configure:1296: checking whether ln -s works" >&5
     1337echo "configure:1338: checking whether ln -s works" >&5
    12961338if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
    12971339  echo $ac_n "(cached) $ac_c" 1>&6
     
    13201362
    13211363# For now always generate the KA9Q TCP/IP Makefiles
    1322 makefiles="$makefiles $ka9q_mk"
     1364makefiles="$makefiles $ka9q_mk $rtemscpp_mk"
    13231365
    13241366# Check whether --enable-tests or --disable-tests was given.
     
    13481390RTEMS_BSP=$enableval
    13491391fi
     1392
     1393
    13501394
    13511395
     
    15851629s%@RTEMS_LIBC_DIR@%$RTEMS_LIBC_DIR%g
    15861630s%@RTEMS_ROOT@%$RTEMS_ROOT%g
     1631s%@RTEMS_USE_OWN_PDIR@%$RTEMS_USE_OWN_PDIR%g
    15871632s%@RTEMS_HAS_POSIX_API@%$RTEMS_HAS_POSIX_API%g
    15881633s%@RTEMS_HAS_KA9Q@%$RTEMS_HAS_KA9Q%g
    15891634s%@RTEMS_USE_MACROS@%$RTEMS_USE_MACROS%g
     1635s%@RTEMS_HAS_CPLUSPLUS@%$RTEMS_HAS_CPLUSPLUS%g
    15901636s%@RTEMS_USE_GCC272@%$RTEMS_USE_GCC272%g
    15911637s%@PROJECT_ROOT@%$PROJECT_ROOT%g
  • configure.in

    r13f09e6 r91333c2  
    125125c/src/lib/libbsp/m68k/mvme162/tools/Makefile \
    126126c/src/lib/libbsp/m68k/mvme162/wrapup/Makefile \
     127c/src/lib/libbsp/m68k/ods68302/Makefile \
     128c/src/lib/libbsp/m68k/ods68302/clock/Makefile \
     129c/src/lib/libbsp/m68k/ods68302/console/Makefile \
     130c/src/lib/libbsp/m68k/ods68302/include/Makefile \
     131c/src/lib/libbsp/m68k/ods68302/start302/Makefile \
     132c/src/lib/libbsp/m68k/ods68302/startup/Makefile \
     133c/src/lib/libbsp/m68k/ods68302/timer/Makefile \
     134c/src/lib/libbsp/m68k/ods68302/wrapup/Makefile \
    127135c/src/lib/libcpu/m68k/Makefile \
    128136c/src/lib/libcpu/m68k/m68040/Makefile \
     
    229237
    230238ka9q_mk="c/src/lib/libka9q/Makefile"
     239
     240rtemscpp_mk="c/src/lib/librtems++/Makefile"
    231241
    232242hwapi_mk="\
     
    277287c/src/tests/libtests/rtmonuse/Makefile \
    278288c/src/tests/libtests/stackchk/Makefile \
     289c/src/tests/libtests/rtems++/Makefile \
    279290c/src/tests/mptests/Makefile \
    280291c/src/tests/mptests/mp01/Makefile \
     
    423434host=$withval)
    424435
     436AC_ARG_ENABLE(gmake-print-directory, \
     437[  --enable-gmake-print-directory    enable GNU Make's print directory], \
     438[case "${enableval}" in
     439  yes) RTEMS_USE_OWN_PDIR=yes ;;
     440  no) RTEMS_USE_OWN_PDIR=no ;;
     441  *)  AC_MSG_ERROR(bad value ${enableval} for gmake-print-directory option) ;;
     442esac],[RTEMS_USE_OWN_PDIR=yes])
     443
    425444AC_ARG_ENABLE(posix, \
    426445[  --disable-posix                  disable posix interface], \
     
    447466esac],[RTEMS_USE_MACROS=no])
    448467
     468+ AC_ARG_ENABLE(cpp, \
     469+ [  --enable-cpp                           enable C++ support, and build the rtems++ library], \
     470  yes) RTEMS_HAS_CPLUSPLUS=yes ;;
     471  no) RTEMS_HAS_CPLUSPLUS=no ;;
     472  *)  AC_MSG_ERROR(bad value ${enableval} for enable-cpp option) ;;
     473esac],[RTEMS_HAS_CPLUSPLUS=no])
     474
    449475AC_ARG_ENABLE(gcc28, \
    450476[  --enable-gcc28                   enable use of gcc 2.8.x features], \
     
    497523  m68k-rtems*)
    498524        rtems_bsp="dmv152 efi332 efi68k gen68302 gen68360 gen68360_040 idp \
    499                    mvme136 mvme147 mvme147s mvme162 mvme162lx"
     525                   mvme136 mvme147 mvme147s mvme162 mvme162lx ods68302"
    500526        makefiles=$m68k_mk
    501527        ;;
     
    562588
    563589# For now always generate the KA9Q TCP/IP Makefiles
    564 makefiles="$makefiles $ka9q_mk"
     590makefiles="$makefiles $ka9q_mk $rtemscpp_mk"
    565591
    566592AC_ARG_ENABLE(tests, \
     
    580606AC_SUBST(RTEMS_LIBC_DIR)
    581607AC_SUBST(RTEMS_ROOT)
     608AC_SUBST(RTEMS_USE_OWN_PDIR)
    582609AC_SUBST(RTEMS_HAS_POSIX_API)
    583610AC_SUBST(RTEMS_HAS_KA9Q)
    584611AC_SUBST(RTEMS_USE_MACROS)
     612AC_SUBST(RTEMS_HAS_CPLUSPLUS)
    585613AC_SUBST(RTEMS_USE_GCC272)
    586614AC_SUBST(RTEMS_LIBC_DIR)
  • cpukit/score/cpu/m68k/m68302.h

    r13f09e6 r91333c2  
    6969#define RBIT_SCR_HWDEN          0x00000800
    7070#define RBIT_SCR_HWDCN2         0x00000400
    71 #define RBIT_SCR_HWDCN1         0x00000200
    72 #define RBIT_SCR_HWDCN0         0x00000100
     71#define RBIT_SCR_HWDCN1         0x00000200  /* 512 clocks */
     72#define RBIT_SCR_HWDCN0         0x00000100  /* 128 clocks */
    7373
    7474#define RBIT_SCR_LPREC          0x00000080
     
    540540    rtems_unsigned16    res6;
    541541    rtems_unsigned16    res7;
     542
    542543    rtems_unsigned16    br0;            /* Base Register   (CS0) */
    543544    rtems_unsigned16    or0;            /* Option Register (CS0) */
     
    598599} m302_dualPortRAM_t;
    599600
     601/* some useful defines the some of the registers above */
     602 
     603
     604/* ----
     605   MC68302 Chip Select Registers
     606      p3-46 2nd Edition
     607
     608 */
     609#define BR_ENABLED     1
     610#define BR_DISABLED    0
     611#define BR_FC_NULL     0
     612#define BR_READ_ONLY   0
     613#define BR_READ_WRITE  2
     614#define OR_DTACK_0     0x0000
     615#define OR_DTACK_1     0x2000
     616#define OR_DTACK_2     0x4000
     617#define OR_DTACK_3     0x6000
     618#define OR_DTACK_4     0x8000
     619#define OR_DTACK_5     0xA000
     620#define OR_DTACK_6     0xC000
     621#define OR_DTACK_EXT   0xE000
     622#define OR_SIZE_64K    0x1FE0
     623#define OR_SIZE_128K   0x1FC0
     624#define OR_SIZE_256K   0x1F80
     625#define OR_SIZE_512K   0x1F00
     626#define OR_SIZE_1M     0x1E00
     627#define OR_SIZE_2M     0x1C00
     628#define OR_MASK_RW     0x0000
     629#define OR_NO_MASK_RW  0x0002
     630#define OR_MASK_FC     0x0000
     631#define OR_NO_MASK_FC  0x0001
     632
     633#define MAKE_BR(base_address, enable, rw, fc) \
     634    ((base_address >> 11) | fc | rw | enable)
     635
     636#define MAKE_OR(bsize, DtAck, RW_Mask, FC_Mask) \
     637    (DtAck | ((~(bsize - 1) & 0x00FFFFFF) >> 11) | FC_Mask | RW_Mask)
     638
     639#define __REG_CAT(r, n) r ## n
     640#define WRITE_BR(csel, base_address, enable, rw, fc) \
     641          __REG_CAT(m302.reg.br, csel) = MAKE_BR(base_address, enable, rw, fc)
     642#define WRITE_OR(csel, bsize, DtAck, RW_Mask, FC_Mask) \
     643          __REG_CAT(m302.reg.or, csel) = MAKE_OR(bsize, DtAck, RW_Mask, FC_Mask)
     644
     645/* ----
     646   MC68302 Watchdog Timer Enable Bit
     647
     648 */
     649#define WATCHDOG_ENABLE    (1)
     650#define WATCHDOG_TRIGGER() (m302.reg.wrr = 0x10 | WATCHDOG_ENABLE, m302.reg.wcn = 0)
     651#define WATCHDOG_TOGGLE()  (m302.reg.wcn = WATCHDOG_TIMEOUT_PERIOD)
     652#define DISABLE_WATCHDOG() (m302.reg.wrr = 0)
    600653
    601654/*
  • cpukit/score/cpu/m68k/rtems/m68k/m68302.h

    r13f09e6 r91333c2  
    6969#define RBIT_SCR_HWDEN          0x00000800
    7070#define RBIT_SCR_HWDCN2         0x00000400
    71 #define RBIT_SCR_HWDCN1         0x00000200
    72 #define RBIT_SCR_HWDCN0         0x00000100
     71#define RBIT_SCR_HWDCN1         0x00000200  /* 512 clocks */
     72#define RBIT_SCR_HWDCN0         0x00000100  /* 128 clocks */
    7373
    7474#define RBIT_SCR_LPREC          0x00000080
     
    540540    rtems_unsigned16    res6;
    541541    rtems_unsigned16    res7;
     542
    542543    rtems_unsigned16    br0;            /* Base Register   (CS0) */
    543544    rtems_unsigned16    or0;            /* Option Register (CS0) */
     
    598599} m302_dualPortRAM_t;
    599600
     601/* some useful defines the some of the registers above */
     602 
     603
     604/* ----
     605   MC68302 Chip Select Registers
     606      p3-46 2nd Edition
     607
     608 */
     609#define BR_ENABLED     1
     610#define BR_DISABLED    0
     611#define BR_FC_NULL     0
     612#define BR_READ_ONLY   0
     613#define BR_READ_WRITE  2
     614#define OR_DTACK_0     0x0000
     615#define OR_DTACK_1     0x2000
     616#define OR_DTACK_2     0x4000
     617#define OR_DTACK_3     0x6000
     618#define OR_DTACK_4     0x8000
     619#define OR_DTACK_5     0xA000
     620#define OR_DTACK_6     0xC000
     621#define OR_DTACK_EXT   0xE000
     622#define OR_SIZE_64K    0x1FE0
     623#define OR_SIZE_128K   0x1FC0
     624#define OR_SIZE_256K   0x1F80
     625#define OR_SIZE_512K   0x1F00
     626#define OR_SIZE_1M     0x1E00
     627#define OR_SIZE_2M     0x1C00
     628#define OR_MASK_RW     0x0000
     629#define OR_NO_MASK_RW  0x0002
     630#define OR_MASK_FC     0x0000
     631#define OR_NO_MASK_FC  0x0001
     632
     633#define MAKE_BR(base_address, enable, rw, fc) \
     634    ((base_address >> 11) | fc | rw | enable)
     635
     636#define MAKE_OR(bsize, DtAck, RW_Mask, FC_Mask) \
     637    (DtAck | ((~(bsize - 1) & 0x00FFFFFF) >> 11) | FC_Mask | RW_Mask)
     638
     639#define __REG_CAT(r, n) r ## n
     640#define WRITE_BR(csel, base_address, enable, rw, fc) \
     641          __REG_CAT(m302.reg.br, csel) = MAKE_BR(base_address, enable, rw, fc)
     642#define WRITE_OR(csel, bsize, DtAck, RW_Mask, FC_Mask) \
     643          __REG_CAT(m302.reg.or, csel) = MAKE_OR(bsize, DtAck, RW_Mask, FC_Mask)
     644
     645/* ----
     646   MC68302 Watchdog Timer Enable Bit
     647
     648 */
     649#define WATCHDOG_ENABLE    (1)
     650#define WATCHDOG_TRIGGER() (m302.reg.wrr = 0x10 | WATCHDOG_ENABLE, m302.reg.wcn = 0)
     651#define WATCHDOG_TOGGLE()  (m302.reg.wcn = WATCHDOG_TIMEOUT_PERIOD)
     652#define DISABLE_WATCHDOG() (m302.reg.wrr = 0)
    600653
    601654/*
  • testsuites/samples/cdtest/main.cc

    r13f09e6 r91333c2  
    2222#include <rtems.h>
    2323#include <stdio.h>
     24#ifdef RTEMS_TEST_IO_STREAM
    2425#include <iostream.h>
     26#endif
    2527
    2628extern "C" {
     
    109111    B bleak;
    110112
     113#ifdef RTEMS_TEST_IO_STREAM
    111114    cout << "Testing a C++ I/O stream" << endl;
     115#else
     116    printf("IO Stream not tested\n");
     117#endif
    112118
    113119    bar = blech;
Note: See TracChangeset for help on using the changeset viewer.