summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-06-18 17:13:52 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2018-06-18 17:13:52 +0200
commit8d8d990c4fd85ad2b5f9e1f72311a1f746e7a92f (patch)
tree3dd76f5d52abb7605e743b181e160b6dd099fc43
parent968abdfeb18123e86449cc4f3866fc97d72c4914 (diff)
downloadmodern-esp-sandbox-8d8d990c4fd85ad2b5f9e1f72311a1f746e7a92f.tar.gz
modern-esp-sandbox-8d8d990c4fd85ad2b5f9e1f72311a1f746e7a92f.tar.bz2
modern-esp-sandbox-8d8d990c4fd85ad2b5f9e1f72311a1f746e7a92f.tar.xz
modern-esp-sandbox-8d8d990c4fd85ad2b5f9e1f72311a1f746e7a92f.zip
o Making it easier to switch between images.
-rw-r--r--ota-test/Makefile20
1 files changed, 17 insertions, 3 deletions
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