diff --git a/litex/soc/integration/builder.py b/litex/soc/integration/builder.py index ef7e45e6a..e625c5889 100644 --- a/litex/soc/integration/builder.py +++ b/litex/soc/integration/builder.py @@ -91,20 +91,6 @@ class Builder: for k, v in export.get_cpu_mak(self.soc.cpu, self.compile_software): define(k, v) - # Distinguish between LiteX and MiSoC. - define("LITEX", "1") - # Distinguish between applications running from main RAM and - # flash for user-provided software packages. - exec_profiles = { - "COPY_TO_MAIN_RAM" : "0", - "EXECUTE_IN_PLACE" : "0" - } - if "main_ram" in self.soc.mem_regions.keys(): - exec_profiles["COPY_TO_MAIN_RAM"] = "1" - else: - exec_profiles["EXECUTE_IN_PLACE"] = "1" - for k, v in exec_profiles.items(): - define(k, v) define( "COMPILER_RT_DIRECTORY", get_data_mod("software", "compiler_rt").data_location) diff --git a/litex/soc/software/bios/Makefile b/litex/soc/software/bios/Makefile index 35bff2374..778757da7 100755 --- a/litex/soc/software/bios/Makefile +++ b/litex/soc/software/bios/Makefile @@ -58,7 +58,7 @@ endif bios.elf: $(BIOS_DIRECTORY)/linker.ld $(OBJECTS) -%.elf: ../libbase/crt0-ctr.o \ +%.elf: ../libbase/crt0.o \ ../libcompiler_rt/libcompiler_rt.a \ ../libbase/libbase-nofloat.a \ ../liblitedram/liblitedram.a \ @@ -66,7 +66,7 @@ bios.elf: $(BIOS_DIRECTORY)/linker.ld $(OBJECTS) ../liblitespi/liblitespi.a \ ../liblitesdcard/liblitesdcard.a $(LD) $(LDFLAGS) -T $(BIOS_DIRECTORY)/linker.ld -N -o $@ \ - ../libbase/crt0-ctr.o \ + ../libbase/crt0.o \ $(OBJECTS) \ -L../libcompiler_rt \ -L../libbase \ diff --git a/litex/soc/software/libbase/Makefile b/litex/soc/software/libbase/Makefile index 5974e0007..1094ac573 100755 --- a/litex/soc/software/libbase/Makefile +++ b/litex/soc/software/libbase/Makefile @@ -1,11 +1,25 @@ include ../include/generated/variables.mak include $(SOC_DIRECTORY)/software/common.mak -OBJECTS = exception.o libc.o errno.o crc16.o crc32.o console.o \ - system.o id.o uart.o time.o qsort.o strtod.o spiflash.o strcasecmp.o i2c.o \ - div64.o progress.o +OBJECTS = exception.o \ + libc.o \ + errno.o \ + crc16.o \ + crc32.o \ + console.o \ + system.o \ + id.o \ + uart.o \ + time.o \ + qsort.o \ + strtod.o \ + spiflash.o \ + strcasecmp.o \ + i2c.o \ + div64.o \ + progress.o -all: crt0-ctr.o crt0-xip.o libbase.a libbase-nofloat.a +all: crt0.o libbase.a libbase-nofloat.a libbase.a: $(OBJECTS) vsnprintf.o $(AR) crs libbase.a $(OBJECTS) vsnprintf.o @@ -25,14 +39,11 @@ vsnprintf-nofloat.o: $(LIBBASE_DIRECTORY)/vsnprintf.c %.o: $(LIBBASE_DIRECTORY)/%.S $(assemble) -crt0-ctr.o: $(CPU_DIRECTORY)/crt0.S +crt0.o: $(CPU_DIRECTORY)/crt0.S $(assemble) -crt0-xip.o: $(CPU_DIRECTORY)/crt0.S - $(CC) -c -DEXECUTE_IN_PLACE $(CFLAGS) -o $@ $< - .PHONY: all clean clean: - $(RM) $(OBJECTS) crt0-$(CPU).o crt0-$(CPU)-flash.o vsnprintf.o vsnprintf-nofloat.o + $(RM) $(OBJECTS) crt0.o vsnprintf.o vsnprintf-nofloat.o $(RM) libbase.a libbase-nofloat.a .*~ *~