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