Skip to content

Bump ESP8266 target to SDK v2.1.0 #2697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2019

Conversation

akosthekiss
Copy link
Member

Until now, the ESP8266 target used a non-tagged git hash revision
of the RTOS SDK (from Oct 2017). Moreover, the compiler was also a
custom-built gcc.

This commit sets the RTOS SDK version to v2.1.0, released Oct 2018,
which is the latest old-style SDK for ESP. The commit also changes
the used gcc to an Espressif-provided pre-built toolchain, which is
tagged for the (latest) v3.0.1 SDK release.

(The SDK bump is not to the latest SDK version because the new
v3.x line of the SDK is "ESP-IDF style", which is incompatible with
the current target code base. On the other hand, the toolchain
comes from the latest SDK release because the v2.x line had no
pre-built toolchain suggestions -- but it builds v2.x sources
correctly.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu

@rerobika
Copy link
Member

Nice patch, I've tested it on the device and it works perfectly. The only problem I found was that the new esp-tool's path didn't fit the Makefile.esp8266, but there is a minor fix for it.

diff --git a/targets/esp8266/Makefile.esp8266 b/targets/esp8266/Makefile.esp8266
index 34dcf71..89f8699 100644
--- a/targets/esp8266/Makefile.esp8266
+++ b/targets/esp8266/Makefile.esp8266
@@ -18,7 +18,7 @@ BUILD_DIR  = build/obj-esp8266
 COPYTARGET = targets/esp8266/libs
 USBDEVICE  ?= /dev/ttyUSB0
 JERRYHEAP  ?= 20
-ESPTOOL    ?= /opt/Espressif/esptool-py/esptool.py
+ESPTOOL    ?= $(ESPTOOL_PATH)/esptool.py
 
 # compile flags
 ESP_CFLAGS := -D__TARGET_ESP8266 -D__attr_always_inline___=
diff --git a/targets/esp8266/docs/ESP-PREREQUISITES.md b/targets/esp8266/docs/ESP-PREREQUISITES.md
index a39d431..de7bb4a 100644
--- a/targets/esp8266/docs/ESP-PREREQUISITES.md
+++ b/targets/esp8266/docs/ESP-PREREQUISITES.md
@@ -59,6 +59,7 @@ Set environment variables, might also go in your `.profile`:
 export PATH=$HOME/Espressif/xtensa-lx106-elf/bin:$PATH
 export SDK_PATH=$HOME/Espressif/ESP8266_RTOS_SDK
+export ESPTOOL_PATH=$HOME/Espressif/esptool
 export BIN_PATH=(to output folder path)

Until now, the ESP8266 target used a non-tagged git hash revision
of the RTOS SDK (from Oct 2017). Moreover, the compiler was also a
custom-built gcc.

This commit sets the RTOS SDK version to v2.1.0, released Oct 2018,
which is the latest old-style SDK for ESP. The commit also changes
the used gcc to an Espressif-provided pre-built toolchain, which is
tagged for the (latest) v3.0.1 SDK release.

(The SDK bump is not to the latest SDK version because the new
v3.x line of the SDK is "ESP-IDF style", which is incompatible with
the current target code base. On the other hand, the toolchain
comes from the latest SDK release because the v2.x line had no
pre-built toolchain suggestions -- but it builds v2.x sources
correctly.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
@akosthekiss
Copy link
Member Author

@rerobika Thanks for run-testing it. Also thanks for spotting the esptool issue. Fixed.

Copy link
Member

@rerobika rerobika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (informal)

Copy link
Contributor

@LaszloLango LaszloLango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@robertsipka robertsipka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@robertsipka robertsipka merged commit 9ced3ad into jerryscript-project:master Jan 15, 2019
@akosthekiss akosthekiss deleted the esp8266-v2.1.0 branch January 15, 2019 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants