Switch to toolchain version 10.3 (2021-07).

Use nano version of libc.
Remove Gnu format of size command for compatibility with older toolchain version.
Strip unnecessary spaces at end of line.
This commit is contained in:
Renaud 2021-09-28 10:07:06 +08:00
parent 9617178f41
commit dbefe44d5c
1 changed files with 8 additions and 6 deletions

View File

@ -7,7 +7,8 @@ ifeq (linux, $(findstring linux, $(MAKE_HOST)))
INSTALLDIR = $(HOME)/Packages INSTALLDIR = $(HOME)/Packages
#REVDIR = gcc-arm-none-eabi-9-2019-q4-major #REVDIR = gcc-arm-none-eabi-9-2019-q4-major
#REVDIR = gcc-arm-none-eabi-9-2020-q2-update #REVDIR = gcc-arm-none-eabi-9-2020-q2-update
REVDIR = gcc-arm-none-eabi-10-2020-q4-major #REVDIR = gcc-arm-none-eabi-10-2020-q4-major
REVDIR = gcc-arm-none-eabi-10.3-2021.07
else else
DRIVE = d DRIVE = d
ifeq (cygwin, $(findstring cygwin, $(MAKE_HOST))) ifeq (cygwin, $(findstring cygwin, $(MAKE_HOST)))
@ -24,7 +25,8 @@ endif
#REVDIR = GNU Tools ARM Embedded/7 2018-q2-update #REVDIR = GNU Tools ARM Embedded/7 2018-q2-update
#REVDIR = GNU Tools ARM Embedded/9 2019-q4-major #REVDIR = GNU Tools ARM Embedded/9 2019-q4-major
#REVDIR = GNU Arm Embedded Toolchain/9 2020-q2-update #REVDIR = GNU Arm Embedded Toolchain/9 2020-q2-update
REVDIR = GNU Arm Embedded Toolchain/10 2020-q4-major #REVDIR = GNU Arm Embedded Toolchain/10 2020-q4-major
REVDIR = GNU Arm Embedded Toolchain/10 2021.07
endif endif
GCCDIR = $(INSTALLDIR)/$(REVDIR) GCCDIR = $(INSTALLDIR)/$(REVDIR)
@ -106,9 +108,9 @@ CRC32SIGN := 1
#SRCS = startup.ram.c txeie.c uptime.1.c #SRCS = startup.ram.c txeie.c uptime.1.c
SRCS = startup.crc.c txeie.c uptime.1.c SRCS = startup.crc.c txeie.c uptime.1.c
OBJS = $(SRCS:.c=.o) OBJS = $(SRCS:.c=.o)
LIBOBJS = printf.o putchar.o puts.o memset.o memcpy.o LIBOBJS = printf.o putchar.o puts.o # memset.o memcpy.o
CPU = -mthumb -mcpu=cortex-m0 CPU = -mthumb -mcpu=cortex-m0 --specs=nano.specs
ifdef RAMISRV ifdef RAMISRV
CDEFINES = -DRAMISRV=$(RAMISRV) CDEFINES = -DRAMISRV=$(RAMISRV)
endif endif
@ -153,7 +155,7 @@ cstartup.elf: cstartup.o
%.elf: %.elf:
@echo $@ @echo $@
$(CC) $(CPU) -T$(LD_SCRIPT) $(LDFLAGS) -nostartfiles -o $@ $+ $(CC) $(CPU) -T$(LD_SCRIPT) $(LDFLAGS) -nostartfiles -o $@ $+
$(SIZE) -G $@ $(SIZE) $@
$(OBJDUMP) -hS $@ > $(subst .elf,.lst,$@) $(OBJDUMP) -hS $@ > $(subst .elf,.lst,$@)
%.bin: %.elf %.bin: %.elf
@ -169,7 +171,7 @@ ifdef CRC32SIGN
%.hex: %.$(BINLOC).bin %.hex: %.$(BINLOC).bin
@echo $@ @echo $@
$(OBJCOPY) --change-address=$(BINLOC) -I binary -O ihex $< $@ $(OBJCOPY) --change-address=$(BINLOC) -I binary -O ihex $< $@
endif endif
%.hex: %.elf %.hex: %.elf