source: rtems/make/custom/gen68360.cfg @ 02c14a0

4.104.114.84.95
Last change on this file since 02c14a0 was 17408b90, checked in by Joel Sherrill <joel.sherrill@…>, on 09/30/98 at 13:02:30

Patch from Eric Norum <eric@…>:

I found that my 68040/68360 test programs would not run even after
I fixed the `wrong BSP' problem.

It seems that there's a bug in the interrupt handling code for
processors with hardware interrupt stacks (e.g. 68040). The wrong
status register was getting pushed on the stack for the `return
from exception' to call _ISRDispatch. This ended up making
the context switch code run on the interrupt stack, so interrupt-driven
context switches would always fail.

I guess that no one has tried running any of the RTEMS-4.0 snapshots
on a 68040 machine!

Anyhow, here are the patches for

1) gen68360.cfg --- to fix the `wrong-BSP' problem.
2) m68k/cpu_asm.s --- to fix the hardware interrupt stack problem.

With these patches in place, the network demo programs run on my
68040/68360 system. The paranoia program runs with no failures,
defects nor flaws.

  • Property mode set to 100644
File size: 2.3 KB
Line 
1#
2#  Config file for a "generic 68360" BSP
3#
4#  $Id$
5#
6
7RTEMS_CPU=m68k
8
9ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes)
10TARGET_ARCH=o-gen68360_040
11RTEMS_CPU_MODEL=m68040
12else
13TARGET_ARCH=o-gen68360
14RTEMS_CPU_MODEL=mcpu32
15endif
16
17include $(RTEMS_ROOT)/make/custom/default.cfg
18
19# This is the actual bsp directory used during the build process.
20RTEMS_BSP_FAMILY=gen68360
21
22#
23# You must use versions of gcc and gas that support the -mcpu32 option.
24#
25ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes)
26CPU_CFLAGS= -m68040
27else
28CPU_CFLAGS = -mcpu32
29endif
30
31# optimize flag: typically -0, could use -O4 or -fast
32# -O4 is ok for RTEMS
33CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
34
35# Override default start file
36START_BASE=start360
37
38#  This section makes the target dependent options file.
39#  NDEBUG (C library)
40#     if defined asserts do not generate code.  This is commonly used
41#     as a command line option.
42#
43#  RTEMS_TEST_NO_PAUSE (RTEMS tests)
44#     do not pause between screens of output in the rtems tests
45#
46#  RTEMS_DEBUG (RTEMS)
47#     If defined, debug checks in RTEMS and support library code are enabled.
48#
49
50define make-target-options
51        @echo "/* #define NDEBUG 1 */ "                     >>$@
52        @echo "#define RTEMS_TEST_NO_PAUSE 1"               >>$@
53        @echo "/* #define RTEMS_DEBUG  1 */"                >>$@
54        @echo "#define RTEMS__mcpu32p__ 1"                  >>$@
55endef
56
57# The following are definitions of make-exe which will work using ld as
58# is currently required.  It is expected that as of gcc 2.8, the end user
59# will be able to override parts of the compilers specs and link using gcc.
60
61ifeq ($(RTEMS_USE_GCC272),yes)
62
63# override default location of Standard C Library
64LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/m68000/msoft-float/libc.a
65LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/m68000/msoft-float/libm.a
66
67define make-exe
68        @ echo
69        @ echo "WARNING: newlib may use bit test instructions!!"
70        @ echo
71        $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \
72            $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
73        $(NM) -g -n $(basename $@).exe > $(basename $@).num
74        $(SIZE) $(basename $@).exe
75endef
76else
77
78define make-exe
79        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
80            $(LINK_OBJS) $(LINK_LIBS)
81        $(NM) -g -n $(basename $@).exe > $(basename $@).num
82        $(SIZE) $(basename $@).exe
83endef
84endif
85
86
87# Miscellaneous additions go here
Note: See TracBrowser for help on using the repository browser.