diff --git a/README.buildenv b/README.buildenv index e87393f421..c7ea22dfac 100644 --- a/README.buildenv +++ b/README.buildenv @@ -127,7 +127,7 @@ all components and make the elf target depend on this. The targets invoke Make on the makefiles of the components in a subshell: this way the components have full freedom to do whatever is necessary to build the library without influencing other components. By default, the -component includes the utility makefile $(SDK_PATH)/make/component.mk. +component includes the utility makefile $(IDF_PATH)/make/component.mk. This provides default targets and configurations that will work out-of-the-box for most projects. @@ -158,7 +158,7 @@ minimum, it will just include the ESP-IDF component makefile, which adds component functionality: ----8<---- -include $(SDK_PATH)/make/component.mk +include $(IDF_PATH)/make/component.mk ---->8---- This will take all the .c and .S files in the component root and compile @@ -169,7 +169,7 @@ system by setting COMPONENT_SRCDIRS: ----8<---- COMPONENT_SRCDIRS := src1 src2 -include $(SDK_PATH)/make/component.mk +include $(IDF_PATH)/make/component.mk ---->8---- This will compile all source files in the src1/ and src2/ subdirectories @@ -183,7 +183,7 @@ objects that need to be generated: ----8<---- COMPONENT_OBJS := file1.o file2.o thing/filea.o thing/fileb.o anotherthing/main.o -include $(SDK_PATH)/make/component.mk +include $(IDF_PATH)/make/component.mk ---->8---- This can also be used in order to conditionally compile some files @@ -200,7 +200,7 @@ config FOO_ENABLE_BAR Makefile: ----8<---- COMPONENT_OBJS := foo_a.o foo_b.o $(if $(CONFIG_FOO_ENABLE_BAR),foo_bar.o foo_bar_interface.o) -include $(SDK_PATH)/make/component.mk +include $(IDF_PATH)/make/component.mk ---->8---- Some components will have a situation where a source file isn't supplied @@ -217,7 +217,7 @@ graphics_lib.o: logo.h logo.h: $(COMPONENT_PATH)/logo.bmp bmp2h -i $^ -o $@ -include $(SDK_PATH)/make/component.mk +include $(IDF_PATH)/make/component.mk ---->8---- In this example, graphics_lib.o and logo.h will be generated in the @@ -242,7 +242,7 @@ logo.h: $(COMPONENT_PATH)/logo.bmp $(vecho) BMP2H $@ $(Q) bmp2h -i $^ -o $@ -include $(SDK_PATH)/make/component.mk +include $(IDF_PATH)/make/component.mk ---->8---- Obviously, there are cases where all these recipes are insufficient for a diff --git a/components/bootloader/src/Makefile b/components/bootloader/src/Makefile index abf6374015..191fbef110 100644 --- a/components/bootloader/src/Makefile +++ b/components/bootloader/src/Makefile @@ -9,4 +9,4 @@ COMPONENTS := esptool_py #We cannot include the esp32 component directly but we need its includes. This is fixed by #adding it in the main/Makefile directory. -include $(SDK_PATH)/make/project.mk +include $(IDF_PATH)/make/project.mk diff --git a/components/bootloader/src/main/Makefile b/components/bootloader/src/main/Makefile index 5330efe867..8b7cd6843a 100644 --- a/components/bootloader/src/main/Makefile +++ b/components/bootloader/src/main/Makefile @@ -1,13 +1,13 @@ # # Main Makefile. This is basically the same as a component makefile. # -# This Makefile should, at the very least, just include $(SDK_PATH)/make/component.mk. By default, +# This Makefile should, at the very least, just include $(IDF_PATH)/make/component.mk. By default, # this will take the sources in the src/ directory, compile them and link them into # lib(subdirectory_name).a in the build directory. This behaviour is entirely configurable, # please read the esp-idf build system document if you need to do this. # -COMPONENT_ADD_LDFLAGS := -L $(abspath .) -lmain -T eagle.bootloader.ld -T $(SDK_PATH)/components/esp32/ld/eagle.fpga32.rom.addr.v7.ld -COMPONENT_EXTRA_INCLUDES := $(SDK_PATH)/components/esp32/include +COMPONENT_ADD_LDFLAGS := -L $(abspath .) -lmain -T eagle.bootloader.ld -T $(IDF_PATH)/components/esp32/ld/eagle.fpga32.rom.addr.v7.ld +COMPONENT_EXTRA_INCLUDES := $(IDF_PATH)/components/esp32/include -include $(SDK_PATH)/make/component.mk +include $(IDF_PATH)/make/component.mk diff --git a/components/esp32/Makefile b/components/esp32/Makefile index 5ef93f4edb..8430bf5400 100644 --- a/components/esp32/Makefile +++ b/components/esp32/Makefile @@ -1,23 +1,23 @@ # # Component Makefile # -# This Makefile should, at the very least, just include $(SDK_PATH)/make/component.mk. By default, +# This Makefile should, at the very least, just include $(IDF_PATH)/make/component.mk. By default, # this will take the sources in this directory, compile them and link them into # lib(subdirectory_name).a in the build directory. This behaviour is entirely configurable, -# please read the SDK documents if you need to do this. +# please read the esp-idf build system document if you need to do this. # LIBS := crypto core net80211 phy rtc pp wpa wps - + COMPONENT_ADD_LDFLAGS := -lesp32 \ $(abspath libhal.a) \ -L$(abspath lib) \ $(addprefix -l,$(LIBS)) \ -L $(abspath ld) \ -T eagle.fpga32.v7.ld \ - -T eagle.fpga32.rom.addr.v7.ld + -T eagle.fpga32.rom.addr.v7.ld -include $(SDK_PATH)/make/component.mk +include $(IDF_PATH)/make/component.mk ALL_LIB_FILES := $(patsubst %,$(COMPONENT_PATH)/lib/lib%.a,$(LIBS)) @@ -25,10 +25,10 @@ ALL_LIB_FILES := $(patsubst %,$(COMPONENT_PATH)/lib/lib%.a,$(LIBS)) # be invoked if any modules are missing (probably because # git submodule update --init needs to be run). $(ALL_LIB_FILES): - $(Q) [ -d ${SDK_PATH}/.git ] || ( @echo "ERROR: Missing libraries in esp32 component. esp-idf must be cloned from git to work."; exit 1 ) + $(Q) [ -d ${IDF_PATH}/.git ] || ( @echo "ERROR: Missing libraries in esp32 component. esp-idf must be cloned from git to work."; exit 1 ) $(Q) [ -x $(which git) ] || ( @echo "ERROR: Missing libraries in esp32 component. Need to run 'git submodule update --init' in esp-idf root directory."; exit 1 ) @echo "Warning: Missing libraries in components/esp32/lib/ submodule. Going to try running 'git submodule update --init' in esp-idf root directory..." - cd ${SDK_PATH} && git submodule update --init + cd ${IDF_PATH} && git submodule update --init # adding $(ALL_LIB_FILES) as a build dependency here is a hack to make # sure they get evaluated. Once TW6630 lands and we have library file diff --git a/components/esptool_py/Makefile.projbuild b/components/esptool_py/Makefile.projbuild index 3b909259a9..c9000076f2 100644 --- a/components/esptool_py/Makefile.projbuild +++ b/components/esptool_py/Makefile.projbuild @@ -9,7 +9,7 @@ PYTHON ?= $(call dequote,$(CONFIG_PYTHON)) # to invoke esptool.py (with or without serial port args) # # NB: esptool.py lives in the sdk/bin directory not the component directory -ESPTOOLPY := $(PYTHON) $(SDK_PATH)/bin/esptool.py --chip esp32 +ESPTOOLPY := $(PYTHON) $(IDF_PATH)/bin/esptool.py --chip esp32 ESPTOOLPY_SERIAL := $(ESPTOOLPY) --port $(ESPPORT) --baud $(ESPBAUD) APP_FLASH_COMMAND=$(ESPTOOLPY_SERIAL) write_flash $(CONFIG_APP_OFFSET) $(APP_BIN) diff --git a/components/freertos/Makefile b/components/freertos/Makefile index 912148d232..a2cdb00229 100644 --- a/components/freertos/Makefile +++ b/components/freertos/Makefile @@ -5,4 +5,4 @@ COMPONENT_ADD_INCLUDEDIRS := include COMPONENT_PRIV_INCLUDEDIRS := include/freertos -include $(SDK_PATH)/make/component.mk +include $(IDF_PATH)/make/component.mk diff --git a/components/lwip/Makefile b/components/lwip/Makefile index 018d3af793..99a6614a50 100755 --- a/components/lwip/Makefile +++ b/components/lwip/Makefile @@ -8,4 +8,4 @@ COMPONENT_SRCDIRS := api apps core/ipv4 core/ipv6 core netif port/freertos port/ EXTRA_CFLAGS := -Wno-error=address -Waddress -DLWIP_ESP8266 -include $(SDK_PATH)/make/component.mk +include $(IDF_PATH)/make/component.mk diff --git a/components/newlib/Makefile b/components/newlib/Makefile index b9913d241e..970461698a 100644 --- a/components/newlib/Makefile +++ b/components/newlib/Makefile @@ -5,4 +5,4 @@ define COMPONENT_BUILDRECIPE #Nothing to do; this does not generate a library. endef -include $(SDK_PATH)/make/component.mk +include $(IDF_PATH)/make/component.mk diff --git a/components/nvs_flash/Makefile b/components/nvs_flash/Makefile index 8eb3654887..58232cc89b 100755 --- a/components/nvs_flash/Makefile +++ b/components/nvs_flash/Makefile @@ -6,4 +6,4 @@ COMPONENT_ADD_INCLUDEDIRS := include COMPONENT_SRCDIRS := src -include $(SDK_PATH)/make/component.mk +include $(IDF_PATH)/make/component.mk diff --git a/components/partition_table/Makefile.projbuild b/components/partition_table/Makefile.projbuild index d9c69d53ca..0790733ac6 100644 --- a/components/partition_table/Makefile.projbuild +++ b/components/partition_table/Makefile.projbuild @@ -9,7 +9,7 @@ .PHONY: partition_table partition_table-flash partition_table-clean # NB: gen_esp32part.py lives in the sdk/bin/ dir not component dir -GEN_ESP32PART := $(PYTHON) $(SDK_PATH)/bin/gen_esp32part.py -q +GEN_ESP32PART := $(PYTHON) $(IDF_PATH)/bin/gen_esp32part.py -q # Path to partition CSV file is relative to project path for custom # partition CSV files, but relative to component dir otherwise.$ diff --git a/components/spi_flash/Makefile b/components/spi_flash/Makefile index ea52a1ef71..fc41e5f430 100755 --- a/components/spi_flash/Makefile +++ b/components/spi_flash/Makefile @@ -1,3 +1,3 @@ COMPONENT_ADD_INCLUDEDIRS := include -include $(SDK_PATH)/make/component.mk +include $(IDF_PATH)/make/component.mk diff --git a/components/tcpip_adapter/Makefile b/components/tcpip_adapter/Makefile index c08a03896b..4028caf4a3 100755 --- a/components/tcpip_adapter/Makefile +++ b/components/tcpip_adapter/Makefile @@ -4,4 +4,4 @@ EXTRA_CFLAGS := -DLWIP_ESP8266 -include $(SDK_PATH)/make/component.mk +include $(IDF_PATH)/make/component.mk diff --git a/docs/eclipse-setup.rst b/docs/eclipse-setup.rst index 4345569f90..07c8c2538e 100644 --- a/docs/eclipse-setup.rst +++ b/docs/eclipse-setup.rst @@ -35,13 +35,13 @@ Project Properties * Click on the "Environment" properties page under "C/C++ Build". Click "Add..." and enter name ``V`` and value ``1``. -* Click "Add..." again, and enter name ``SDK_PATH``. The value should be the full path where ESP-IDF is installed. *Windows users: Use forward-slashes not backslashes for this path, ie C:/Users/MyUser/Development/esp-idf*. +* Click "Add..." again, and enter name ``IDF_PATH``. The value should be the full path where ESP-IDF is installed. *Windows users: Use forward-slashes not backslashes for this path, ie C:/Users/MyUser/Development/esp-idf*. *Windows users only, follow these two additional steps:* * On the same Environment property page, edit the PATH environment variable and append ``;C:\msys32\usr\bin;C:\msys32\mingw32\bin;C:\msys32\opt\xtensa-esp32-elf\bin`` to the end of the default value. (If you installed msys32 to a different directory then you'll need to change these paths to match.) -* Click on the "C/C++ Build" top-level properties page then uncheck "Use default build command" and enter this for the custom build command: ``bash ${SDK_PATH}/bin/eclipse_windows_make.sh``. +* Click on the "C/C++ Build" top-level properties page then uncheck "Use default build command" and enter this for the custom build command: ``bash ${IDF_PATH}/bin/eclipse_windows_make.sh``. *All users, continue with these steps:* diff --git a/docs/windows-setup.rst b/docs/windows-setup.rst index a8a567b80b..ed96819eb5 100644 --- a/docs/windows-setup.rst +++ b/docs/windows-setup.rst @@ -64,7 +64,7 @@ Step 4: Configuring the project Open an MSYS2 terminal window by running ``C:\msys32\msys2_shell.cmd``. The environment in this window is a bash shell. -Type a command like this to set the path to ESP-IDF directory: ``export SDK_PATH="C:/path/to/esp-idf"`` (note the forward-slashes not back-slashes for the path). If you don't want to run this command every time you open an MSYS2 window, create a new file in ``C:/msys32/etc/profile.d/`` and paste this line in - then it will be run each time you open an MYS2 terminal. +Type a command like this to set the path to ESP-IDF directory: ``export IDF_PATH="C:/path/to/esp-idf"`` (note the forward-slashes not back-slashes for the path). If you don't want to run this command every time you open an MSYS2 window, create a new file in ``C:/msys32/etc/profile.d/`` and paste this line in - then it will be run each time you open an MYS2 terminal. Use ``cd`` to change to the project directory (not the ESP-IDF directory.) Type ``make menuconfig`` to configure your project, then ``make`` to build it, ``make clean`` to remove built files, and ``make flash`` to flash (use the menuconfig to set the serial port for flashing.) diff --git a/make/common.mk b/make/common.mk index 24d8294b8d..064408dcfc 100644 --- a/make/common.mk +++ b/make/common.mk @@ -10,8 +10,8 @@ ifeq ("$(LDFLAGS)","") LDFLAGS = -nostdlib \ - -L$(SDK_PATH)/lib \ - -L$(SDK_PATH)/ld \ + -L$(IDF_PATH)/lib \ + -L$(IDF_PATH)/ld \ $(addprefix -L$(BUILD_DIR_BASE)/,$(COMPONENTS) $(SRCDIRS)) \ -u call_user_start_cpu0 \ -Wl,--gc-sections \ diff --git a/make/component.mk b/make/component.mk index e062c8e8d8..9c0e5d602a 100644 --- a/make/component.mk +++ b/make/component.mk @@ -10,7 +10,7 @@ # # -# This Makefile requires the environment variable SDK_PATH to be set +# This Makefile requires the environment variable IDF_PATH to be set # to the top-level directory where ESP-IDF is located (the directory # containing this 'make' directory). # @@ -23,7 +23,7 @@ endif COMPONENT_PATH := $(abspath $(dir $(firstword $(MAKEFILE_LIST)))) export COMPONENT_PATH -include $(SDK_PATH)/make/common.mk +include $(IDF_PATH)/make/common.mk #Some of these options are overridable by the components Makefile. diff --git a/make/project.mk b/make/project.mk index cf9e104302..dd557e48a1 100644 --- a/make/project.mk +++ b/make/project.mk @@ -6,7 +6,7 @@ # # -# This Makefile requires the environment variable SDK_PATH to be set to the directory where this +# This Makefile requires the environment variable IDF_PATH to be set to the directory where this # Makefile is located. # @@ -52,7 +52,7 @@ BUILD_DIR_BASE ?= $(PROJECT_PATH)/build #Component directories. These directories are searched for components. #The project Makefile can override these component dirs, or define extra component directories. -COMPONENT_DIRS ?= $(PROJECT_PATH)/components $(EXTRA_COMPONENT_DIRS) $(SDK_PATH)/components +COMPONENT_DIRS ?= $(PROJECT_PATH)/components $(EXTRA_COMPONENT_DIRS) $(IDF_PATH)/components export COMPONENT_DIRS #The project Makefile can define a list of components, but if it does not do this we just take @@ -130,7 +130,7 @@ $(foreach comp,$(COMPONENT_PATHS_BUILDABLE), $(eval $(call GenerateComponentDepe export PROJECT_PATH #Include functionality common to both project & component --include $(SDK_PATH)/make/common.mk +-include $(IDF_PATH)/make/common.mk #Set host compiler and binutils HOSTCC := $(CC) @@ -163,7 +163,7 @@ endef $(foreach componentpath,$(COMPONENT_PATHS),$(eval $(call includeProjBuildMakefile,$(componentpath)))) # once we know component paths, we can include the config -include $(SDK_PATH)/make/project_config.mk +include $(IDF_PATH)/make/project_config.mk # ELF depends on the -build target of every component $(APP_ELF): $(addsuffix -build,$(notdir $(COMPONENT_PATHS_BUILDABLE))) diff --git a/make/project_config.mk b/make/project_config.mk index 862ed760e6..b8808180c1 100644 --- a/make/project_config.mk +++ b/make/project_config.mk @@ -5,7 +5,7 @@ COMPONENT_KCONFIGS := $(foreach component,$(COMPONENT_PATHS),$(wildcard $(compon COMPONENT_KCONFIGS_PROJBUILD := $(foreach component,$(COMPONENT_PATHS),$(wildcard $(component)/Kconfig.projbuild)) #For doing make menuconfig etc -KCONFIG_TOOL_DIR=$(SDK_PATH)/tools/kconfig +KCONFIG_TOOL_DIR=$(IDF_PATH)/tools/kconfig # clear MAKEFLAGS as the menuconfig makefile uses implicit compile rules $(KCONFIG_TOOL_DIR)/mconf $(KCONFIG_TOOL_DIR)/conf: @@ -15,13 +15,13 @@ $(KCONFIG_TOOL_DIR)/mconf $(KCONFIG_TOOL_DIR)/conf: CC=$(HOSTCC) LD=$(HOSTLD) \ $(MAKE) -C $(KCONFIG_TOOL_DIR) -menuconfig: $(KCONFIG_TOOL_DIR)/mconf $(SDK_PATH)/Kconfig $(BUILD_DIR_BASE) +menuconfig: $(KCONFIG_TOOL_DIR)/mconf $(IDF_PATH)/Kconfig $(BUILD_DIR_BASE) $(vecho) MENUCONFIG $(Q) KCONFIG_AUTOHEADER=$(PROJECT_PATH)/build/include/sdkconfig.h \ KCONFIG_CONFIG=$(PROJECT_PATH)/sdkconfig \ COMPONENT_KCONFIGS="$(COMPONENT_KCONFIGS)" \ COMPONENT_KCONFIGS_PROJBUILD="$(COMPONENT_KCONFIGS_PROJBUILD)" \ - $(KCONFIG_TOOL_DIR)/mconf $(SDK_PATH)/Kconfig + $(KCONFIG_TOOL_DIR)/mconf $(IDF_PATH)/Kconfig ifeq ("$(wildcard $(PROJECT_PATH)/sdkconfig)","") #No sdkconfig found. Need to run menuconfig to make this if we need it. @@ -51,7 +51,7 @@ $(AUTO_CONF_REGEN_TARGET) $(PROJECT_PATH)/build/include/sdkconfig.h: $(PROJECT_P KCONFIG_CONFIG=$(PROJECT_PATH)/sdkconfig \ COMPONENT_KCONFIGS="$(COMPONENT_KCONFIGS)" \ COMPONENT_KCONFIGS_PROJBUILD="$(COMPONENT_KCONFIGS_PROJBUILD)" \ - $(KCONFIG_TOOL_DIR)/conf --silentoldconfig $(SDK_PATH)/Kconfig + $(KCONFIG_TOOL_DIR)/conf --silentoldconfig $(IDF_PATH)/Kconfig $(Q) touch $(AUTO_CONF_REGEN_TARGET) $(PROJECT_PATH)/build/include/sdkconfig.h # touch to ensure both output files are newer - as 'conf' can also update sdkconfig (a dependency). Without this, # sometimes you can get an infinite make loop on Windows where sdkconfig always gets regenerated newer diff --git a/tools/windows/windows_install_prerequisites.sh b/tools/windows/windows_install_prerequisites.sh index 55166a7b23..e8b3b9eb22 100755 --- a/tools/windows/windows_install_prerequisites.sh +++ b/tools/windows/windows_install_prerequisites.sh @@ -53,7 +53,7 @@ echo "your path. Execute 'msys_shell.cmd' to launch an" echo "MSYS terminal." echo echo "Once ESP-IDF is downloaded/checked out, set the" -echo "environment variable SDK_PATH in /etc/profile to" +echo "environment variable IDF_PATH in /etc/profile to" echo "point to the directory." echo "************************************************" echo