demo: fix BRAM initialization byte order

parent 3837445d
...@@ -369,10 +369,10 @@ lm32_top cpu( ...@@ -369,10 +369,10 @@ lm32_top cpu(
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
bram #( bram #(
.adr_width(14), .adr_width(14),
.init0("../../../software/bios/bios.h1"), .init0("../../../software/bios/bios.h0"),
.init1("../../../software/bios/bios.h2"), .init1("../../../software/bios/bios.h1"),
.init2("../../../software/bios/bios.h3"), .init2("../../../software/bios/bios.h2"),
.init3("../../../software/bios/bios.h4") .init3("../../../software/bios/bios.h3")
) bram ( ) bram (
.sys_clk(sys_clk), .sys_clk(sys_clk),
.sys_rst(sys_rst), .sys_rst(sys_rst),
......
...@@ -4,19 +4,19 @@ include $(MMDIR)/software/include.mak ...@@ -4,19 +4,19 @@ include $(MMDIR)/software/include.mak
OBJECTS=crt0.o main.o boot.o OBJECTS=crt0.o main.o boot.o
SEGMENTS=-j .text -j .data -j .rodata SEGMENTS=-j .text -j .data -j .rodata
all: bios.bin bios.h1 bios.h2 bios.h3 bios.h4 all: bios.bin bios.h0 bios.h1 bios.h2 bios.h3
bios.h0: bios.bin
$(MMDIR)/tools/bin2hex $< $@ 4096 4
bios.h1: bios.bin bios.h1: bios.bin
$(MMDIR)/tools/bin2hex $< $@ 4096 1 $(MMDIR)/tools/bin2hex $< $@ 4096 3
bios.h2: bios.bin bios.h2: bios.bin
$(MMDIR)/tools/bin2hex $< $@ 4096 2 $(MMDIR)/tools/bin2hex $< $@ 4096 2
bios.h3: bios.bin bios.h3: bios.bin
$(MMDIR)/tools/bin2hex $< $@ 4096 3 $(MMDIR)/tools/bin2hex $< $@ 4096 1
bios.h4: bios.bin
$(MMDIR)/tools/bin2hex $< $@ 4096 4
%.bin: %.elf %.bin: %.elf
$(OBJCOPY) $(SEGMENTS) -O binary $< $@ $(OBJCOPY) $(SEGMENTS) -O binary $< $@
...@@ -33,7 +33,7 @@ depend: ...@@ -33,7 +33,7 @@ depend:
makedepend -Y -- $(CFLAGS) -- *.c makedepend -Y -- $(CFLAGS) -- *.c
clean: clean:
rm -f *.o bios.elf bios.bin bios.h1 bios.h2 bios.h3 bios.h4 .*~ *~ Makefile.bak rm -f *.o bios.elf bios.bin bios.h0 bios.h1 bios.h2 bios.h3 .*~ *~ Makefile.bak
# DO NOT DELETE # DO NOT DELETE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment