OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /eco32/trunk
    from Rev 93 to Rev 94
    Reverse comparison

Rev 93 → Rev 94

/stdalone/hello/hello.s
3,23 → 3,23
;
 
.set tba,0xF0300000 ; terminal base address
.set tos,0xC0010000 ; top of stack
.set tos,0xC0020000 ; top of stack
 
; get some addresses listed in the load map
.export reset
.export start
.export main
.export out
.export hello
 
; minimal execution environment
reset:
start:
add $29,$0,tos ; setup stack
jal start ; do useful work
reset1:
j reset1 ; halt by looping
jal main ; do useful work
start1:
j start1 ; halt by looping
 
; main program
start:
main:
sub $29,$29,8 ; create stack frame
stw $31,$29,0 ; save return register
stw $16,$29,4 ; save register variable
/stdalone/hello/Makefile
8,21 → 8,26
OBJ = hello.o
BIN = hello.bin
MAP = hello.map
EXO = hello.exo
 
.PHONY: all install run clean
 
all: $(BIN)
all: $(BIN) $(EXO)
 
install: $(BIN)
install: $(BIN) $(EXO)
mkdir -p $(BUILD)/stdalone
cp $(BIN) $(BUILD)/stdalone
cp $(MAP) $(BUILD)/stdalone
cp $(EXO) $(BUILD)/stdalone
 
run: $(BIN)
$(BUILD)/bin/sim -i -t 1 -l $(BIN)
$(BUILD)/bin/sim -i -t 1 -l $(BIN) -a 0x10000
 
$(EXO): $(BIN)
$(BUILD)/bin/bin2exo -S2 0x10000 $(BIN) $(EXO)
 
$(BIN): $(OBJ)
$(BUILD)/bin/ld -h -rc 0xC0000000 \
$(BUILD)/bin/ld -h -rc 0xC0010000 \
-m $(MAP) -o $(BIN) $(OBJ)
 
$(OBJ): $(SRC)
29,4 → 34,4
$(BUILD)/bin/as -o $(OBJ) $(SRC)
 
clean:
rm -f *~ $(OBJ) $(BIN) $(MAP)
rm -f *~ $(OBJ) $(BIN) $(MAP) $(EXO)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.