Dev make cleanup (#2842)
This commit is contained in:
parent
f7a545b951
commit
98c2c0520d
24
Makefile
24
Makefile
|
@ -29,13 +29,14 @@ else
|
||||||
endif
|
endif
|
||||||
SDK_REL_DIR := sdk/esp_iot_sdk_v$(SDK_VER)
|
SDK_REL_DIR := sdk/esp_iot_sdk_v$(SDK_VER)
|
||||||
SDK_DIR := $(TOP_DIR)/$(SDK_REL_DIR)
|
SDK_DIR := $(TOP_DIR)/$(SDK_REL_DIR)
|
||||||
|
APP_DIR := $(TOP_DIR)/app
|
||||||
|
|
||||||
ESPTOOL_VER := 2.6
|
ESPTOOL_VER := 2.6
|
||||||
|
|
||||||
# Ensure that the Espresif SDK is searched before the tool-chain's SDK (if any)
|
# Ensure that the Espresif SDK is search before application paths and also prevent
|
||||||
# Also, prevent the SDK's c_types.h from being included from anywhere, by
|
# the SDK's c_types.h from being included from anywhere, by predefining its include-guard.
|
||||||
# predefining its include-guard.
|
|
||||||
CCFLAGS:= -I$(TOP_DIR)/sdk-overrides/include -I$(TOP_DIR)/app/include/lwip/app -I$(SDK_DIR)/include -D_C_TYPES_H_
|
CCFLAGS := $(CCFLAGS) -I $(PDIR)sdk-overrides/include -I $(SDK_DIR)/include -D_C_TYPES_H_
|
||||||
LDFLAGS := -L$(SDK_DIR)/lib -L$(SDK_DIR)/ld $(LDFLAGS)
|
LDFLAGS := -L$(SDK_DIR)/lib -L$(SDK_DIR)/ld $(LDFLAGS)
|
||||||
|
|
||||||
ifdef DEBUG
|
ifdef DEBUG
|
||||||
|
@ -221,7 +222,7 @@ CCFLAGS += \
|
||||||
-fno-inline-functions \
|
-fno-inline-functions \
|
||||||
-nostdlib \
|
-nostdlib \
|
||||||
-mlongcalls \
|
-mlongcalls \
|
||||||
-mtext-section-literals
|
-mtext-section-literals \
|
||||||
# -Wall
|
# -Wall
|
||||||
|
|
||||||
CFLAGS = $(CCFLAGS) $(DEFINES) $(EXTRA_CCFLAGS) $(STD_CFLAGS) $(INCLUDES)
|
CFLAGS = $(CCFLAGS) $(DEFINES) $(EXTRA_CCFLAGS) $(STD_CFLAGS) $(INCLUDES)
|
||||||
|
@ -370,7 +371,7 @@ flash1m-dout:
|
||||||
|
|
||||||
flashinternal:
|
flashinternal:
|
||||||
ifndef PDIR
|
ifndef PDIR
|
||||||
$(MAKE) -C ./app flashinternal
|
$(MAKE) -C $(APP_DIR) flashinternal
|
||||||
else
|
else
|
||||||
$(ESPTOOL) --port $(ESPPORT) --baud $(BAUDRATE) write_flash $(FLASHOPTIONS) 0x00000 $(FIRMWAREDIR)0x00000.bin 0x10000 $(FIRMWAREDIR)0x10000.bin
|
$(ESPTOOL) --port $(ESPPORT) --baud $(BAUDRATE) write_flash $(FLASHOPTIONS) 0x00000 $(FIRMWAREDIR)0x00000.bin 0x10000 $(FIRMWAREDIR)0x10000.bin
|
||||||
endif
|
endif
|
||||||
|
@ -395,20 +396,20 @@ spiffs-image-remove:
|
||||||
|
|
||||||
spiffs-image: bin/0x10000.bin
|
spiffs-image: bin/0x10000.bin
|
||||||
$(MAKE) -C tools
|
$(MAKE) -C tools
|
||||||
|
############ Note: this target needs moving into app/modules make ############
|
||||||
.PHONY: pre_build
|
.PHONY: pre_build
|
||||||
|
|
||||||
ifneq ($(wildcard $(TOP_DIR)/server-ca.crt),)
|
ifneq ($(wildcard $(TOP_DIR)/server-ca.crt),)
|
||||||
pre_build: $(TOP_DIR)/app/modules/server-ca.crt.h
|
pre_build: $(APP_DIR)/modules/server-ca.crt.h
|
||||||
|
|
||||||
$(TOP_DIR)/app/modules/server-ca.crt.h: $(TOP_DIR)/server-ca.crt
|
$(APP_DIR)/modules/server-ca.crt.h: $(TOP_DIR)/server-ca.crt
|
||||||
$(summary) MKCERT $(patsubst $(TOP_DIR)/%,%,$<)
|
$(summary) MKCERT $(patsubst $(TOP_DIR)/%,%,$<)
|
||||||
python $(TOP_DIR)/tools/make_server_cert.py $(TOP_DIR)/server-ca.crt > $(TOP_DIR)/app/modules/server-ca.crt.h
|
python $(TOP_DIR)/tools/make_server_cert.py $(TOP_DIR)/server-ca.crt > $(APP_DIR)/modules/server-ca.crt.h
|
||||||
|
|
||||||
DEFINES += -DHAVE_SSL_SERVER_CRT=\"server-ca.crt.h\"
|
DEFINES += -DHAVE_SSL_SERVER_CRT=\"server-ca.crt.h\"
|
||||||
else
|
else
|
||||||
pre_build:
|
pre_build:
|
||||||
@-rm -f $(TOP_DIR)/app/modules/server-ca.crt.h
|
@-rm -f $(APP_DIR)/modules/server-ca.crt.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef TARGET
|
ifdef TARGET
|
||||||
|
@ -484,6 +485,5 @@ endif # TARGET
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include -I $(PDIR)include/$(TARGET)
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
23
app/Makefile
23
app/Makefile
|
@ -15,8 +15,6 @@ TARGET = eagle
|
||||||
#FLAVOR = release
|
#FLAVOR = release
|
||||||
FLAVOR = debug
|
FLAVOR = debug
|
||||||
|
|
||||||
#EXTRA_CCFLAGS += -u
|
|
||||||
|
|
||||||
ifndef PDIR # {
|
ifndef PDIR # {
|
||||||
GEN_IMAGES= eagle.app.v6.out
|
GEN_IMAGES= eagle.app.v6.out
|
||||||
GEN_BINS= eagle.app.v6.bin
|
GEN_BINS= eagle.app.v6.bin
|
||||||
|
@ -83,7 +81,6 @@ COMPONENTS_eagle.app.v6 = \
|
||||||
uzlib/libuzlib.a \
|
uzlib/libuzlib.a \
|
||||||
$(OPT_SEL_COMPONENTS)
|
$(OPT_SEL_COMPONENTS)
|
||||||
|
|
||||||
|
|
||||||
# Inspect the modules library and work out which modules need to be linked.
|
# Inspect the modules library and work out which modules need to be linked.
|
||||||
# For each enabled module, a symbol name of the form XYZ_module_selected is
|
# For each enabled module, a symbol name of the form XYZ_module_selected is
|
||||||
# returned. At link time those names are declared undefined, so those (and
|
# returned. At link time those names are declared undefined, so those (and
|
||||||
|
@ -134,18 +131,7 @@ DEPENDS_eagle.app.v6 = \
|
||||||
|
|
||||||
#UNIVERSAL_TARGET_DEFINES = \
|
#UNIVERSAL_TARGET_DEFINES = \
|
||||||
|
|
||||||
# Other potential configuration flags include:
|
CONFIGURATION_DEFINES += -DLWIP_OPEN_SRC
|
||||||
# -DTXRX_TXBUF_DEBUG
|
|
||||||
# -DTXRX_RXBUF_DEBUG
|
|
||||||
# -DWLAN_CONFIG_CCX
|
|
||||||
CONFIGURATION_DEFINES = -D__ets__ \
|
|
||||||
-DICACHE_FLASH \
|
|
||||||
-DLWIP_OPEN_SRC \
|
|
||||||
-DPBUF_RSV_FOR_WLAN \
|
|
||||||
-DEBUF_LWIP \
|
|
||||||
-DUSE_OPTIMIZE_PRINTF \
|
|
||||||
-DMBEDTLS_USER_CONFIG_FILE=\"user_mbedtls.h\" \
|
|
||||||
-DMEM_DEFAULT_USE_DRAM
|
|
||||||
|
|
||||||
DEFINES += \
|
DEFINES += \
|
||||||
$(UNIVERSAL_TARGET_DEFINES) \
|
$(UNIVERSAL_TARGET_DEFINES) \
|
||||||
|
@ -155,7 +141,6 @@ DDEFINES += \
|
||||||
$(UNIVERSAL_TARGET_DEFINES) \
|
$(UNIVERSAL_TARGET_DEFINES) \
|
||||||
$(CONFIGURATION_DEFINES)
|
$(CONFIGURATION_DEFINES)
|
||||||
|
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# Recursion Magic - Don't touch this!!
|
# Recursion Magic - Don't touch this!!
|
||||||
#
|
#
|
||||||
|
@ -167,10 +152,10 @@ DDEFINES += \
|
||||||
#
|
#
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
INCLUDES := -I $(PDIR)libc -I $(PDIR)lua -I $(PDIR)platform \
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
$(INCLUDES) -I $(PDIR) -I $(PDIR)include
|
||||||
INCLUDES += -I ./
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
|
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
.PHONY: FORCE
|
.PHONY: FORCE
|
||||||
|
|
|
@ -36,10 +36,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
INCLUDES += -I ../lua
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -38,10 +38,6 @@ STD_CFLAGS=-std=gnu11 -Wimplicit
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
INCLUDES += -I ../platform
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -37,13 +37,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ./include
|
|
||||||
INCLUDES += -I ../include
|
|
||||||
INCLUDES += -I ../../include
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
INCLUDES += -I ../platform
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -38,9 +38,6 @@ STD_CFLAGS=-std=gnu11 -Wimplicit
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../platform
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES += -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../../include/ets
|
INCLUDES += -I ../../include/ets
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
|
@ -42,11 +42,6 @@ STD_CFLAGS=-std=gnu11 -Wimplicit -imacros $(FATFS_INC_DIR)fatfs_prefix_lib.h
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../platform
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
INCLUDES += -I ../lua
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -38,11 +38,6 @@ STD_CFLAGS=-std=gnu11 -Wimplicit
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ./include
|
|
||||||
INCLUDES += -I ../include
|
|
||||||
INCLUDES += -I ../../include
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -40,12 +40,6 @@ STD_CFLAGS=-std=gnu11 -Wimplicit
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../spiffs
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
INCLUDES += -I ../modules
|
|
||||||
INCLUDES += -I ../platform
|
|
||||||
INCLUDES += -I ../uzlib
|
INCLUDES += -I ../uzlib
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
|
@ -53,7 +53,7 @@ CC := $(WRAPCC) gcc
|
||||||
|
|
||||||
ECHO := echo
|
ECHO := echo
|
||||||
|
|
||||||
BUILD_TYPE := $(shell $(CC) $(EXTRA_CCFLAGS) -E -dM - <../../../app/include/user_config.h | grep LUA_NUMBER_INTEGRAL | wc -l)
|
BUILD_TYPE := $(shell $(CC) $(EXTRA_CCFLAGS) -E -dM - <../../include/user_config.h | grep LUA_NUMBER_INTEGRAL | wc -l)
|
||||||
ifeq ($(BUILD_TYPE),0)
|
ifeq ($(BUILD_TYPE),0)
|
||||||
IMAGE := ../../../luac.cross
|
IMAGE := ../../../luac.cross
|
||||||
else
|
else
|
||||||
|
|
|
@ -29,7 +29,11 @@ endif
|
||||||
# makefile at its root level - these are then overridden
|
# makefile at its root level - these are then overridden
|
||||||
# for a subtree within the makefile rooted therein
|
# for a subtree within the makefile rooted therein
|
||||||
#
|
#
|
||||||
#DEFINES +=
|
# Other potential configuration flags include:
|
||||||
|
# -DTXRX_TXBUF_DEBUG
|
||||||
|
# -DTXRX_RXBUF_DEBUG
|
||||||
|
# -DWLAN_CONFIG_CCX
|
||||||
|
CONFIGURATION_DEFINES += -DPBUF_RSV_FOR_WLAN -DEBUF_LWIP
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# Recursion Magic - Don't touch this!!
|
# Recursion Magic - Don't touch this!!
|
||||||
|
@ -43,8 +47,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,9 @@
|
||||||
ifndef PDIR
|
ifndef PDIR
|
||||||
UP_EXTRACT_DIR = ..
|
UP_EXTRACT_DIR = ..
|
||||||
GEN_LIBS = libmbedtls.a
|
GEN_LIBS = libmbedtls.a
|
||||||
COMPONENTS_libmbedtls = library/liblibrary.a platform/libplatform.a app/libapp.a
|
COMPONENTS_libmbedtls = library/liblibrary.a \
|
||||||
|
platform/libplatform.a \
|
||||||
|
app/libapp.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +28,7 @@ endif
|
||||||
# for a subtree within the makefile rooted therein
|
# for a subtree within the makefile rooted therein
|
||||||
#
|
#
|
||||||
DEFINES +=
|
DEFINES +=
|
||||||
#CCFLAGS += --rename-section .text=.irom0.text --rename-section .literal=.irom0.literal
|
CONFIGURATION_DEFINES += -DMBEDTLS_USER_CONFIG_FILE=\"user_mbedtls.h\"
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# Recursion Magic - Don't touch this!!
|
# Recursion Magic - Don't touch this!!
|
||||||
|
@ -40,8 +42,6 @@ DEFINES +=
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ STD_CFLAGS=-std=gnu11 -Wimplicit
|
||||||
# for a subtree within the makefile rooted therein
|
# for a subtree within the makefile rooted therein
|
||||||
#
|
#
|
||||||
#DEFINES +=
|
#DEFINES +=
|
||||||
|
CONFIGURATION_DEFINES += -DMBEDTLS_USER_CONFIG_FILE=\"user_mbedtls.h\"
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# Recursion Magic - Don't touch this!!
|
# Recursion Magic - Don't touch this!!
|
||||||
|
@ -38,25 +39,8 @@ STD_CFLAGS=-std=gnu11 -Wimplicit
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
INCLUDES += -I ../u8g2lib/u8g2/src/clib -I ../ucglib/ucg/src/clib
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
INCLUDES += -I ../coap
|
|
||||||
INCLUDES += -I ../mqtt
|
|
||||||
INCLUDES += -I ../u8g2lib/u8g2/src/clib
|
|
||||||
INCLUDES += -I ../ucglib/ucg/src/clib
|
|
||||||
INCLUDES += -I ../lua
|
|
||||||
INCLUDES += -I ../pcm
|
|
||||||
INCLUDES += -I ../platform
|
|
||||||
INCLUDES += -I ../spiffs
|
|
||||||
INCLUDES += -I ../smart
|
|
||||||
INCLUDES += -I ../dht
|
|
||||||
INCLUDES += -I ../fatfs
|
|
||||||
INCLUDES += -I ../http
|
|
||||||
INCLUDES += -I ../sjson
|
|
||||||
INCLUDES += -I ../websocket
|
|
||||||
INCLUDES += -I ../pm
|
|
||||||
INCLUDES += -I ../sqlite3
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -13,12 +13,12 @@
|
||||||
#include "espconn.h"
|
#include "espconn.h"
|
||||||
#include "driver/uart.h"
|
#include "driver/uart.h"
|
||||||
|
|
||||||
#include "coap.h"
|
#include "coap/coap.h"
|
||||||
#include "uri.h"
|
#include "coap/uri.h"
|
||||||
#include "node.h"
|
#include "coap/node.h"
|
||||||
#include "coap_timer.h"
|
#include "coap/coap_timer.h"
|
||||||
#include "coap_io.h"
|
#include "coap/coap_io.h"
|
||||||
#include "coap_server.h"
|
#include "coap/coap_server.h"
|
||||||
|
|
||||||
coap_queue_t *gQueue = NULL;
|
coap_queue_t *gQueue = NULL;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "lauxlib.h"
|
#include "lauxlib.h"
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "cpu_esp8266.h"
|
#include "cpu_esp8266.h"
|
||||||
#include "dht.h"
|
#include "dht/dht.h"
|
||||||
|
|
||||||
#define NUM_DHT GPIO_PIN_NUM
|
#define NUM_DHT GPIO_PIN_NUM
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "lauxlib.h"
|
#include "lauxlib.h"
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "cpu_esp8266.h"
|
#include "cpu_esp8266.h"
|
||||||
#include "httpclient.h"
|
#include "http/httpclient.h"
|
||||||
|
|
||||||
static int http_callback_registry = LUA_NOREF;
|
static int http_callback_registry = LUA_NOREF;
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
#include "lwip/ip_addr.h"
|
#include "lwip/ip_addr.h"
|
||||||
#include "espconn.h"
|
#include "espconn.h"
|
||||||
|
|
||||||
#include "mqtt_msg.h"
|
#include "mqtt/mqtt_msg.h"
|
||||||
#include "msg_queue.h"
|
#include "mqtt/msg_queue.h"
|
||||||
|
|
||||||
#include "user_interface.h"
|
#include "user_interface.h"
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "pcm.h"
|
#include "pcm/pcm.h"
|
||||||
#include "pcm_drv.h"
|
#include "pcm/pcm_drv.h"
|
||||||
|
|
||||||
|
|
||||||
#define GET_PUD() pud_t *pud = (pud_t *)luaL_checkudata(L, 1, "pcm.driver"); \
|
#define GET_PUD() pud_t *pud = (pud_t *)luaL_checkudata(L, 1, "pcm.driver"); \
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "json_config.h"
|
#include "sjson/json_config.h"
|
||||||
#include "jsonsl.h"
|
#include "sjson/jsonsl.h"
|
||||||
|
|
||||||
#define LUA_SJSONLIBNAME "sjson"
|
#define LUA_SJSONLIBNAME "sjson"
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "sqlite3.h"
|
#include "sqlite3/sqlite3.h"
|
||||||
|
|
||||||
/* compile time features */
|
/* compile time features */
|
||||||
#if !defined(SQLITE_OMIT_PROGRESS_CALLBACK)
|
#if !defined(SQLITE_OMIT_PROGRESS_CALLBACK)
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#include "websocketclient.h"
|
#include "websocket/websocketclient.h"
|
||||||
|
|
||||||
#define METATABLE_WSCLIENT "websocket.client"
|
#define METATABLE_WSCLIENT "websocket.client"
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifdef WIFI_SMART_ENABLE
|
#ifdef WIFI_SMART_ENABLE
|
||||||
#include "smart.h"
|
#include "smart/smart.h"
|
||||||
#include "smartconfig.h"
|
#include "smart/smartconfig.h"
|
||||||
|
|
||||||
static int wifi_smart_succeed = LUA_NOREF;
|
static int wifi_smart_succeed = LUA_NOREF;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "user_interface.h"
|
#include "user_interface.h"
|
||||||
#include "smart.h"
|
#include "smart/smart.h"
|
||||||
#include "smartconfig.h"
|
#include "smartconfig.h"
|
||||||
#include "user_config.h"
|
#include "user_config.h"
|
||||||
|
|
||||||
|
|
|
@ -38,9 +38,6 @@ STD_CFLAGS=-std=gnu11 -Wimplicit
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -38,10 +38,5 @@ STD_CFLAGS=-std=gnu11 -Wimplicit
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../lua
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
INCLUDES += -I ../platform
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
|
@ -38,13 +38,7 @@ STD_CFLAGS=-std=gnu11 -Wimplicit
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
INCLUDES += -I ../spiffs -I ../u8g2lib/u8g2/src/clib -I ../ucglib/ucg/src/clib
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../spiffs
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
INCLUDES += -I ../lua
|
|
||||||
INCLUDES += -I ../u8g2lib/u8g2/src/clib
|
|
||||||
INCLUDES += -I ../ucglib/ucg/src/clib
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -38,15 +38,6 @@ STD_CFLAGS=-std=gnu11 -Wimplicit
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ./include
|
|
||||||
INCLUDES += -I ../include
|
|
||||||
INCLUDES += -I ../../include
|
|
||||||
INCLUDES += -I ../lua
|
|
||||||
INCLUDES += -I ../platform
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -37,11 +37,6 @@ DEFINES += -include memcompat.h -include json_config.h
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ./include
|
|
||||||
INCLUDES += -I ../include
|
|
||||||
INCLUDES += -I ../../include
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,5 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
INCLUDES += -I ../platform
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
|
@ -38,9 +38,6 @@ STD_CFLAGS= -std=gnu11 -Wimplicit -Wno-undef -include config_ext.h
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
INCLUDES += -I .
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
INCLUDES += -I ../platform
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
|
@ -36,9 +36,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -38,13 +38,6 @@ STD_CFLAGS=-std=gnu11 -Wimplicit
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ./include
|
|
||||||
INCLUDES += -I ../include
|
|
||||||
INCLUDES += -I ../../include
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
INCLUDES += -I ../platform
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -40,11 +40,7 @@ DEFINES += -DU8X8_USE_PINS -DU8G2_USE_LARGE_FONTS -DU8X8_WITH_USER_PTR
|
||||||
|
|
||||||
CSRCS := $(wildcard u8g2/src/clib/*.c *.c)
|
CSRCS := $(wildcard u8g2/src/clib/*.c *.c)
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I u8g2/src/clib
|
INCLUDES += -I u8g2/src/clib
|
||||||
INCLUDES += -I ../libc
|
|
||||||
INCLUDES += -I ../lua
|
|
||||||
INCLUDES += -I ../platform
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -40,10 +40,7 @@ DEFINES += -DUSE_PIN_LIST
|
||||||
|
|
||||||
CSRCS := $(wildcard ucg/src/clib/*.c *.c)
|
CSRCS := $(wildcard ucg/src/clib/*.c *.c)
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ucg/src/clib
|
INCLUDES += -I ucg/src/clib
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -38,12 +38,6 @@ DEFINES += -DESP_INIT_DATA_DEFAULT="\"$(SDK_DIR)/bin/esp_init_data_default_v05.b
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../../include/ets
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
INCLUDES += -I ../platform
|
|
||||||
INCLUDES += -I ../lua
|
|
||||||
INCLUDES += -I ../spiffs
|
INCLUDES += -I ../spiffs
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
// overflows. The downside is that it does not implement a wide range
|
// overflows. The downside is that it does not implement a wide range
|
||||||
// of formatting characters.
|
// of formatting characters.
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
|
@ -37,9 +37,6 @@ endif
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -38,12 +38,6 @@ STD_CFLAGS=-std=gnu11 -Wimplicit
|
||||||
# Required for each makefile to inherit from the parent
|
# Required for each makefile to inherit from the parent
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES := $(INCLUDES) -I $(PDIR)include
|
|
||||||
INCLUDES += -I ./
|
|
||||||
INCLUDES += -I ./include
|
|
||||||
INCLUDES += -I ../include
|
|
||||||
INCLUDES += -I ../libc
|
|
||||||
INCLUDES += -I ../../include
|
|
||||||
PDIR := ../$(PDIR)
|
PDIR := ../$(PDIR)
|
||||||
sinclude $(PDIR)Makefile
|
sinclude $(PDIR)Makefile
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
#ifndef _SDKOVERRIDES_C_TYPES_H_
|
#ifndef _SDKOVERRIDES_C_TYPES_H_
|
||||||
#define _SDKOVERRIDES_C_TYPES_H_
|
#define _SDKOVERRIDES_C_TYPES_H_
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
../../app/include/lwip/app/espconn.h
|
|
@ -1,2 +1,3 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#define MEM_DEFAULT_USE_DRAM
|
||||||
#include_next "mem.h"
|
#include_next "mem.h"
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#define USE_OPTIMIZE_PRINTF
|
||||||
|
|
||||||
#include_next "osapi.h"
|
#include_next "osapi.h"
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ LUASOURCE ?= ../local/lua
|
||||||
FLASHSIZE ?= 4mb 32mb 8mb
|
FLASHSIZE ?= 4mb 32mb 8mb
|
||||||
FLASH_SW = -S
|
FLASH_SW = -S
|
||||||
SUBDIRS =
|
SUBDIRS =
|
||||||
|
APP_DIR = ../app
|
||||||
OBJDUMP = $(or $(shell which objdump),xtensa-lx106-elf-objdump)
|
OBJDUMP = $(or $(shell which objdump),xtensa-lx106-elf-objdump)
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
|
@ -20,23 +20,23 @@ SPIFFSFILES ?= $(patsubst $(FSSOURCE)/%,%,$(shell find $(FSSOURCE)/ -name '*' '!
|
||||||
# Get the filesize of /bin/0x10000.bin and SPIFFS sizing
|
# Get the filesize of /bin/0x10000.bin and SPIFFS sizing
|
||||||
#
|
#
|
||||||
|
|
||||||
FLASH_FS_SIZE := $(shell $(CC) -E -dM - <../app/include/user_config.h | grep SPIFFS_MAX_FILESYSTEM_SIZE| cut -d ' ' -f 3)
|
FLASH_FS_SIZE := $(shell $(CC) -E -dM - <$(APP_DIR)/include/user_config.h | grep SPIFFS_MAX_FILESYSTEM_SIZE| cut -d ' ' -f 3)
|
||||||
|
|
||||||
ifneq ($(strip $(FLASH_FS_SIZE)),)
|
ifneq ($(strip $(FLASH_FS_SIZE)),)
|
||||||
FLASHSIZE = $(shell printf "0x%x" $(FLASH_FS_SIZE))
|
FLASHSIZE = $(shell printf "0x%x" $(FLASH_FS_SIZE))
|
||||||
FLASH_SW = -c
|
FLASH_SW = -c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
FLASH_FS_LOC := $(shell $(CC) -E -dM - <../app/include/user_config.h | grep SPIFFS_FIXED_LOCATION| cut -d ' ' -f 3)
|
FLASH_FS_LOC := $(shell $(CC) -E -dM - <$(APP_DIR)/include/user_config.h | grep SPIFFS_FIXED_LOCATION| cut -d ' ' -f 3)
|
||||||
ifeq ($(strip $(FLASH_FS_LOC)),)
|
ifeq ($(strip $(FLASH_FS_LOC)),)
|
||||||
FLASH_FS_LOC := $(shell printf "0x%x" $$((0x$(shell $(OBJDUMP) -t ../app/.output/eagle/debug/image/eagle.app.v6.out |grep " _flash_used_end" |cut -f1 -d" ") - 0x40200000)))
|
FLASH_FS_LOC := $(shell printf "0x%x" $$((0x$(shell $(OBJDUMP) -t $(APP_DIR)/.output/eagle/debug/image/eagle.app.v6.out |grep " _flash_used_end" |cut -f1 -d" ") - 0x40200000)))
|
||||||
else
|
else
|
||||||
FLASH_FS_LOC := $(shell printf "0x%x" $(FLASH_FS_LOC))
|
FLASH_FS_LOC := $(shell printf "0x%x" $(FLASH_FS_LOC))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LFSSOURCES := $(wildcard $(LUASOURCE)/*.lua)
|
LFSSOURCES := $(wildcard $(LUASOURCE)/*.lua)
|
||||||
|
|
||||||
BUILD_TYPE := $(shell $(CC) $(EXTRA_CCFLAGS) -E -dM - <../app/include/user_config.h | grep LUA_NUMBER_INTEGRAL | wc -l)
|
BUILD_TYPE := $(shell $(CC) $(EXTRA_CCFLAGS) -E -dM - <$(APP_DIR)/include/user_config.h | grep LUA_NUMBER_INTEGRAL | wc -l)
|
||||||
ifeq ($(BUILD_TYPE),0)
|
ifeq ($(BUILD_TYPE),0)
|
||||||
LUAC_CROSS := ../luac.cross
|
LUAC_CROSS := ../luac.cross
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
|
APP_DIR = ../../app
|
||||||
summary ?= @true
|
summary ?= @true
|
||||||
|
|
||||||
CC =gcc
|
CC =gcc
|
||||||
|
|
||||||
SRCS=\
|
SRCS=\
|
||||||
main.c \
|
main.c \
|
||||||
../../app/spiffs/spiffs_cache.c ../../app/spiffs/spiffs_check.c ../../app/spiffs/spiffs_gc.c ../../app/spiffs/spiffs_hydrogen.c ../../app/spiffs/spiffs_nucleus.c
|
$(APP_DIR)/spiffs/spiffs_cache.c $(APP_DIR)/spiffs/spiffs_check.c $(APP_DIR)/spiffs/spiffs_gc.c $(APP_DIR)/spiffs/spiffs_hydrogen.c $(APP_DIR)/spiffs/spiffs_nucleus.c
|
||||||
|
|
||||||
CFLAGS=-g -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -I. -I../../app/spiffs -I../../app/include -DNODEMCU_SPIFFS_NO_INCLUDE --include spiffs_typedefs.h -Ddbg_printf=printf
|
CFLAGS=-g -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -I. -I$(APP_DIR)/spiffs -I$(APP_DIR)/include -DNODEMCU_SPIFFS_NO_INCLUDE --include spiffs_typedefs.h -Ddbg_printf=printf
|
||||||
|
|
||||||
spiffsimg: $(SRCS)
|
spiffsimg: $(SRCS)
|
||||||
$(summary) HOSTCC $(CURDIR)/$<
|
$(summary) HOSTCC $(CURDIR)/$<
|
||||||
|
|
Loading…
Reference in New Issue