diff --git a/src/Makefile b/src/Makefile index 2cc05bd..6213a4a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,7 +3,7 @@ BOARD ?=ml402 include $(MIPS_HOME)/make/mips_app.mk -PROG-ml402 = $(addprefix $(BUILD_DIR)/, hello.elf testbench.elf test_irq.elf dhry.elf queens.elf stanford.elf paranoia.elf rmd160_test.elf Bessel.elf whet.elf phrasen.elf dttl.elf richards_benchmark.elf test_exception.elf life.elf r3.elf gunzip.elf basic_math.elf jman_patches.elf jman_patchmeshes.elf jman_polys.elf test_hpi.elf test_vga.elf test_fft.elf flashtest.elf) +PROG-ml402 = $(addprefix $(BUILD_DIR)/, hello.elf testbench.elf test_irq.elf dhry.elf queens.elf stanford.elf paranoia.elf rmd160_test.elf Bessel.elf whet.elf phrasen.elf dttl.elf richards_benchmark.elf test_exception.elf life.elf r3.elf gunzip.elf basic_math.elf jman_patches.elf jman_patchmeshes.elf jman_polys.elf test_hpi.elf test_vga.elf test_fft.elf flashtest.elf test_emac_sim.elf) PROG-denano = $(addprefix $(BUILD_DIR)/, hello.elf dhry.elf queens.elf stanford.elf paranoia.elf rmd160_test.elf Bessel.elf whet.elf phrasen.elf dttl.elf richards_benchmark.elf test_exception.elf testbench_denano.elf) PROG-sim = $(addprefix $(BUILD_DIR)/, hello.elf test_exception_sim.elf) diff --git a/src/common/jman/types.h b/src/common/jman/types.h index e5b7457..eda1c88 100644 --- a/src/common/jman/types.h +++ b/src/common/jman/types.h @@ -7,13 +7,6 @@ #include -#ifndef ERROR_BASE -#define ERROR_BASE 0x80000000 -#endif -#ifndef IS_ERROR -#define IS_ERROR(e) ((e & ERROR_BASE) == ERROR_BASE) -#endif - #define MAX(a,b) ((a)>(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):(b)) diff --git a/src/common/libsys/irq.c b/src/common/libsys/irq.c index a4aa127..c03f297 100644 --- a/src/common/libsys/irq.c +++ b/src/common/libsys/irq.c @@ -3,7 +3,7 @@ #include "asm/regdef.h" #include "xcpt.h" #include "irq.h" -#include +#include "cop0.h" static fp_irq_t g_irq_handler[MAX_NUM_IRQ] = {NULL}; diff --git a/src/common/libsys/uart.h b/src/common/libsys/uart.h index fa6b1d3..d0430db 100644 --- a/src/common/libsys/uart.h +++ b/src/common/libsys/uart.h @@ -30,6 +30,7 @@ typedef struct _suart_if_t extern "C" { #endif +void UART_setbaud(void const *pInst, uint32_t baudrate); int UART_readchar(void const *pInst); void UART_writechar(void const *pInst, char c); diff --git a/src/emac.c b/src/emac.c index f6fa04e..7049248 100644 --- a/src/emac.c +++ b/src/emac.c @@ -5,7 +5,8 @@ #include #include #include -#include "libsys.h" + +#include void EMAC_TX_commit(void) { diff --git a/src/emac.h b/src/emac.h index 78ad404..caaba15 100644 --- a/src/emac.h +++ b/src/emac.h @@ -2,7 +2,7 @@ #define EMAC_H #include -#include "libsys.h" +#include void EMAC_TX_commit(void); void EMAC_TX_alloc(uint32_t size); diff --git a/src/gunzip.c b/src/gunzip.c index fa9e492..b5f9190 100644 --- a/src/gunzip.c +++ b/src/gunzip.c @@ -6,6 +6,9 @@ #include #include +#include +#include +#include #include "crc32.h" #include "inflate.h" @@ -16,7 +19,7 @@ char * volatile pPtr_w; volatile int timeout_cnt; volatile int file_len; -void handler3(struct xcptcontext *xcp) +void handler3(EXCEPTION_CONTEXT *xcp) { volatile uint32_t *pUART_stat = (uint32_t*)SYS_UART0_STAT; volatile uint32_t *pUART_data = (uint32_t*)SYS_UART0_DATA; diff --git a/src/main_patchmeshes.c b/src/main_patchmeshes.c index 8706aca..afc16b6 100644 --- a/src/main_patchmeshes.c +++ b/src/main_patchmeshes.c @@ -47,7 +47,7 @@ Point2D points[NPOINTS] = { }; RtColor color = {.9,.9,.5}; -Go() { +void Go() { RiColor(color); RiRotate(-90.0, 1.0, 0.0, 0.0); SurfOR(points, NPOINTS); @@ -66,7 +66,7 @@ typedef struct _testi RtPointer p; } testi; -main() +int main() { RtInt frame, i; char filename[256]; diff --git a/src/main_polypin.c b/src/main_polypin.c index 749fcfd..315889a 100644 --- a/src/main_polypin.c +++ b/src/main_polypin.c @@ -108,7 +108,7 @@ void Go(void) PolySurfOR(points, colors, NPOINTS); } -main() +int main() { RiBegin(RI_NULL); /* As always */ diff --git a/src/phrasen.c b/src/phrasen.c index f98acba..f43d8c4 100644 --- a/src/phrasen.c +++ b/src/phrasen.c @@ -1,6 +1,7 @@ #include #include #include +#include struct substantive { diff --git a/src/r3.c b/src/r3.c index feab469..66e2e93 100644 --- a/src/r3.c +++ b/src/r3.c @@ -15,6 +15,7 @@ * or * ./r3 | xv - */ +#include #include uint32_t *pP; diff --git a/src/test_emac_sim.c b/src/test_emac_sim.c index 007e24b..8ff27e7 100644 --- a/src/test_emac_sim.c +++ b/src/test_emac_sim.c @@ -5,7 +5,9 @@ #include #include #include -#include "libsys.h" +#include +#include + #include "emac.h" volatile uint32_t g_rx_pkt_cnt; diff --git a/src/test_hpi.c b/src/test_hpi.c index a186235..9f70e5a 100644 --- a/src/test_hpi.c +++ b/src/test_hpi.c @@ -278,7 +278,7 @@ uint32_t conf_write(uint16_t *pConfDescr, uint32_t neps, ep_descr_t *pEP) // Copy OTG description pos += size; - size = sizeof(ep_descr_t); + size = sizeof(otg_descr_t); memcpy(&pStr8[pos], &otg_descr, size); pos += size; diff --git a/src/test_vga.c b/src/test_vga.c index 74eff65..58df7ea 100644 --- a/src/test_vga.c +++ b/src/test_vga.c @@ -6,6 +6,9 @@ #include #include +#include +#include +#include #include #include #include @@ -17,7 +20,7 @@ static volatile int32_t mouse_y; static box_t box_even, box_odd, line_h_even, line_v_even, line_h_odd, line_v_odd, cross_v, cross_h; static gfx_t gfx; static volatile int _g_posx, _g_posy; -static volatile g_btn_l, g_btn_r; +static volatile int g_btn_l, g_btn_r; static volatile uint32_t g_color; static char *ps2_name[PS2_NUM_IF] = {"PS2-0", "PS2-1"};