mirror of
https://github.com/esp8266/Arduino.git
synced 2025-09-11 05:52:31 +03:00
* Upgrade to upstream newlib 4.0.0 release Includes 64 bit time_t and 5 years of updates. Binary incompatible with libraries which use time_t (due to the size difference). Recompiling with the new newlib should be sufficient for most libraries, assuming source is available. * Remove tools/sdk/libc directory, it isn't used anywhere Somewhere along the line the copy of libc in tools/sdl/libc was taken out of the build process. Files in there are not used, take add'l time to build and install on a toolchain release, and just cause confusion. Remove them. * Fix 64-bit time for LittleFS The core was setting 64-bit times automatically on new file creation or updates, but would fail when attempting to read them back due to 64/32b confusion. Now attempt to read 64b time, and if that fails fallback to reading 32b time to allow both old and new FS to preserve timestamps. * Update to jjsuwa-sys3175 additions to GCC and newlib @jjsuwa-sys3175 contributed multiple patches to GCC, included in the toolchain, as well as a slightly faster pgm_read_byte() macro. * Rebuild w/addl GCC patches, new BearSSL flags * Remove copied libgcc.a file, is contained in toolchain
63 lines
1.7 KiB
Makefile
63 lines
1.7 KiB
Makefile
XTENSA_TOOLCHAIN ?= ../../tools/xtensa-lx106-elf/bin/
|
|
ESPTOOL ?= ../../tools/esptool/esptool
|
|
|
|
BIN_DIR := ./
|
|
TARGET_DIR := ./
|
|
|
|
TARGET_OBJ_FILES := \
|
|
eboot.o \
|
|
eboot_command.o
|
|
|
|
TARGET_OBJ_PATHS := $(addprefix $(TARGET_DIR)/,$(TARGET_OBJ_FILES))
|
|
|
|
UZLIB_PATH := ../../tools/sdk/uzlib/src
|
|
UZLIB_FLAGS := -DRUNTIME_BITS_TABLES
|
|
|
|
CC := $(XTENSA_TOOLCHAIN)xtensa-lx106-elf-gcc
|
|
CXX := $(XTENSA_TOOLCHAIN)xtensa-lx106-elf-g++
|
|
AR := $(XTENSA_TOOLCHAIN)xtensa-lx106-elf-ar
|
|
LD := $(XTENSA_TOOLCHAIN)xtensa-lx106-elf-gcc
|
|
OBJDUMP := $(XTENSA_TOOLCHAIN)xtensa-lx106-elf-objdump
|
|
|
|
INC += -I../../tools/sdk/include -I../../tools/sdk/uzlib/src
|
|
|
|
CFLAGS += -std=gnu99
|
|
|
|
CFLAGS += -Os -fcommon -g -Wall -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mno-text-section-literals -ffunction-sections -fdata-sections -free -fipa-pta
|
|
|
|
CFLAGS += $(INC)
|
|
|
|
CFLAGS += $(UZLIB_FLAGS)
|
|
|
|
LDFLAGS += -nostdlib -Wl,--no-check-sections -Wl,--gc-sections -umain -Wl,-Map,$(@:.elf=.map)
|
|
|
|
LD_SCRIPT := -Teboot.ld
|
|
|
|
APP_OUT := eboot.elf
|
|
APP_AR := eboot.a
|
|
APP_FW := eboot.bin
|
|
|
|
|
|
all: $(APP_OUT)
|
|
|
|
tinflate.o: $(UZLIB_PATH)/tinflate.c $(UZLIB_PATH)/uzlib.h $(UZLIB_PATH)/uzlib_conf.h
|
|
$(CC) $(CFLAGS) -c -o tinflate.o $(UZLIB_PATH)/tinflate.c
|
|
|
|
tinfgzip.o: $(UZLIB_PATH)/tinfgzip.c $(UZLIB_PATH)/uzlib.h $(UZLIB_PATH)/uzlib_conf.h
|
|
$(CC) $(CFLAGS) -c -o tinfgzip.o $(UZLIB_PATH)/tinfgzip.c
|
|
|
|
$(APP_AR): $(TARGET_OBJ_PATHS) tinflate.o tinfgzip.o
|
|
$(AR) cru $@ $^
|
|
|
|
$(APP_OUT): $(APP_AR) eboot.ld | Makefile
|
|
$(LD) $(LD_SCRIPT) $(LDFLAGS) -Wl,--start-group -Wl,--whole-archive $(APP_AR) -Wl,--end-group -o $@
|
|
|
|
clean:
|
|
rm -f *.o
|
|
rm -f $(APP_AR)
|
|
rm -f $(APP_OUT)
|
|
rm -f *.map
|
|
|
|
|
|
.PHONY: all clean default
|