diff --git a/src/bootloader/Makefile b/src/bootloader/Makefile index 9996e5e..8828afd 100644 --- a/src/bootloader/Makefile +++ b/src/bootloader/Makefile @@ -8,7 +8,7 @@ else LIB_DIRS=-L $(MIPS_TOOLS_PREFIX)/mipsel-elf/lib -L $(MIPS_TOOLS_PREFIX)/lib/gcc/mipsel-elf/$(MIPS_GCC_VER) endif -CFLAGS=$(ENDIAN_FLAGS) -Os -I. -I../ -I../libsys -msoft-float -march=r3000 +CFLAGS=$(ENDIAN_FLAGS) -Os -I. -I../ -I../libsys -msoft-float -march=r3000 -G0 LFLAGS=$(ENDIAN_FLAGS) -M ifeq ($(TLB),yes) diff --git a/src/bootloader/test.c b/src/bootloader/test.c index af9b4da..8ae948c 100644 --- a/src/bootloader/test.c +++ b/src/bootloader/test.c @@ -1,7 +1,5 @@ #include "libsys_boot.h" -extern uint32_t stack_ptr; - void handler3(void) { volatile uint32_t *pUART0_stat = (uint32_t*)SYS_UART_STAT; @@ -9,7 +7,8 @@ void handler3(void) while(0x200 & *pUART0_stat) { - sputs("RX: "); print_word((int)*pUART0_data); sputs("\n"); + char data = (char)*pUART0_data; + sputs(&data); } } @@ -19,7 +18,6 @@ void main() volatile uint32_t *pUART0_stat = (uint32_t*)SYS_UART_STAT; volatile uint32_t *pGPIO = (uint32_t*)SYS_GPIO_0_DATA; volatile uint32_t *pGPIODIR = (uint32_t*)SYS_GPIO_0_DIR; - volatile uint32_t *pRAM = (uint32_t*)SDRAM_BASE; CP0_SR_write(0x0060000D); *pGPIODIR = GPIO_0_DFLT_DIR;