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 \
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
%.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