Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/misoc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 421fe08770b6
Choose a base ref
...
head repository: m-labs/misoc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: db111a6eb014
Choose a head ref
  • 2 commits
  • 9 files changed
  • 1 contributor

Commits on Nov 3, 2015

  1. Copy the full SHA
    c5dadf2 View commit details
  2. Copy the full SHA
    db111a6 View commit details
11 changes: 4 additions & 7 deletions misoc/software/bios/Makefile
Original file line number Diff line number Diff line change
@@ -5,9 +5,6 @@ OBJECTS=isr.o sdram.o main.o boot-helper-$(CPU).o boot.o dataflow.o

all: bios.bin

# pull in dependency info for *existing* .o files
-include $(OBJECTS:.o=.d)

%.bin: %.elf
$(OBJCOPY) -O binary $< $@
chmod -x $@
@@ -26,15 +23,15 @@ bios.elf: $(BIOS_DIRECTORY)/linker.ld $(OBJECTS)
chmod -x $@

main.o: $(BIOS_DIRECTORY)/main.c
$(compile-dep)
$(compile)

%.o: $(BIOS_DIRECTORY)/%.c
$(compile-dep)
$(compile)

%.o: $(BIOS_DIRECTORY)/%.S
$(assemble)

clean:
$(RM) $(OBJECTS) $(OBJECTS:.o=.d) bios.elf bios.bin .*~ *~
$(RM) $(OBJECTS) bios.elf bios.bin .*~ *~

.PHONY: all main.o clean
.PHONY: all clean main.o
22 changes: 5 additions & 17 deletions misoc/software/common.mak
Original file line number Diff line number Diff line change
@@ -45,26 +45,14 @@ LDFLAGS = -nostdlib -nodefaultlibs -L$(BUILDINC_DIRECTORY)
# compile and generate dependencies, based on
# http://scottmcpeak.com/autodepend/autodepend.html

define compilexx-dep
$(CX) -c $(CXXFLAGS) $(1) $< -o $*.o
@$(CX_normal) -MM $(CXXFLAGS) $(1) $< > $*.d
@mv -f $*.d $*.d.tmp
@sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
@sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \
sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
@rm -f $*.d.tmp
define compilexx
$(CX) -c $(CXXFLAGS) $(1) $< -o $@
endef

define compile-dep
$(CC) -c $(CFLAGS) $(1) $< -o $*.o
@$(CC_normal) -MM $(CFLAGS) $(1) $< > $*.d
@mv -f $*.d $*.d.tmp
@sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
@sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \
sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
@rm -f $*.d.tmp
define compile
$(CC) -c $(CFLAGS) $(1) $< -o $@
endef

define assemble
$(CC) -c $(CFLAGS) -o $*.o $<
$(CC) -c $(CFLAGS) -o $@ $<
endef
11 changes: 4 additions & 7 deletions misoc/software/libbase/Makefile
Original file line number Diff line number Diff line change
@@ -5,26 +5,23 @@ OBJECTS=exception.o libc.o errno.o crc16.o crc32.o console.o system.o id.o uart.

all: crt0-$(CPU).o libbase.a libbase-nofloat.a

# pull in dependency info for *existing* .o files
-include $(OBJECTS:.o=.d)

libbase.a: $(OBJECTS) vsnprintf.o
$(AR) crs libbase.a $(OBJECTS) vsnprintf.o

libbase-nofloat.a: $(OBJECTS) vsnprintf-nofloat.o
$(AR) crs libbase-nofloat.a $(OBJECTS) vsnprintf-nofloat.o

vsnprintf-nofloat.o: $(LIBBASE_DIRECTORY)/vsnprintf.c
$(call compile-dep,-DNO_FLOAT)
$(call compile,-DNO_FLOAT)

%.o: $(LIBBASE_DIRECTORY)/%.c
$(compile-dep)
$(compile)

%.o: $(LIBBASE_DIRECTORY)/%.S
$(assemble)

.PHONY: clean
.PHONY: all clean

clean:
$(RM) $(OBJECTS) $(OBJECTS:.o=.d) crt0-$(CPU).o vsnprintf.o vsnprintf.d vsnprintf-nofloat.o vsnprintf-nofloat.d
$(RM) $(OBJECTS) crt0-$(CPU).o vsnprintf.o vsnprintf-nofloat.o
$(RM) libbase.a libbase-nofloat.a .*~ *~
7 changes: 2 additions & 5 deletions misoc/software/libcompiler_rt/Makefile
Original file line number Diff line number Diff line change
@@ -9,16 +9,13 @@ OBJECTS=divsi3.o modsi3.o comparesf2.o comparedf2.o negsf2.o negdf2.o addsf3.o s

all: libcompiler_rt.a

# pull in dependency info for *existing* .o files
-include $(OBJECTS:.o=.d)

libcompiler_rt.a: $(OBJECTS)
$(AR) crs libcompiler_rt.a $(OBJECTS)

%.o: $(MISOC_DIRECTORY)/software/compiler_rt/lib/builtins/%.c
$(compile-dep)
$(compile)

.PHONY: clean
.PHONY: all clean

clean:
$(RM) $(OBJECTS) $(OBJECTS:.o=.ts) $(OBJECTS:.o=.d) libcompiler_rt.a .*~ *~
9 changes: 3 additions & 6 deletions misoc/software/libdyld/Makefile
Original file line number Diff line number Diff line change
@@ -14,16 +14,13 @@ OBJECTS=dyld.o

all: $(ALL_TARGET)

# pull in dependency info for *existing* .o files
-include $(OBJECTS:.o=.d)

libdyld.a: $(OBJECTS)
$(AR) crs libdyld.a $(OBJECTS)

%.o: $(LIBDYLD_DIRECTORY)/%.c
$(compile-dep)
$(compile)

.PHONY: clean
.PHONY: all clean

clean:
$(RM) $(OBJECTS) $(OBJECTS:.o=.d) libdyld.a .*~ *~
$(RM) $(OBJECTS) libdyld.a .*~ *~
9 changes: 3 additions & 6 deletions misoc/software/libnet/Makefile
Original file line number Diff line number Diff line change
@@ -5,19 +5,16 @@ OBJECTS=microudp.o tftp.o

all: libnet.a

# pull in dependency info for *existing* .o files
-include $(OBJECTS:.o=.d)

libnet.a: $(OBJECTS)
$(AR) crs libnet.a $(OBJECTS)

%.o: $(LIBNET_DIRECTORY)/%.c
$(compile-dep)
$(compile)

%.o: %.S
$(assemble)

.PHONY: clean
.PHONY: all clean

clean:
$(RM) $(OBJECTS) $(OBJECTS:.o=.ts) $(OBJECTS:.o=.d) libnet.a .*~ *~
$(RM) $(OBJECTS) libnet.a .*~ *~
9 changes: 3 additions & 6 deletions misoc/software/libunwind/Makefile
Original file line number Diff line number Diff line change
@@ -17,22 +17,19 @@ OBJECTS=UnwindRegistersSave.o UnwindRegistersRestore.o UnwindLevel1.o libunwind.

all: $(ALL_TARGET)

# pull in dependency info for *existing* .o files
-include $(OBJECTS:.o=.d)

libunwind.a: $(OBJECTS)
$(AR) crs libunwind.a $(OBJECTS)

%.o: $(MISOC_DIRECTORY)/software/unwinder/src/%.cpp
$(compilexx-dep)
$(compilexx)

%.o: $(MISOC_DIRECTORY)/software/unwinder/src/%.c
$(compile-dep)
$(compile)

%.o: $(MISOC_DIRECTORY)/software/unwinder/src/%.S
$(assemble)

.PHONY: clean

clean:
$(RM) $(OBJECTS) $(OBJECTS:.o=.ts) $(OBJECTS:.o=.d) libunwind.a .*~ *~
$(RM) $(OBJECTS) libunwind.a .*~ *~
9 changes: 3 additions & 6 deletions misoc/software/memtest/Makefile
Original file line number Diff line number Diff line change
@@ -5,9 +5,6 @@ OBJECTS=isr.o main.o

all: memtest.bin

# pull in dependency info for *existing* .o files
-include $(OBJECTS:.o=.d)

%.bin: %.elf
$(OBJCOPY) -O binary $< $@
chmod -x $@
@@ -26,10 +23,10 @@ memtest.elf: $(OBJECTS) libs
chmod -x $@

main.o: main.c
$(compile-dep)
$(compile)

%.o: %.c
$(compile-dep)
$(compile)

%.o: %.S
$(assemble)
@@ -44,7 +41,7 @@ load: memtest.bin


clean:
$(RM) $(OBJECTS) $(OBJECTS:.o=.d) memtest.elf memtest.bin
$(RM) $(OBJECTS) memtest.elf memtest.bin
$(RM) .*~ *~

.PHONY: all main.o clean libs load
9 changes: 7 additions & 2 deletions misoc/targets/pipistrello.py
Original file line number Diff line number Diff line change
@@ -130,13 +130,18 @@ def __init__(self, clk_freq=(83 + Fraction(1, 3))*1000*1000, **kwargs):
self.flash_boot_address = 0x180000
self.register_rom(self.spiflash.bus, 0x1000000)


soc_pipistrello_args = soc_sdram_args
soc_pipistrello_argdict = soc_sdram_argdict


def main():
parser = argparse.ArgumentParser(description="MiSoC port to the Pipistrello")
builder_args(parser)
soc_sdram_args(parser)
soc_pipistrello_args(parser)
args = parser.parse_args()

soc = BaseSoC(**soc_sdram_argdict(args))
soc = BaseSoC(**soc_pipistrello_argdict(args))
builder = Builder(soc, **builder_argdict(args))
builder.build()