From: William D. Jones Date: Mon, 24 Sep 2018 18:48:54 +0000 (-0400) Subject: Distinguish crt0 variants more clearly, update BIOS to use CTR variant (as it has... X-Git-Tag: 24jan2021_ls180~1578^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ff6d586057623daaa96d7cb312063d093bcf5f8;p=litex.git Distinguish crt0 variants more clearly, update BIOS to use CTR variant (as it has no .data section). --- diff --git a/litex/soc/software/bios/Makefile b/litex/soc/software/bios/Makefile old mode 100644 new mode 100755 index 14e44920..534c09db --- a/litex/soc/software/bios/Makefile +++ b/litex/soc/software/bios/Makefile @@ -23,9 +23,9 @@ endif bios.elf: $(BIOS_DIRECTORY)/linker.ld $(OBJECTS) -%.elf: ../libbase/crt0-$(CPU).o ../libnet/libnet.a ../libbase/libbase-nofloat.a ../libcompiler_rt/libcompiler_rt.a +%.elf: ../libbase/crt0-$(CPU)-ctr.o ../libnet/libnet.a ../libbase/libbase-nofloat.a ../libcompiler_rt/libcompiler_rt.a $(LD) $(LDFLAGS) -T $(BIOS_DIRECTORY)/linker.ld -N -o $@ \ - ../libbase/crt0-$(CPU).o \ + ../libbase/crt0-$(CPU)-ctr.o \ $(OBJECTS) \ -L../libnet \ -L../libbase \ diff --git a/litex/soc/software/libbase/Makefile b/litex/soc/software/libbase/Makefile old mode 100644 new mode 100755 index bf876204..a5f73640 --- a/litex/soc/software/libbase/Makefile +++ b/litex/soc/software/libbase/Makefile @@ -4,7 +4,7 @@ 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 -all: crt0-$(CPU).o crt0-$(CPU)-flash.o libbase.a libbase-nofloat.a +all: crt0-$(CPU)-ctr.o crt0-$(CPU)-xip.o libbase.a libbase-nofloat.a libbase.a: $(OBJECTS) vsnprintf.o $(AR) crs libbase.a $(OBJECTS) vsnprintf.o @@ -24,8 +24,11 @@ vsnprintf-nofloat.o: $(LIBBASE_DIRECTORY)/vsnprintf.c %.o: $(LIBBASE_DIRECTORY)/%.S $(assemble) -crt0-$(CPU)-flash.o: $(LIBBASE_DIRECTORY)/crt0-$(CPU).S - $(CC) -c -DFLASH_DATA_SECTION $(CFLAGS) -o $@ $< +crt0-$(CPU)-ctr.o: $(LIBBASE_DIRECTORY)/crt0-$(CPU).S + $(assemble) + +crt0-$(CPU)-xip.o: $(LIBBASE_DIRECTORY)/crt0-$(CPU).S + $(CC) -c -DEXECUTE_IN_PLACE $(CFLAGS) -o $@ $< .PHONY: all clean diff --git a/litex/soc/software/libbase/crt0-lm32.S b/litex/soc/software/libbase/crt0-lm32.S old mode 100644 new mode 100755 index 3b65ba9f..50319e8c --- a/litex/soc/software/libbase/crt0-lm32.S +++ b/litex/soc/software/libbase/crt0-lm32.S @@ -112,7 +112,7 @@ _crt0: mvhi sp, hi(_fstack) ori sp, sp, lo(_fstack) -#ifdef FLASH_DATA_SECTION +#ifdef EXECUTE_IN_PLACE /* Load DATA */ mvhi r1, hi(_erodata) ori r1, r1, lo(_erodata)