- fixed bootloader
git-svn-id: http://moon:8086/svn/mips@155 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
+2
-7
@@ -17,12 +17,10 @@ SECTIONS
|
||||
_entry = ALIGN(4);
|
||||
__entry = ALIGN(4);
|
||||
*(.init)
|
||||
. = ORIGIN(rom) + 0x180;
|
||||
. = ORIGIN(rom) + 0x080;
|
||||
*(.ktext)
|
||||
*(.text*)
|
||||
*(.rodata*)
|
||||
. = ORIGIN(rom) + LENGTH(rom) - 0x40;
|
||||
*(.dbg_stub*)
|
||||
} > rom
|
||||
|
||||
.data ORIGIN(ram) :
|
||||
@@ -33,9 +31,6 @@ SECTIONS
|
||||
_end = ALIGN(4);
|
||||
} > ram
|
||||
|
||||
.flash ORIGIN(flash) :
|
||||
{
|
||||
_flash_start = ALIGN(4);
|
||||
} > flash
|
||||
_flash_start = ORIGIN(flash);
|
||||
|
||||
}
|
||||
|
||||
+6
-15
@@ -3,9 +3,9 @@
|
||||
# TLB = {no, yes}
|
||||
# ENDIANESS = {eb, el}
|
||||
BOARD ?= ml402
|
||||
TLB ?= no
|
||||
WITH_TLB ?= n
|
||||
ENDIANESS ?= eb
|
||||
DEBUGGER ?= gdb
|
||||
DEBUGGER ?= n
|
||||
|
||||
ifeq ($(ENDIANESS),el)
|
||||
ENDIAN_FLAGS=-EL
|
||||
@@ -13,18 +13,9 @@ else
|
||||
ENDIAN_FLAGS=-EB
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUGGER),gdb)
|
||||
DBG_FLAGS := -DWITH_DEBUGGER -DWITH_GDB_STUB
|
||||
DBG_OBJ := gdb_stub.o
|
||||
endif
|
||||
ifeq ($(DEBUGGER),mips)
|
||||
DBG_FLAGS := -DWITH_DEBUGGER
|
||||
DBG_OBJ := mips_dbg.o mips_dis.o
|
||||
endif
|
||||
|
||||
|
||||
CFLAGS=$(ENDIAN_FLAGS) -Os -ffunction-sections -fdata-sections -I. -I../libsys -msoft-float -march=r3000 -G0 -I../libsys/boards/$(BOARD) -D$(BOARD) $(DBG_FLAGS)
|
||||
LFLAGS=$(ENDIAN_FLAGS) -Os -nostartfiles -nodefaultlibs -nostdlib -Wl,--gc-sections -Wl,-M
|
||||
FLAGS := -fno-exceptions -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -nostartfiles -nodefaultlibs -nostdlib
|
||||
CFLAGS=$(ENDIAN_FLAGS) $(FLAGS) -Os -I. -I../libsys -msoft-float -march=r3000 -G0 -I../libsys/boards/$(BOARD) -D$(BOARD)
|
||||
LFLAGS=$(ENDIAN_FLAGS) $(FLAGS) -Os
|
||||
|
||||
ifeq ($(TLB),yes)
|
||||
CFLAGS+=-DSYS_IO_BASE=0xAC000000 -DSDRAM_BASE=0x80000000 -DFLASH_BASE_IO=0xA4000000 -DFLASH_BASE_MEM=0x88000000
|
||||
@@ -36,7 +27,7 @@ endif
|
||||
|
||||
BUILD_DIR=./build/$(BOARD)/$(ENDIANESS)
|
||||
|
||||
LIBS=-lc -lgcc
|
||||
LIBS=-lc
|
||||
CFLAGS += -DXCP_SIZE=4096
|
||||
|
||||
CC=mips-elf-gcc
|
||||
|
||||
@@ -12,20 +12,12 @@
|
||||
|
||||
extern uart_if_t uart_if[];
|
||||
|
||||
int gdb_stub(struct xcptcontext * xcp) __attribute__ ((section (".gdb")));
|
||||
|
||||
int gdb_stub(struct xcptcontext * xcp)
|
||||
{
|
||||
handle_exception((unsigned long *)xcp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline void _dbg_writechar(uart_if_t const *pUart, char c)
|
||||
void _dbg_writechar(uart_if_t const *pUart, char c)
|
||||
{
|
||||
UART_writechar(pUart, c);
|
||||
}
|
||||
|
||||
inline char _dbg_readchar(uart_if_t const *pUart)
|
||||
char _dbg_readchar(uart_if_t const *pUart)
|
||||
{
|
||||
int c;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user