URL
https://opencores.org/ocsvn/minsoc/minsoc/trunk
Subversion Repositories minsoc
Compare Revisions
- This comparison shows the changes necessary to convert path
/minsoc/trunk/sw
- from Rev 61 to Rev 64
- ↔ Reverse comparison
Rev 61 → Rev 64
/eth/Makefile
File deleted
eth/Makefile
Property changes :
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: eth/eth.c
===================================================================
--- eth/eth.c (revision 61)
+++ eth/eth.c (revision 64)
@@ -1,5 +1,5 @@
+#include "../../backend/board.h"
#include "../support/support.h"
-#include "../support/board.h"
#include "../support/or1200.h"
/eth/common.mk
0,0 → 1,22
eth-nocache.hex: eth-nocache.bin |
$(BIN2HEX) $? 1 -size_word > $@ |
|
eth-nocache.bin: eth-nocache.or32 |
$(OR32_TOOL_PREFIX)-objcopy -O binary $? $@ |
|
eth-nocache.or32: eth.o $(RESET_NOCACHE) $(SUPPORT) $(DRIVERS) $(LINKER_SCRIPT) |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $(GCC_LIB_OPTS) -T $(LINKER_SCRIPT) eth.o $(RESET_NOCACHE) $(SUPPORT) $(DRIVERS) -o $@ |
|
|
eth-icdc.hex: eth-icdc.bin |
$(BIN2HEX) $? 1 -size_word > $@ |
|
eth-icdc.bin: eth-icdc.or32 |
$(OR32_TOOL_PREFIX)-objcopy -O binary $? $@ |
|
eth-icdc.or32: eth.o $(RESET_ICDC) $(SUPPORT) $(DRIVERS) $(LINKER_SCRIPT) |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $(GCC_LIB_OPTS) -T $(LINKER_SCRIPT) eth.o $(RESET_ICDC) $(SUPPORT) $(DRIVERS) -o $@ |
|
|
eth.o: eth.c $(BOARD_HDR) $(SUPPORT_HDR) $(OR1200_HDR) $(UART_HDR) $(ETH_HDR) |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $< -c -o $@ |
eth/common.mk
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: uart/Makefile
===================================================================
--- uart/Makefile (revision 61)
+++ uart/Makefile (nonexistent)
@@ -1,24 +0,0 @@
-cases = uart-nocache uart-icdc
-common = ../support/except.o ../support/libsupport.a
-drivers = ../drivers/libdrivers.a
-
-all: $(cases)
-
-uart-nocache: uart.o ../support/reset-nocache.o $(common) $(drivers)
- $(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $(GCC_LIB_OPTS) -T ../support/orp.ld $? -o $@.or32
- $(OR32_TOOL_PREFIX)-objcopy -O binary $@.or32 $@.bin
- ../utils/bin2hex $@.bin 1 -size_word > $@$(FLASH_MEM_HEX_FILE_SUFFIX).hex
- ../utils/bin2vmem $@.bin > $@.vmem
-
-
-uart-icdc: uart.o ../support/reset-icdc.o $(common) $(drivers)
- $(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $(GCC_LIB_OPTS) -T ../support/orp.ld $? -o $@.or32
- $(OR32_TOOL_PREFIX)-objcopy -O binary $@.or32 $@.bin
- ../utils/bin2hex $@.bin 1 -size_word > $@$(FLASH_MEM_HEX_FILE_SUFFIX).hex
- ../utils/bin2vmem $@.bin > $@.vmem
-
-
-uart.o: uart.c
- $(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $? -c -o $@
-
-include ../support/Makefile.inc
uart/Makefile
Property changes :
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: uart/uart.c
===================================================================
--- uart/uart.c (revision 61)
+++ uart/uart.c (revision 64)
@@ -1,5 +1,5 @@
+#include "../../backend/board.h"
#include "../support/support.h"
-#include "../support/board.h"
#include "../support/or1200.h"
#include "../drivers/uart.h"
/uart/common.mk
0,0 → 1,23
|
uart-nocache.hex: uart-nocache.bin |
$(BIN2HEX) $? 1 -size_word > $@ |
|
uart-nocache.bin: uart-nocache.or32 |
$(OR32_TOOL_PREFIX)-objcopy -O binary $? $@ |
|
uart-nocache.or32: uart.o $(RESET_NOCACHE) $(SUPPORT) $(DRIVERS) $(LINKER_SCRIPT) |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $(GCC_LIB_OPTS) -T $(LINKER_SCRIPT) uart.o $(RESET_NOCACHE) $(SUPPORT) $(DRIVERS) -o $@ |
|
|
uart-icdc.hex: uart-icdc.bin |
$(BIN2HEX) $? 1 -size_word > $@ |
|
uart-icdc.bin: uart-icdc.or32 |
$(OR32_TOOL_PREFIX)-objcopy -O binary $? $@ |
|
uart-icdc.or32: uart.o $(RESET_ICDC) $(SUPPORT) $(DRIVERS) $(LINKER_SCRIPT) |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $(GCC_LIB_OPTS) -T $(LINKER_SCRIPT) uart.o $(RESET_ICDC) $(SUPPORT) $(DRIVERS) -o $@ |
|
|
uart.o: uart.c $(BOARD_HDR) $(SUPPORT_HDR) $(OR1200_HDR) $(UART_HDR) $(ETH_HDR) |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $< -c -o $@ |
uart/common.mk
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: support/orp.ld
===================================================================
--- support/orp.ld (revision 61)
+++ support/orp.ld (nonexistent)
@@ -1,69 +0,0 @@
-/*
-MEMORY
- {
- vectors : ORIGIN = 0x00000000, LENGTH = 0x00002000
- flash : ORIGIN = 0x04000000, LENGTH = 0x00200000
- ram : ORIGIN = 0x00002000, LENGTH = 0x001fe000
- icm : ORIGIN = 0x00800000, LENGTH = 0x00004000
- }
- */
-MEMORY
- {
- reset : ORIGIN = 0x00000000, LENGTH = 0x00000200
- vectors : ORIGIN = 0x00000200, LENGTH = 0x00001000
- ram : ORIGIN = 0x00001200, LENGTH = 0x00006E00 /*0x8000 total*/
- }
-
-SECTIONS
-{
- .reset :
- {
- *(.reset)
- } > reset
-
-
-
- .vectors :
- {
- _vec_start = .;
- *(.vectors)
- _vec_end = .;
- } > vectors
-
- .text :
- {
- *(.text)
- } > ram
-
- .rodata :
- {
- *(.rodata)
- *(.rodata.*)
- } > ram
-
- .icm :
- {
- _icm_start = .;
- *(.icm)
- _icm_end = .;
- } > ram
-
- .data :
- {
- _dst_beg = .;
- *(.data)
- _dst_end = .;
- } > ram
-
- .bss :
- {
- *(.bss)
- } > ram
-
- .stack (NOLOAD) :
- {
- *(.stack)
- _src_addr = .;
- } > ram
-
-}
support/orp.ld
Property changes :
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: support/board.h
===================================================================
--- support/board.h (revision 61)
+++ support/board.h (nonexistent)
@@ -1,40 +0,0 @@
-#ifndef _BOARD_H_
-#define _BOARD_H_
-
-#define MC_ENABLED 0
-
-#define IC_ENABLE 0
-#define IC_SIZE 8192
-#define DC_ENABLE 0
-#define DC_SIZE 8192
-
-
-#define IN_CLK 25000000
-
-
-#define STACK_SIZE 0x01000
-
-#define UART_BAUD_RATE 115200
-
-#define UART_BASE 0x90000000
-#define UART_IRQ 2
-#define ETH_BASE 0x92000000
-#define ETH_IRQ 4
-#define I2C_BASE 0x9D000000
-#define I2C_IRQ 3
-#define CAN_BASE 0x94000000
-#define CAN_IRQ 5
-
-#define MC_BASE_ADDR 0x60000000
-#define SPI_BASE 0xa0000000
-
-#define ETH_DATA_BASE 0xa8000000 /* Address for ETH_DATA */
-
-#define ETH_MACADDR0 0x00
-#define ETH_MACADDR1 0x12
-#define ETH_MACADDR2 0x34
-#define ETH_MACADDR3 0x56
-#define ETH_MACADDR4 0x78
-#define ETH_MACADDR5 0x9a
-
-#endif
support/board.h
Property changes :
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: support/reset.S
===================================================================
--- support/reset.S (revision 61)
+++ support/reset.S (revision 64)
@@ -1,6 +1,6 @@
/* Support file for c based tests */
#include "or1200.h"
-#include "board.h"
+#include "../../backend/board.h"
.section .stack
.space STACK_SIZE
/support/Makefile.inc
1,20 → 1,42
# File to be included in all makefiles |
|
ROOTDIR = .. |
|
BACKEND_DIR := $(ROOTDIR)/../backend |
SUPPORT_DIR := $(ROOTDIR)/support |
DRIVERS_DIR := $(ROOTDIR)/drivers |
UTILS_DIR := $(ROOTDIR)/utils |
|
OR1200_HDR := $(SUPPORT_DIR)/or1200.h |
BOARD_HDR := $(BACKEND_DIR)/board.h |
SUPPORT_HDR := $(SUPPORT_DIR)/support.h |
UART_HDR := $(DRIVERS_DIR)/uart.h |
ETH_HDR := $(DRIVERS_DIR)/eth.h |
|
RESET_NOCACHE := $(SUPPORT_DIR)/reset-nocache.o |
RESET_ICDC := $(SUPPORT_DIR)/reset-icdc.o |
|
EXCPT_HNDLR := $(SUPPORT_DIR)/except.o |
LIB_SUPPORT := $(SUPPORT_DIR)/libsupport.a |
|
SUPPORT := $(EXCPT_HNDLR) $(LIB_SUPPORT) |
DRIVERS := $(DRIVERS_DIR)/libdrivers.a |
|
LINKER_SCRIPT := $(BACKEND_DIR)/orp.ld |
|
OR32_TOOL_PREFIX=or32-elf |
|
#GCC_LIB_OPTS= -lgcc -liberty |
GCC_OPT=-mhard-mul -mhard-div -g -nostdlib |
|
GCC_OPT=-mhard-mul -g -nostdlib |
BIN2HEX = $(UTILS_DIR)/bin2hex |
|
ifdef UART_PRINTF |
GCC_OPT += -DUART_PRINTF |
endif |
|
FLASH_MEM_HEX_FILE_SUFFIX=-twobyte-sizefirst |
SRAM_MEM_HEX_FILE_SUFFIX=-fourbyte |
all: all_internal |
|
|
# Global clean rule |
clean: |
@echo "Cleaning `pwd`" |
@rm -f *.o *.or32 *.log *.bin *.srec *.hex *.log stdout.txt *.vmem *.asm *.a stdout.txt |
@rm -f *.o *.or32 *.log *.bin *.srec *.hex *.log stdout.txt *.vmem *.asm *.a stdout.txt |
/support/tick.c
1,5 → 1,5
#include "../support/or1200.h" |
#include "../support/support.h" |
#include "or1200.h" |
#include "support.h" |
#include "tick.h" |
|
int tick_int; |
/support/Makefile
1,31 → 1,5
all: libsupport.a reset-nocache.o reset-ic.o reset-dc.o reset-icdc.o except.o |
include Makefile.inc |
|
libsupport.a: support.o tick.o int.o |
$(OR32_TOOL_PREFIX)-ar cru libsupport.a support.o tick.o int.o |
$(OR32_TOOL_PREFIX)-ranlib libsupport.a |
all_internal: $(RESET_NOCACHE) $(RESET_ICDC) $(EXCPT_HNDLR) $(LIB_SUPPORT) |
|
support.o: support.c |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) -c -o $@ $? |
|
reset-nocache.o: reset.S |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) -c -DIC=0 -DDC=0 -o $@ $? |
|
reset-dc.o: reset.S |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) -c -DIC=0 -DDC=1 -o $@ $? |
|
reset-ic.o: reset.S |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) -c -DIC=1 -DDC=0 -o $@ $? |
|
reset-icdc.o: reset.S |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) -c -DIC=1 -DDC=1 -o $@ $? |
|
except.o: except.S |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) -c -o $@ $? |
|
int.o: int.c |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) -c -o $@ $? |
|
tick.o: tick.c |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) -c -o $@ $? |
|
include Makefile.inc |
include common.mk |
support/Makefile
Property changes :
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: support/common.mk
===================================================================
--- support/common.mk (nonexistent)
+++ support/common.mk (revision 64)
@@ -0,0 +1,21 @@
+$(LIB_SUPPORT): $(SUPPORT_DIR)/support.o $(SUPPORT_DIR)/tick.o $(SUPPORT_DIR)/int.o
+ $(OR32_TOOL_PREFIX)-ar cru $(SUPPORT_DIR)/libsupport.a $(SUPPORT_DIR)/support.o $(SUPPORT_DIR)/tick.o $(SUPPORT_DIR)/int.o
+ $(OR32_TOOL_PREFIX)-ranlib $(SUPPORT_DIR)/libsupport.a
+
+$(SUPPORT_DIR)/support.o: $(SUPPORT_DIR)/support.c $(OR1200_HDR) $(SUPPORT_HDR) $(SUPPORT_DIR)/int.h $(UART_HDR)
+ $(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) -c -o $@ $<
+
+$(SUPPORT_DIR)/tick.o: $(SUPPORT_DIR)/tick.c $(OR1200_HDR) $(SUPPORT_HDR) $(SUPPORT_DIR)/tick.h
+ $(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) -c -o $@ $<
+
+$(SUPPORT_DIR)/int.o: $(SUPPORT_DIR)/int.c $(SUPPORT_HDR) $(OR1200_HDR) $(SUPPORT_DIR)/int.h
+ $(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) -c -o $@ $<
+
+$(EXCPT_HNDLR): $(SUPPORT_DIR)/except.S $(OR1200_HDR)
+ $(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) -c -o $@ $<
+
+$(RESET_NOCACHE): $(SUPPORT_DIR)/reset.S $(BOARD_HDR)
+ $(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) -c -DIC=0 -DDC=0 -o $@ $<
+
+$(RESET_ICDC): $(SUPPORT_DIR)/reset.S $(BOARD_HDR)
+ $(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) -c -DIC=1 -DDC=1 -o $@ $<
support/common.mk
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: drivers/Makefile
===================================================================
--- drivers/Makefile (revision 61)
+++ drivers/Makefile (nonexistent)
@@ -1,22 +0,0 @@
-all: libdrivers.a
-
-libdrivers.a: eth.o uart.o interrupts.o can.o i2c.o
- $(OR32_TOOL_PREFIX)-ar cru libdrivers.a eth.o uart.o interrupts.o can.o i2c.o
- $(OR32_TOOL_PREFIX)-ranlib libdrivers.a
-
-eth.o: eth.c
- $(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $? -c -o $@
-
-uart.o: uart.c
- $(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $? -c -o $@
-
-interrupts.o: interrupts.c
- $(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $? -c -o $@
-
-can.o: can.c
- $(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $? -c -o $@
-
-i2c.o: i2c.c
- $(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $? -c -o $@
-
-include ../support/Makefile.inc
Index: drivers/eth.c
===================================================================
--- drivers/eth.c (revision 61)
+++ drivers/eth.c (revision 64)
@@ -1,4 +1,4 @@
-#include "../support/board.h"
+#include "../../backend/board.h"
#include "../support/support.h"
#include "eth.h"
/drivers/can.c
1,4 → 1,4
#include "../support/board.h" |
#include "../../backend/board.h" |
#include "../support/support.h" |
#include "can.h" |
|
/drivers/uart.c
1,4 → 1,4
#include "../support/board.h" |
#include "../../backend/board.h" |
#include "../support/support.h" |
#include "uart.h" |
|
/drivers/i2c.c
1,4 → 1,4
#include "../support/board.h" |
#include "../../backend/board.h" |
#include "../support/support.h" |
#include "i2c.h" |
|
/drivers/common.mk
0,0 → 1,18
$(DRIVERS): $(DRIVERS_DIR)/interrupts.o $(DRIVERS_DIR)/eth.o $(DRIVERS_DIR)/uart.o $(DRIVERS_DIR)/can.o $(DRIVERS_DIR)/i2c.o |
$(OR32_TOOL_PREFIX)-ar cru $(DRIVERS_DIR)/libdrivers.a $(DRIVERS_DIR)/interrupts.o $(DRIVERS_DIR)/eth.o $(DRIVERS_DIR)/uart.o $(DRIVERS_DIR)/can.o $(DRIVERS_DIR)/i2c.o |
$(OR32_TOOL_PREFIX)-ranlib $(DRIVERS_DIR)/libdrivers.a |
|
$(DRIVERS_DIR)/interrupts.o: $(DRIVERS_DIR)/interrupts.c |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $? -c -o $@ |
|
$(DRIVERS_DIR)/eth.o: $(DRIVERS_DIR)/eth.c $(BOARD_HDR) $(SUPPORT_HDR) $(DRIVERS_DIR)/eth.h |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $< -c -o $@ |
|
$(DRIVERS_DIR)/uart.o: $(DRIVERS_DIR)/uart.c $(BOARD_HDR) $(SUPPORT_HDR) $(DRIVERS_DIR)/uart.h |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $< -c -o $@ |
|
$(DRIVERS_DIR)/can.o: $(DRIVERS_DIR)/can.c $(BOARD_HDR) $(SUPPORT_HDR) $(DRIVERS_DIR)/can.h |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $< -c -o $@ |
|
$(DRIVERS_DIR)/i2c.o: $(DRIVERS_DIR)/i2c.c $(BOARD_HDR) $(SUPPORT_HDR) $(DRIVERS_DIR)/i2c.h |
$(OR32_TOOL_PREFIX)-gcc $(GCC_OPT) $< -c -o $@ |