mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
Distinguish crt0 variants more clearly, update BIOS to use CTR variant (as it has no .data section).
This commit is contained in:
parent
8106008184
commit
0ff6d58605
3 changed files with 9 additions and 6 deletions
4
litex/soc/software/bios/Makefile
Normal file → Executable file
4
litex/soc/software/bios/Makefile
Normal file → Executable file
|
@ -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 \
|
||||
|
|
9
litex/soc/software/libbase/Makefile
Normal file → Executable file
9
litex/soc/software/libbase/Makefile
Normal file → Executable file
|
@ -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
|
||||
|
||||
|
|
2
litex/soc/software/libbase/crt0-lm32.S
Normal file → Executable file
2
litex/soc/software/libbase/crt0-lm32.S
Normal file → Executable file
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue