2006-02-22 Nathan Sidwell <nathan@codesourcery.com>
* m68k/Makefile.in (CF_SCRIPTS): New. (all): Add CF_SCRIPTS. (m5208evb.ld, m5213evb.ld, m5235evb.ld, m5272c3.ld, m5282evb.ld): New targets (install): Iterate over CF_SCRIPTS. * m68k/crt0.S: Don't use dbra on any cf chips. * m68k/dbug-cf.sc: New.
This commit is contained in:
parent
2eecb0478c
commit
7db9cdd24e
|
@ -1,3 +1,13 @@
|
|||
2006-02-22 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* m68k/Makefile.in (CF_SCRIPTS): New.
|
||||
(all): Add CF_SCRIPTS.
|
||||
(m5208evb.ld, m5213evb.ld, m5235evb.ld, m5272c3.ld,
|
||||
m5282evb.ld): New targets
|
||||
(install): Iterate over CF_SCRIPTS.
|
||||
* m68k/crt0.S: Don't use dbra on any cf chips.
|
||||
* m68k/dbug-cf.sc: New.
|
||||
|
||||
2006-02-07 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* arm/crt0.S: Add Thumb-2 startup code.
|
||||
|
|
|
@ -123,6 +123,8 @@ IDPGDB_OBJS= leds.o idp-inbyte.o idp-gdb-outbyte.o mc68ec.o
|
|||
DBUG_BSP= libdbug.a
|
||||
DBUG_OBJS= dbug-exit.o dbug-inbyte.o dbug-outbyte.o
|
||||
|
||||
CF_SCRIPTS= m5208evb.ld m5213evb.ld m5235evb.ld m5272c3.ld m5282evb.ld
|
||||
|
||||
# Host specific makefile fragment comes in here.
|
||||
@host_makefile_frag@
|
||||
|
||||
|
@ -130,7 +132,7 @@ DBUG_OBJS= dbug-exit.o dbug-inbyte.o dbug-outbyte.o
|
|||
# build a test program for each target board. Just trying to get
|
||||
# it to link is a good test, so we ignore all the errors for now.
|
||||
#
|
||||
all: ${SIM_CRT0} ${SIM_BSP} ${CRT0} ${BCC_BSP} ${IDP_BSP} ${IDPGDB_BSP} ${MVME135_BSP} ${MVME162_BSP} ${DBUG_BSP}
|
||||
all: ${SIM_CRT0} ${SIM_BSP} ${CRT0} ${BCC_BSP} ${IDP_BSP} ${IDPGDB_BSP} ${MVME135_BSP} ${MVME162_BSP} ${DBUG_BSP} ${CF_SCRIPTS}
|
||||
|
||||
#
|
||||
# here's where we build the board support packages for each target
|
||||
|
@ -163,6 +165,21 @@ ${MVME162_BSP}: $(OBJS) ${MVME162_OBJS}
|
|||
${AR} ${ARFLAGS} $@ $(OBJS) ${MVME162_OBJS}
|
||||
${RANLIB} $@
|
||||
|
||||
m5208evb.ld: dbug-cf.sc Makefile
|
||||
RAMSTART=1024M RAMSIZE=16M RAMDBUG=128K ${SHELL} $< > $@
|
||||
|
||||
m5213evb.ld: dbug-cf.sc Makefile
|
||||
RAMSTART=512M RAMSIZE=32K RAMDBUG=8K ${SHELL} $< > $@
|
||||
|
||||
m5235evb.ld: dbug-cf.sc Makefile
|
||||
RAMSTART=0M RAMSIZE=16M RAMDBUG=64K ${SHELL} $< > $@
|
||||
|
||||
m5272c3.ld: dbug-cf.sc Makefile
|
||||
RAMSTART=0M RAMSIZE=4M RAMDBUG=128K ${SHELL} $< > $@
|
||||
|
||||
m5282evb.ld: dbug-cf.sc Makefile
|
||||
RAMSTART=0M RAMSIZE=16M RAMDBUG=64K ${SHELL} $< > $@
|
||||
|
||||
leds.o: ${srcdir}/leds.c
|
||||
$(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $<
|
||||
|
||||
|
@ -283,6 +300,9 @@ install:
|
|||
$(INSTALL_PROGRAM) $(DBUG_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(DBUG_BSP)
|
||||
$(INSTALL_DATA) ${srcdir}/sbc5204.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/sbc5204.ld
|
||||
$(INSTALL_DATA) ${srcdir}/sbc5206.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/sbc5206.ld
|
||||
for script in $(CF_SCRIPTS) ; \
|
||||
do $(INSTALL_DATA) $$script $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$$script ; \
|
||||
done
|
||||
|
||||
# target specific makefile fragment comes in here.
|
||||
@target_makefile_frag@
|
||||
|
|
|
@ -84,7 +84,7 @@ SYM (start):
|
|||
subql IMM(1), d0
|
||||
2:
|
||||
clrb (a0)+
|
||||
#if !defined(__mcoldfire__) && !defined(__mcf5200__)
|
||||
#if !defined(__mcoldfire__)
|
||||
dbra d0, 2b
|
||||
clrw d0
|
||||
subql IMM(1), d0
|
||||
|
|
|
@ -0,0 +1,112 @@
|
|||
# a linker script template.
|
||||
# RAMSTART - start of board's ram
|
||||
# RAMSIZE - size of board's ram
|
||||
# RAMDBUG - bytes at start of RAM for DBUG use
|
||||
|
||||
cat <<EOF
|
||||
STARTUP(crt0.o)
|
||||
OUTPUT_ARCH(m68k)
|
||||
/* DBUG loads SREC files */
|
||||
/*OUTPUT_FORMAT(srec)*/
|
||||
ENTRY(start)
|
||||
SEARCH_DIR(.)
|
||||
GROUP(-ldbug -lc -lgcc -ldbug)
|
||||
__DYNAMIC = 0;
|
||||
|
||||
MEMORY
|
||||
{
|
||||
ram (rwx) : ORIGIN = ${RAMSTART} + ${RAMDBUG:-0},
|
||||
LENGTH = ${RAMSIZE} - ${RAMDBUG:-0}
|
||||
}
|
||||
|
||||
PROVIDE (__stack = ${RAMSTART} + ${RAMSIZE});
|
||||
|
||||
/*
|
||||
* Initalize some symbols to be zero so we can reference them in the
|
||||
* crt0 without core dumping. These functions are all optional, but
|
||||
* we do this so we can have our crt0 always use them if they exist.
|
||||
* This is so BSPs work better when using the crt0 installed gcc.
|
||||
* We have to initalize them twice, so we cover a.out (which prepends
|
||||
* an underscore) and coff object file formats.
|
||||
*/
|
||||
PROVIDE (hardware_init_hook = 0);
|
||||
PROVIDE (_hardware_init_hook = 0);
|
||||
PROVIDE (software_init_hook = 0);
|
||||
PROVIDE (_software_init_hook = 0);
|
||||
/*
|
||||
* stick everything in ram (of course)
|
||||
*/
|
||||
SECTIONS
|
||||
{
|
||||
.text :
|
||||
{
|
||||
CREATE_OBJECT_SYMBOLS
|
||||
*(.text .text.*)
|
||||
|
||||
. = ALIGN(0x4);
|
||||
/* These are for running static constructors and destructors under ELF. */
|
||||
KEEP (*crtbegin.o(.ctors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
|
||||
KEEP (*(SORT(.ctors.*)))
|
||||
KEEP (*(.ctors))
|
||||
KEEP (*crtbegin.o(.dtors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
|
||||
KEEP (*(SORT(.dtors.*)))
|
||||
KEEP (*(.dtors))
|
||||
|
||||
*(.rodata .rodata.*)
|
||||
|
||||
. = ALIGN(0x4);
|
||||
*(.gcc_except_table)
|
||||
|
||||
. = ALIGN(0x4);
|
||||
*(.eh_frame)
|
||||
|
||||
. = ALIGN(0x4);
|
||||
__INIT_SECTION__ = . ;
|
||||
LONG (0x4e560000) /* linkw %fp,#0 */
|
||||
*(.init)
|
||||
SHORT (0x4e5e) /* unlk %fp */
|
||||
SHORT (0x4e75) /* rts */
|
||||
|
||||
. = ALIGN(0x4);
|
||||
__FINI_SECTION__ = . ;
|
||||
LONG (0x4e560000) /* linkw %fp,#0 */
|
||||
*(.fini)
|
||||
SHORT (0x4e5e) /* unlk %fp */
|
||||
SHORT (0x4e75) /* rts */
|
||||
|
||||
_etext = .;
|
||||
*(.lit)
|
||||
} > ram
|
||||
|
||||
.data :
|
||||
{
|
||||
*(.got.plt) *(.got)
|
||||
*(.shdata)
|
||||
*(.data .data.*)
|
||||
_edata = .;
|
||||
} > ram
|
||||
|
||||
.bss :
|
||||
{
|
||||
. = ALIGN(0x4);
|
||||
__bss_start = . ;
|
||||
*(.shbss)
|
||||
*(.bss .bss.*)
|
||||
*(COMMON)
|
||||
_end = ALIGN (0x8);
|
||||
__end = _end;
|
||||
} > ram
|
||||
|
||||
.stab 0 (NOLOAD) :
|
||||
{
|
||||
*(.stab)
|
||||
}
|
||||
|
||||
.stabstr 0 (NOLOAD) :
|
||||
{
|
||||
*(.stabstr)
|
||||
}
|
||||
}
|
||||
EOF
|
Loading…
Reference in New Issue