Distinguish crt0 variants more clearly, update BIOS to use CTR variant (as it has...
authorWilliam D. Jones <thor0505@comcast.net>
Mon, 24 Sep 2018 18:48:54 +0000 (14:48 -0400)
committerWilliam D. Jones <thor0505@comcast.net>
Mon, 24 Sep 2018 18:48:54 +0000 (14:48 -0400)
litex/soc/software/bios/Makefile [changed mode: 0644->0755]
litex/soc/software/libbase/Makefile [changed mode: 0644->0755]
litex/soc/software/libbase/crt0-lm32.S [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 14e4492..534c09d
@@ -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 \
old mode 100644 (file)
new mode 100755 (executable)
index bf87620..a5f7364
@@ -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
 
old mode 100644 (file)
new mode 100755 (executable)
index 3b65ba9..50319e8
@@ -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)