From 8d8d990c4fd85ad2b5f9e1f72311a1f746e7a92f Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 18 Jun 2018 17:13:52 +0200 Subject: o Making it easier to switch between images. --- ota-test/Makefile | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'ota-test') diff --git a/ota-test/Makefile b/ota-test/Makefile index 489289e..c8b5a7b 100644 --- a/ota-test/Makefile +++ b/ota-test/Makefile @@ -15,6 +15,20 @@ endif include $(IDF_PATH)/make/project.mk -$(SDKCONFIG2): $(SDKCONFIG1) sdkconfig2 - echo "Generating sdkconfig for app 2" - cat $(SDKCONFIG1) sdkconfig2 > $@ +set-rom-1: + echo "Configuring APP addresses for ROM #1" + sed sdkconfig \ + -e 's,\(CONFIG_ESP8266_APP_START_ADDRESS\)=.*,\1=0x40202010,' \ + -e 's,\(CONFIG_ESP8266_APP_FLASH_ADDRESS\)=.*,\1=0x2000,' \ + > sdkconfig.tmp + mv sdkconfig.tmp sdkconfig + +set-rom-2: + echo "Configuring APP addresses for ROM #2" + sed sdkconfig \ + -e 's,\(CONFIG_ESP8266_APP_START_ADDRESS\)=.*,\1=0x40282010,' \ + -e 's,\(CONFIG_ESP8266_APP_FLASH_ADDRESS\)=.*,\1=0x82000,' \ + > sdkconfig.tmp + mv sdkconfig.tmp sdkconfig + +.PHONY: set-rom-1 set-rom-2 -- cgit v1.2.3