diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000000..926cb65d89 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,259 @@ +# Run whenever a PR is generated or updated. + +# Most jobs check out the code, ensure Python3 is installed, and for build +# tests the ESP8266 toolchain is cached when possible to speed up execution. + +name: ESP8266 Arduino CI + +on: + pull_request: + + +jobs: + +# Run 8 parallel jobs for the default build of all examples. + build-linux: + name: Build ${{ matrix.chunk }} + runs-on: ubuntu-latest + strategy: + matrix: + chunk: [0, 1, 2, 3, 4, 5, 6, 7] + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Cache Linux toolchain + id: cache-linux + uses: actions/cache@v2 + with: + path: ./tools/dist + key: key-linux-toolchain + - name: Build Sketches + env: + TRAVIS_BUILD_DIR: ${{ github.workspace }} + TRAVIS_TAG: ${{ github.ref }} + BUILD_PARITY: custom + mod: 8 + rem: ${{ matrix.chunk }} + run: | + bash ./tests/build.sh + + +# Cover the debug and IPv6 cases by enabling both and running 8 parallel jobs +# over all example code. + build-debug-ipv6: + name: Debug IPv6 ${{ matrix.chunk }} + runs-on: ubuntu-latest + strategy: + matrix: + chunk: [0, 1, 2, 3, 4, 5, 6, 7] + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Cache Linux toolchain + id: cache-linux + uses: actions/cache@v2 + with: + path: ./tools/dist + key: key-linux-toolchain + - name: Build Sketches + env: + TRAVIS_BUILD_DIR: ${{ github.workspace }} + TRAVIS_TAG: ${{ github.ref }} + BUILD_PARITY: custom + mod: 8 + rem: ${{ matrix.chunk }} + run: | + bash ./tests/debug6.sh + + +# Single build under Windows to ensure the Win toolchain is good. + build-windows: + name: Windows + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Cache Windows toolchain + id: cache-windows + uses: actions/cache@v2 + with: + path: ./tools/dist + key: key-windows-toolchain + - name: Build Sketch + env: + TRAVIS_BUILD_DIR: ${{ github.workspace }} + TRAVIS_TAG: ${{ github.ref }} + WINDOWS: 1 + BUILD_PARITY: custom + mod: 500 + rem: 1 + run: | + # Windows has python3 already installed, but it's called "python". + # Copy python.exe to the proper name so scripts "just work". + copy (get-command python).source (get-command python).source.Replace("python.exe", "python3.exe") + bash ./tests/build.sh + + +# Single build under macOS to ensure the Mac toolchain is good. + build-mac: + name: Mac + runs-on: macOS-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Cache Mac toolchain + id: cache-mac + uses: actions/cache@v2 + with: + path: ./tools/dist + key: key-mac-toolchain + - name: Build Sketch + env: + TRAVIS_BUILD_DIR: ${{ github.workspace }} + TRAVIS_TAG: ${{ github.ref }} + MACOSX: 1 + BUILD_PARITY: custom + mod: 500 + rem: 1 + run: | + bash ./tests/build.sh + + +# Run a few Platform.IO jobs (not full suite) to check PIO integration. + build-pio: + name: Build Platform.IO + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Build subset on Platform.IO + env: + TRAVIS_BUILD_DIR: ${{ github.workspace }} + TRAVIS_TAG: ${{ github.ref }} + BUILD_PARITY: custom + mod: 42 # Picked at random to give 4-5 builds and exit. + rem: 13 + run: | + sudo apt-get install python3-pip python3-setuptools + PATH=/home/runner/.local/bin:$PATH bash ./tests/platformio.sh + + +# Run host test suite under valgrind for runtime checking of code. + host-tests: + name: Host tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Run host tests + env: + TRAVIS_BUILD_DIR: ${{ github.workspace }} + TRAVIS_TAG: ${{ github.ref }} + run: | + sudo apt-get install valgrind lcov + bash ./tests/ci/host_test.sh + + +# Ensure Sphinx can build the documentation properly. + documentation: + name: Documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Build documentation + env: + TRAVIS_BUILD_DIR: ${{ github.workspace }} + TRAVIS_TAG: ${{ github.ref }} + run: | + sudo apt-get install python3-pip python3-setuptools + # GitHub CI installs pip3 and setuptools outside the path. + # Update the path to include them and run. + PATH=/home/runner/.local/bin:$PATH pip3 install --user -r doc/requirements.txt + PATH=/home/runner/.local/bin:$PATH bash ./tests/ci/build_docs.sh + + +# Standard Arduino formatting in all the examples + style-check: + name: Style and formatting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Style check + env: + TRAVIS_BUILD_DIR: ${{ github.workspace }} + TRAVIS_TAG: ${{ github.ref }} + run: | + sudo apt-get install astyle + bash ./tests/ci/style_check.sh + + +# Quick test that the mocking builds succeed + mock-check: + name: Mock trivial test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Mock build + env: + TRAVIS_BUILD_DIR: ${{ github.workspace }} + TRAVIS_TAG: ${{ github.ref }} + run: | + bash ./tests/buildm.sh + + +# Ensure no manual edits to boards.txt + boards-check: + name: Boards.txt check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Boards.txt diff + env: + TRAVIS_BUILD_DIR: ${{ github.workspace }} + TRAVIS_TAG: ${{ github.ref }} + run: | + bash ./tests/ci/build_boards.sh diff --git a/.github/workflows/release-to-publish.yml b/.github/workflows/release-to-publish.yml new file mode 100644 index 0000000000..a2a27deb76 --- /dev/null +++ b/.github/workflows/release-to-publish.yml @@ -0,0 +1,56 @@ +# Whenever a release is published from a draft, this will update the +# master Arduino JSON file to add its new entry. + +# We keep the master JSON file in another repo, so we need to use a pre-set +# Deployment SSH key to be able to push a change to the repo. + +#### Steps to follow when you need to make a new SSH key for upload (not +#### normally needed!) + +# Generate a new SSH key private/public pair + +# ssh-keygen -t rsa -b 4096 -C "your@email.com" -f ./deploy_rsa + +# Upload deploy_rsa.pub to the *ESP8266.GITHUB.IO* repo as a deployment key + +# Convert the private key to base64 (to remove line breaks and allow easier +# usage in the script as an environment variable) + +# base64.exe -w 0 < deploy_rsa > deploy_rsa.b64 + +# Copy the contents of the .b64 file to the clipboard, make a new GitHub +# secret in the ESP8266/Arduino repo called "GHCI_DEPLOY_KEY" and paste +# the B64 code into the variable. + +name: ESP8266 Arduino Release Publisher + +on: + release: + types: [published] + +jobs: + package: + name: Update master JSON file + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Set GIT tag name + run: | + echo "::set-env name=TRAVIS_TAG::$(git describe --exact-match --tags)" + - name: Deploy updated JSON + env: + TRAVIS_BUILD_DIR: ${{ github.workspace }} + BUILD_TYPE: package + CI_GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }} + GHCI_DEPLOY_KEY: ${{ secrets.GHCI_DEPLOY_KEY }} + run: | + bash ./tests/ci/build_package.sh + # Only the regenerated JSON file will be used, but it's simpler + # than looking for it in a GH release. + bash ./package/deploy_package_index.sh + diff --git a/.github/workflows/tag-to-draft-release.yml b/.github/workflows/tag-to-draft-release.yml new file mode 100644 index 0000000000..265b709f7a --- /dev/null +++ b/.github/workflows/tag-to-draft-release.yml @@ -0,0 +1,40 @@ +# Whenever a tag of the form #.xxxx is pushed against master, generate a +# draft release and upload the ZIP and JSON file to it. Maintainers then +# will manually add the changelist and publish it. + +name: ESP8266 Arduino Draft Release + +on: + push: + tags: + # Run for tags of the x.x.x* form (i.e. 3.0.0, 3.0.0-beta, etc.). + - '[0-9]+.[0-9]+.[0-9]+*' + +jobs: + package: + name: Package + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Set GIT tag name + run: | + # Sets an environment variable used in the next steps + echo "::set-env name=TRAVIS_TAG::$(git describe --exact-match --tags)" + - name: Build package JSON + env: + TRAVIS_BUILD_DIR: ${{ github.workspace }} + BUILD_TYPE: package + CI_GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }} + run: | + bash ./tests/ci/build_package.sh + pip3 install PyGithub + # Create a draft release and upload the ZIP and JSON files. + # This draft is not visible to normal users and needs to be + # updated manually with release notes and published from the + # GitHub web interface. + python3 ./package/upload_release.py --user "$GITHUB_ACTOR" --repo "$GITHUB_REPOSITORY" --token "$CI_GITHUB_API_KEY" --tag "$TRAVIS_TAG" --name "Release $TRAVIS_TAG" --msg "Update the draft with release notes before publishing." package/versions/*/*.zip package/versions/*/package_esp8266com_index.json diff --git a/.travis.yml b/.travis.yml index c187c27123..858c284bc4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,12 @@ +# TravisCI left in repo as a backup CI solution in case GitHub CI suffers a +# major disruption. Only a few, quick tests are run in order to keep the +# TravisCI runtime equal to the GitHub CI time (to avoid bottlenecking on +# TravisCI). +# +# If GitHub CI goes away, it would make sense to drop this .YML file and +# use the complete one from release tag 2.7.2 + + language: bash os: linux dist: bionic @@ -9,146 +18,46 @@ git: before_install: - git submodule update --init # no recursive update -cache: - directories: - - $HOME/astyle - stages: - build - deploy + +# Run only 5 jobs since TravisCI only allows 5 in parallel jobs: include: - # Build stage. To save time, run all kinds of builds and tests in parallel. - - - name: "Platformio (1)" + - name: "Platform.IO" stage: build script: $TRAVIS_BUILD_DIR/tests/platformio.sh install: - sudo apt-get install python3-pip python3-setuptools env: - - BUILD_PARITY=even - - name: "Platformio (2)" - stage: build - script: $TRAVIS_BUILD_DIR/tests/platformio.sh - install: - - sudo apt-get install python3-pip python3-setuptools - env: - - BUILD_PARITY=odd + # PIO is very slow, so do 1/2 as many builds as Arduino + - BUILD_PARITY=custom mod=20 rem=5 - - name: "Build (1)" - stage: build - script: $TRAVIS_BUILD_DIR/tests/build.sh - env: - - BUILD_PARITY=even - - name: "Build (2)" + - name: "Build 1/4" stage: build script: $TRAVIS_BUILD_DIR/tests/build.sh env: - - BUILD_PARITY=odd + - BUILD_PARITY=custom mod=10 rem=1 - - name: "Debug (1)" - stage: build - script: $TRAVIS_BUILD_DIR/tests/debug.sh - env: - - BUILD_PARITY=even - - name: "Debug (2)" + - name: "Build 2/4" stage: build - script: $TRAVIS_BUILD_DIR/tests/debug.sh - env: - - BUILD_PARITY=odd - - - name: "Build IPv6 (1)" - stage: build - script: $TRAVIS_BUILD_DIR/tests/build6.sh - env: - - BUILD_PARITY=even - - name: "Build IPv6 (2)" - stage: build - script: $TRAVIS_BUILD_DIR/tests/build6.sh - env: - - BUILD_PARITY=odd - - - name: "Build lwIP-v1.4 (1)" - stage: build - script: $TRAVIS_BUILD_DIR/tests/build1.sh - env: - - BUILD_PARITY=even - - name: "Build lwIP-v1.4 (2)" - stage: build - script: $TRAVIS_BUILD_DIR/tests/build1.sh + script: $TRAVIS_BUILD_DIR/tests/build.sh env: - - BUILD_PARITY=odd + - BUILD_PARITY=custom mod=10 rem=2 - - name: "Mac OSX can build sketches" - os: osx + - name: "Build 3/4" stage: build script: $TRAVIS_BUILD_DIR/tests/build.sh - env: MACOSX=1 BUILD_PARITY=custom mod=500 rem=1 + env: + - BUILD_PARITY=custom mod=10 rem=3 - - name: "Windows can build sketches" - os: windows + - name: "Build 4/4" stage: build script: $TRAVIS_BUILD_DIR/tests/build.sh - env: WINDOWS=1 BUILD_PARITY=custom mod=500 rem=1 - - - name: "Host tests" - stage: build - script: $TRAVIS_BUILD_DIR/tests/ci/host_test.sh - install: - - sudo apt-get install valgrind lcov - - - name: "Docs" - stage: build - script: $TRAVIS_BUILD_DIR/tests/ci/build_docs.sh - install: - - sudo apt-get install python3-pip python3-setuptools - - pip3 install --user -r doc/requirements.txt; - - - name: "Style check" - stage: build - script: $TRAVIS_BUILD_DIR/tests/ci/style_check.sh - install: tests/ci/install_astyle.sh - - - name: "Mock trivial test" - stage: build - script: $TRAVIS_BUILD_DIR/tests/buildm.sh - - - name: "Boards" - stage: build - script: $TRAVIS_BUILD_DIR/tests/ci/build_boards.sh - - # Deploy stage. - # Here we build the package JSON (always) and do the deployments - - name: "Package / deploy" - stage: deploy - script: tests/ci/build_package.sh - env: BUILD_TYPE=package - before_deploy: git submodule update --init - deploy: - # Create Github release, upload artifacts - - provider: releases - draft: true - skip_cleanup: true - api_key: - secure: kYsxX/N21fwLSTLpbb0c96PnQHn1CIMqZstm02hfUhCX83FygWSh4vs3gzW28DMpjQMZ6vC4g+jtfosYU2tUhht/bynurDH4edpEyGeMyK+fzCI9pAr4JT0RbKQI84EC18ScpgP/UP0jTc1LJ+xl8UMwSiDE0mzHx7xJ4mMNQbA= - file_glob: true - tag_name: $TRAVIS_TAG - target_commitish: $TRAVIS_COMMIT - file: - - package/versions/$TRAVIS_TAG/esp8266-$TRAVIS_TAG.zip - - package/versions/$TRAVIS_TAG/package_esp8266com_index.json - on: - repo: esp8266/Arduino - tags: true - - # Update the package index URL to point to the new version - - provider: script - skip_cleanup: true - script: bash package/deploy_package_index.sh - on: - repo: esp8266/Arduino - tags: true + env: + - BUILD_PARITY=custom mod=10 rem=4 notifications: email: diff --git a/README.md b/README.md index 6b085aa5c9..c8cbb5217f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Arduino core for ESP8266 WiFi chip # Quick links -- [Latest release documentation](https://arduino-esp8266.readthedocs.io/en/2.7.1/) +- [Latest release documentation](https://arduino-esp8266.readthedocs.io/en/2.7.2/) - [Current "git version" documentation](https://arduino-esp8266.readthedocs.io/en/latest/) - [Install git version](https://arduino-esp8266.readthedocs.io/en/latest/installing.html#using-git-version) ([sources](doc/installing.rst#using-git-version)) @@ -36,7 +36,7 @@ Starting with 1.6.4, Arduino allows installation of third-party platform package #### Latest release [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/) Boards manager link: `https://arduino.esp8266.com/stable/package_esp8266com_index.json` -Documentation: [https://arduino-esp8266.readthedocs.io/en/2.7.1/](https://arduino-esp8266.readthedocs.io/en/2.7.1/) +Documentation: [https://arduino-esp8266.readthedocs.io/en/2.7.2/](https://arduino-esp8266.readthedocs.io/en/2.7.2/) ### Using git version [![Linux build status](https://travis-ci.org/esp8266/Arduino.svg)](https://travis-ci.org/esp8266/Arduino) diff --git a/boards.txt b/boards.txt index 3d2c355c29..ba4c7e6e04 100644 --- a/boards.txt +++ b/boards.txt @@ -19,6 +19,7 @@ menu.lvl=Debug Level menu.ip=lwIP Variant menu.vt=VTables menu.exception=Exceptions +menu.stacksmash=Stack Protection menu.wipe=Erase Flash menu.sdk=Espressif FW menu.ssl=SSL Support @@ -57,6 +58,10 @@ generic.menu.exception.disabled.build.stdcpp_lib=-lstdc++ generic.menu.exception.enabled=Enabled generic.menu.exception.enabled.build.exception_flags=-fexceptions generic.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +generic.menu.stacksmash.disabled=Disabled +generic.menu.stacksmash.disabled.build.stacksmash_flags= +generic.menu.stacksmash.enabled=Enabled +generic.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector generic.menu.ssl.all=All SSL ciphers (most compatible) generic.menu.ssl.all.build.sslflags= generic.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -408,13 +413,6 @@ generic.menu.ip.hb6f=v2 IPv6 Higher Bandwidth generic.menu.ip.hb6f.build.lwip_include=lwip2/include generic.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat generic.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -generic.menu.ip.hb1=v1.4 Higher Bandwidth -generic.menu.ip.hb1.build.lwip_lib=-llwip_gcc -generic.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -generic.menu.ip.src=v1.4 Compile from source -generic.menu.ip.src.build.lwip_lib=-llwip_src -generic.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -generic.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" generic.menu.dbg.Disabled=Disabled generic.menu.dbg.Disabled.build.debug_port= generic.menu.dbg.Serial=Serial @@ -532,6 +530,10 @@ esp8285.menu.exception.disabled.build.stdcpp_lib=-lstdc++ esp8285.menu.exception.enabled=Enabled esp8285.menu.exception.enabled.build.exception_flags=-fexceptions esp8285.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +esp8285.menu.stacksmash.disabled=Disabled +esp8285.menu.stacksmash.disabled.build.stacksmash_flags= +esp8285.menu.stacksmash.enabled=Enabled +esp8285.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector esp8285.menu.ssl.all=All SSL ciphers (most compatible) esp8285.menu.ssl.all.build.sslflags= esp8285.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -740,13 +742,6 @@ esp8285.menu.ip.hb6f=v2 IPv6 Higher Bandwidth esp8285.menu.ip.hb6f.build.lwip_include=lwip2/include esp8285.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat esp8285.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -esp8285.menu.ip.hb1=v1.4 Higher Bandwidth -esp8285.menu.ip.hb1.build.lwip_lib=-llwip_gcc -esp8285.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -esp8285.menu.ip.src=v1.4 Compile from source -esp8285.menu.ip.src.build.lwip_lib=-llwip_src -esp8285.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -esp8285.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" esp8285.menu.dbg.Disabled=Disabled esp8285.menu.dbg.Disabled.build.debug_port= esp8285.menu.dbg.Serial=Serial @@ -873,6 +868,10 @@ espduino.menu.exception.disabled.build.stdcpp_lib=-lstdc++ espduino.menu.exception.enabled=Enabled espduino.menu.exception.enabled.build.exception_flags=-fexceptions espduino.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +espduino.menu.stacksmash.disabled=Disabled +espduino.menu.stacksmash.disabled.build.stacksmash_flags= +espduino.menu.stacksmash.enabled=Enabled +espduino.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector espduino.menu.ssl.all=All SSL ciphers (most compatible) espduino.menu.ssl.all.build.sslflags= espduino.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -941,13 +940,6 @@ espduino.menu.ip.hb6f=v2 IPv6 Higher Bandwidth espduino.menu.ip.hb6f.build.lwip_include=lwip2/include espduino.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat espduino.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -espduino.menu.ip.hb1=v1.4 Higher Bandwidth -espduino.menu.ip.hb1.build.lwip_lib=-llwip_gcc -espduino.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -espduino.menu.ip.src=v1.4 Compile from source -espduino.menu.ip.src.build.lwip_lib=-llwip_src -espduino.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -espduino.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" espduino.menu.dbg.Disabled=Disabled espduino.menu.dbg.Disabled.build.debug_port= espduino.menu.dbg.Serial=Serial @@ -1065,6 +1057,10 @@ huzzah.menu.exception.disabled.build.stdcpp_lib=-lstdc++ huzzah.menu.exception.enabled=Enabled huzzah.menu.exception.enabled.build.exception_flags=-fexceptions huzzah.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +huzzah.menu.stacksmash.disabled=Disabled +huzzah.menu.stacksmash.disabled.build.stacksmash_flags= +huzzah.menu.stacksmash.enabled=Enabled +huzzah.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector huzzah.menu.ssl.all=All SSL ciphers (most compatible) huzzah.menu.ssl.all.build.sslflags= huzzah.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -1134,13 +1130,6 @@ huzzah.menu.ip.hb6f=v2 IPv6 Higher Bandwidth huzzah.menu.ip.hb6f.build.lwip_include=lwip2/include huzzah.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat huzzah.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -huzzah.menu.ip.hb1=v1.4 Higher Bandwidth -huzzah.menu.ip.hb1.build.lwip_lib=-llwip_gcc -huzzah.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -huzzah.menu.ip.src=v1.4 Compile from source -huzzah.menu.ip.src.build.lwip_lib=-llwip_src -huzzah.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -huzzah.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" huzzah.menu.dbg.Disabled=Disabled huzzah.menu.dbg.Disabled.build.debug_port= huzzah.menu.dbg.Serial=Serial @@ -1258,6 +1247,10 @@ inventone.menu.exception.disabled.build.stdcpp_lib=-lstdc++ inventone.menu.exception.enabled=Enabled inventone.menu.exception.enabled.build.exception_flags=-fexceptions inventone.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +inventone.menu.stacksmash.disabled=Disabled +inventone.menu.stacksmash.disabled.build.stacksmash_flags= +inventone.menu.stacksmash.enabled=Enabled +inventone.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector inventone.menu.ssl.all=All SSL ciphers (most compatible) inventone.menu.ssl.all.build.sslflags= inventone.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -1327,13 +1320,6 @@ inventone.menu.ip.hb6f=v2 IPv6 Higher Bandwidth inventone.menu.ip.hb6f.build.lwip_include=lwip2/include inventone.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat inventone.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -inventone.menu.ip.hb1=v1.4 Higher Bandwidth -inventone.menu.ip.hb1.build.lwip_lib=-llwip_gcc -inventone.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -inventone.menu.ip.src=v1.4 Compile from source -inventone.menu.ip.src.build.lwip_lib=-llwip_src -inventone.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -inventone.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" inventone.menu.dbg.Disabled=Disabled inventone.menu.dbg.Disabled.build.debug_port= inventone.menu.dbg.Serial=Serial @@ -1451,6 +1437,10 @@ cw01.menu.exception.disabled.build.stdcpp_lib=-lstdc++ cw01.menu.exception.enabled=Enabled cw01.menu.exception.enabled.build.exception_flags=-fexceptions cw01.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +cw01.menu.stacksmash.disabled=Disabled +cw01.menu.stacksmash.disabled.build.stacksmash_flags= +cw01.menu.stacksmash.enabled=Enabled +cw01.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector cw01.menu.ssl.all=All SSL ciphers (most compatible) cw01.menu.ssl.all.build.sslflags= cw01.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -1523,13 +1513,6 @@ cw01.menu.ip.hb6f=v2 IPv6 Higher Bandwidth cw01.menu.ip.hb6f.build.lwip_include=lwip2/include cw01.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat cw01.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -cw01.menu.ip.hb1=v1.4 Higher Bandwidth -cw01.menu.ip.hb1.build.lwip_lib=-llwip_gcc -cw01.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -cw01.menu.ip.src=v1.4 Compile from source -cw01.menu.ip.src.build.lwip_lib=-llwip_src -cw01.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -cw01.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" cw01.menu.dbg.Disabled=Disabled cw01.menu.dbg.Disabled.build.debug_port= cw01.menu.dbg.Serial=Serial @@ -1647,6 +1630,10 @@ espresso_lite_v1.menu.exception.disabled.build.stdcpp_lib=-lstdc++ espresso_lite_v1.menu.exception.enabled=Enabled espresso_lite_v1.menu.exception.enabled.build.exception_flags=-fexceptions espresso_lite_v1.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +espresso_lite_v1.menu.stacksmash.disabled=Disabled +espresso_lite_v1.menu.stacksmash.disabled.build.stacksmash_flags= +espresso_lite_v1.menu.stacksmash.enabled=Enabled +espresso_lite_v1.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector espresso_lite_v1.menu.ssl.all=All SSL ciphers (most compatible) espresso_lite_v1.menu.ssl.all.build.sslflags= espresso_lite_v1.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -1719,13 +1706,6 @@ espresso_lite_v1.menu.ip.hb6f=v2 IPv6 Higher Bandwidth espresso_lite_v1.menu.ip.hb6f.build.lwip_include=lwip2/include espresso_lite_v1.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat espresso_lite_v1.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -espresso_lite_v1.menu.ip.hb1=v1.4 Higher Bandwidth -espresso_lite_v1.menu.ip.hb1.build.lwip_lib=-llwip_gcc -espresso_lite_v1.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -espresso_lite_v1.menu.ip.src=v1.4 Compile from source -espresso_lite_v1.menu.ip.src.build.lwip_lib=-llwip_src -espresso_lite_v1.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -espresso_lite_v1.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" espresso_lite_v1.menu.dbg.Disabled=Disabled espresso_lite_v1.menu.dbg.Disabled.build.debug_port= espresso_lite_v1.menu.dbg.Serial=Serial @@ -1843,6 +1823,10 @@ espresso_lite_v2.menu.exception.disabled.build.stdcpp_lib=-lstdc++ espresso_lite_v2.menu.exception.enabled=Enabled espresso_lite_v2.menu.exception.enabled.build.exception_flags=-fexceptions espresso_lite_v2.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +espresso_lite_v2.menu.stacksmash.disabled=Disabled +espresso_lite_v2.menu.stacksmash.disabled.build.stacksmash_flags= +espresso_lite_v2.menu.stacksmash.enabled=Enabled +espresso_lite_v2.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector espresso_lite_v2.menu.ssl.all=All SSL ciphers (most compatible) espresso_lite_v2.menu.ssl.all.build.sslflags= espresso_lite_v2.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -1915,13 +1899,6 @@ espresso_lite_v2.menu.ip.hb6f=v2 IPv6 Higher Bandwidth espresso_lite_v2.menu.ip.hb6f.build.lwip_include=lwip2/include espresso_lite_v2.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat espresso_lite_v2.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -espresso_lite_v2.menu.ip.hb1=v1.4 Higher Bandwidth -espresso_lite_v2.menu.ip.hb1.build.lwip_lib=-llwip_gcc -espresso_lite_v2.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -espresso_lite_v2.menu.ip.src=v1.4 Compile from source -espresso_lite_v2.menu.ip.src.build.lwip_lib=-llwip_src -espresso_lite_v2.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -espresso_lite_v2.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" espresso_lite_v2.menu.dbg.Disabled=Disabled espresso_lite_v2.menu.dbg.Disabled.build.debug_port= espresso_lite_v2.menu.dbg.Serial=Serial @@ -2039,6 +2016,10 @@ phoenix_v1.menu.exception.disabled.build.stdcpp_lib=-lstdc++ phoenix_v1.menu.exception.enabled=Enabled phoenix_v1.menu.exception.enabled.build.exception_flags=-fexceptions phoenix_v1.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +phoenix_v1.menu.stacksmash.disabled=Disabled +phoenix_v1.menu.stacksmash.disabled.build.stacksmash_flags= +phoenix_v1.menu.stacksmash.enabled=Enabled +phoenix_v1.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector phoenix_v1.menu.ssl.all=All SSL ciphers (most compatible) phoenix_v1.menu.ssl.all.build.sslflags= phoenix_v1.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -2111,13 +2092,6 @@ phoenix_v1.menu.ip.hb6f=v2 IPv6 Higher Bandwidth phoenix_v1.menu.ip.hb6f.build.lwip_include=lwip2/include phoenix_v1.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat phoenix_v1.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -phoenix_v1.menu.ip.hb1=v1.4 Higher Bandwidth -phoenix_v1.menu.ip.hb1.build.lwip_lib=-llwip_gcc -phoenix_v1.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -phoenix_v1.menu.ip.src=v1.4 Compile from source -phoenix_v1.menu.ip.src.build.lwip_lib=-llwip_src -phoenix_v1.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -phoenix_v1.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" phoenix_v1.menu.dbg.Disabled=Disabled phoenix_v1.menu.dbg.Disabled.build.debug_port= phoenix_v1.menu.dbg.Serial=Serial @@ -2235,6 +2209,10 @@ phoenix_v2.menu.exception.disabled.build.stdcpp_lib=-lstdc++ phoenix_v2.menu.exception.enabled=Enabled phoenix_v2.menu.exception.enabled.build.exception_flags=-fexceptions phoenix_v2.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +phoenix_v2.menu.stacksmash.disabled=Disabled +phoenix_v2.menu.stacksmash.disabled.build.stacksmash_flags= +phoenix_v2.menu.stacksmash.enabled=Enabled +phoenix_v2.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector phoenix_v2.menu.ssl.all=All SSL ciphers (most compatible) phoenix_v2.menu.ssl.all.build.sslflags= phoenix_v2.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -2307,13 +2285,6 @@ phoenix_v2.menu.ip.hb6f=v2 IPv6 Higher Bandwidth phoenix_v2.menu.ip.hb6f.build.lwip_include=lwip2/include phoenix_v2.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat phoenix_v2.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -phoenix_v2.menu.ip.hb1=v1.4 Higher Bandwidth -phoenix_v2.menu.ip.hb1.build.lwip_lib=-llwip_gcc -phoenix_v2.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -phoenix_v2.menu.ip.src=v1.4 Compile from source -phoenix_v2.menu.ip.src.build.lwip_lib=-llwip_src -phoenix_v2.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -phoenix_v2.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" phoenix_v2.menu.dbg.Disabled=Disabled phoenix_v2.menu.dbg.Disabled.build.debug_port= phoenix_v2.menu.dbg.Serial=Serial @@ -2431,6 +2402,10 @@ nodemcu.menu.exception.disabled.build.stdcpp_lib=-lstdc++ nodemcu.menu.exception.enabled=Enabled nodemcu.menu.exception.enabled.build.exception_flags=-fexceptions nodemcu.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +nodemcu.menu.stacksmash.disabled=Disabled +nodemcu.menu.stacksmash.disabled.build.stacksmash_flags= +nodemcu.menu.stacksmash.enabled=Enabled +nodemcu.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector nodemcu.menu.ssl.all=All SSL ciphers (most compatible) nodemcu.menu.ssl.all.build.sslflags= nodemcu.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -2500,13 +2475,6 @@ nodemcu.menu.ip.hb6f=v2 IPv6 Higher Bandwidth nodemcu.menu.ip.hb6f.build.lwip_include=lwip2/include nodemcu.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat nodemcu.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -nodemcu.menu.ip.hb1=v1.4 Higher Bandwidth -nodemcu.menu.ip.hb1.build.lwip_lib=-llwip_gcc -nodemcu.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -nodemcu.menu.ip.src=v1.4 Compile from source -nodemcu.menu.ip.src.build.lwip_lib=-llwip_src -nodemcu.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -nodemcu.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" nodemcu.menu.dbg.Disabled=Disabled nodemcu.menu.dbg.Disabled.build.debug_port= nodemcu.menu.dbg.Serial=Serial @@ -2624,6 +2592,10 @@ nodemcuv2.menu.exception.disabled.build.stdcpp_lib=-lstdc++ nodemcuv2.menu.exception.enabled=Enabled nodemcuv2.menu.exception.enabled.build.exception_flags=-fexceptions nodemcuv2.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +nodemcuv2.menu.stacksmash.disabled=Disabled +nodemcuv2.menu.stacksmash.disabled.build.stacksmash_flags= +nodemcuv2.menu.stacksmash.enabled=Enabled +nodemcuv2.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector nodemcuv2.menu.ssl.all=All SSL ciphers (most compatible) nodemcuv2.menu.ssl.all.build.sslflags= nodemcuv2.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -2697,13 +2669,6 @@ nodemcuv2.menu.ip.hb6f=v2 IPv6 Higher Bandwidth nodemcuv2.menu.ip.hb6f.build.lwip_include=lwip2/include nodemcuv2.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat nodemcuv2.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -nodemcuv2.menu.ip.hb1=v1.4 Higher Bandwidth -nodemcuv2.menu.ip.hb1.build.lwip_lib=-llwip_gcc -nodemcuv2.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -nodemcuv2.menu.ip.src=v1.4 Compile from source -nodemcuv2.menu.ip.src.build.lwip_lib=-llwip_src -nodemcuv2.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -nodemcuv2.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" nodemcuv2.menu.dbg.Disabled=Disabled nodemcuv2.menu.dbg.Disabled.build.debug_port= nodemcuv2.menu.dbg.Serial=Serial @@ -2821,6 +2786,10 @@ modwifi.menu.exception.disabled.build.stdcpp_lib=-lstdc++ modwifi.menu.exception.enabled=Enabled modwifi.menu.exception.enabled.build.exception_flags=-fexceptions modwifi.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +modwifi.menu.stacksmash.disabled=Disabled +modwifi.menu.stacksmash.disabled.build.stacksmash_flags= +modwifi.menu.stacksmash.enabled=Enabled +modwifi.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector modwifi.menu.ssl.all=All SSL ciphers (most compatible) modwifi.menu.ssl.all.build.sslflags= modwifi.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -2910,13 +2879,6 @@ modwifi.menu.ip.hb6f=v2 IPv6 Higher Bandwidth modwifi.menu.ip.hb6f.build.lwip_include=lwip2/include modwifi.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat modwifi.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -modwifi.menu.ip.hb1=v1.4 Higher Bandwidth -modwifi.menu.ip.hb1.build.lwip_lib=-llwip_gcc -modwifi.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -modwifi.menu.ip.src=v1.4 Compile from source -modwifi.menu.ip.src.build.lwip_lib=-llwip_src -modwifi.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -modwifi.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" modwifi.menu.dbg.Disabled=Disabled modwifi.menu.dbg.Disabled.build.debug_port= modwifi.menu.dbg.Serial=Serial @@ -3034,6 +2996,10 @@ thing.menu.exception.disabled.build.stdcpp_lib=-lstdc++ thing.menu.exception.enabled=Enabled thing.menu.exception.enabled.build.exception_flags=-fexceptions thing.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +thing.menu.stacksmash.disabled=Disabled +thing.menu.stacksmash.disabled.build.stacksmash_flags= +thing.menu.stacksmash.enabled=Enabled +thing.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector thing.menu.ssl.all=All SSL ciphers (most compatible) thing.menu.ssl.all.build.sslflags= thing.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -3103,13 +3069,6 @@ thing.menu.ip.hb6f=v2 IPv6 Higher Bandwidth thing.menu.ip.hb6f.build.lwip_include=lwip2/include thing.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat thing.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -thing.menu.ip.hb1=v1.4 Higher Bandwidth -thing.menu.ip.hb1.build.lwip_lib=-llwip_gcc -thing.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -thing.menu.ip.src=v1.4 Compile from source -thing.menu.ip.src.build.lwip_lib=-llwip_src -thing.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -thing.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" thing.menu.dbg.Disabled=Disabled thing.menu.dbg.Disabled.build.debug_port= thing.menu.dbg.Serial=Serial @@ -3227,6 +3186,10 @@ thingdev.menu.exception.disabled.build.stdcpp_lib=-lstdc++ thingdev.menu.exception.enabled=Enabled thingdev.menu.exception.enabled.build.exception_flags=-fexceptions thingdev.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +thingdev.menu.stacksmash.disabled=Disabled +thingdev.menu.stacksmash.disabled.build.stacksmash_flags= +thingdev.menu.stacksmash.enabled=Enabled +thingdev.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector thingdev.menu.ssl.all=All SSL ciphers (most compatible) thingdev.menu.ssl.all.build.sslflags= thingdev.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -3296,13 +3259,6 @@ thingdev.menu.ip.hb6f=v2 IPv6 Higher Bandwidth thingdev.menu.ip.hb6f.build.lwip_include=lwip2/include thingdev.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat thingdev.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -thingdev.menu.ip.hb1=v1.4 Higher Bandwidth -thingdev.menu.ip.hb1.build.lwip_lib=-llwip_gcc -thingdev.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -thingdev.menu.ip.src=v1.4 Compile from source -thingdev.menu.ip.src.build.lwip_lib=-llwip_src -thingdev.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -thingdev.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" thingdev.menu.dbg.Disabled=Disabled thingdev.menu.dbg.Disabled.build.debug_port= thingdev.menu.dbg.Serial=Serial @@ -3420,6 +3376,10 @@ blynk.menu.exception.disabled.build.stdcpp_lib=-lstdc++ blynk.menu.exception.enabled=Enabled blynk.menu.exception.enabled.build.exception_flags=-fexceptions blynk.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +blynk.menu.stacksmash.disabled=Disabled +blynk.menu.stacksmash.disabled.build.stacksmash_flags= +blynk.menu.stacksmash.enabled=Enabled +blynk.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector blynk.menu.ssl.all=All SSL ciphers (most compatible) blynk.menu.ssl.all.build.sslflags= blynk.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -3489,13 +3449,6 @@ blynk.menu.ip.hb6f=v2 IPv6 Higher Bandwidth blynk.menu.ip.hb6f.build.lwip_include=lwip2/include blynk.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat blynk.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -blynk.menu.ip.hb1=v1.4 Higher Bandwidth -blynk.menu.ip.hb1.build.lwip_lib=-llwip_gcc -blynk.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -blynk.menu.ip.src=v1.4 Compile from source -blynk.menu.ip.src.build.lwip_lib=-llwip_src -blynk.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -blynk.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" blynk.menu.dbg.Disabled=Disabled blynk.menu.dbg.Disabled.build.debug_port= blynk.menu.dbg.Serial=Serial @@ -3613,6 +3566,10 @@ esp210.menu.exception.disabled.build.stdcpp_lib=-lstdc++ esp210.menu.exception.enabled=Enabled esp210.menu.exception.enabled.build.exception_flags=-fexceptions esp210.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +esp210.menu.stacksmash.disabled=Disabled +esp210.menu.stacksmash.disabled.build.stacksmash_flags= +esp210.menu.stacksmash.enabled=Enabled +esp210.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector esp210.menu.ssl.all=All SSL ciphers (most compatible) esp210.menu.ssl.all.build.sslflags= esp210.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -3682,13 +3639,6 @@ esp210.menu.ip.hb6f=v2 IPv6 Higher Bandwidth esp210.menu.ip.hb6f.build.lwip_include=lwip2/include esp210.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat esp210.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -esp210.menu.ip.hb1=v1.4 Higher Bandwidth -esp210.menu.ip.hb1.build.lwip_lib=-llwip_gcc -esp210.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -esp210.menu.ip.src=v1.4 Compile from source -esp210.menu.ip.src.build.lwip_lib=-llwip_src -esp210.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -esp210.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" esp210.menu.dbg.Disabled=Disabled esp210.menu.dbg.Disabled.build.debug_port= esp210.menu.dbg.Serial=Serial @@ -3806,6 +3756,10 @@ d1_mini.menu.exception.disabled.build.stdcpp_lib=-lstdc++ d1_mini.menu.exception.enabled=Enabled d1_mini.menu.exception.enabled.build.exception_flags=-fexceptions d1_mini.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +d1_mini.menu.stacksmash.disabled=Disabled +d1_mini.menu.stacksmash.disabled.build.stacksmash_flags= +d1_mini.menu.stacksmash.enabled=Enabled +d1_mini.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector d1_mini.menu.ssl.all=All SSL ciphers (most compatible) d1_mini.menu.ssl.all.build.sslflags= d1_mini.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -3875,13 +3829,6 @@ d1_mini.menu.ip.hb6f=v2 IPv6 Higher Bandwidth d1_mini.menu.ip.hb6f.build.lwip_include=lwip2/include d1_mini.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat d1_mini.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -d1_mini.menu.ip.hb1=v1.4 Higher Bandwidth -d1_mini.menu.ip.hb1.build.lwip_lib=-llwip_gcc -d1_mini.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini.menu.ip.src=v1.4 Compile from source -d1_mini.menu.ip.src.build.lwip_lib=-llwip_src -d1_mini.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" d1_mini.menu.dbg.Disabled=Disabled d1_mini.menu.dbg.Disabled.build.debug_port= d1_mini.menu.dbg.Serial=Serial @@ -3999,6 +3946,10 @@ d1_mini_pro.menu.exception.disabled.build.stdcpp_lib=-lstdc++ d1_mini_pro.menu.exception.enabled=Enabled d1_mini_pro.menu.exception.enabled.build.exception_flags=-fexceptions d1_mini_pro.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +d1_mini_pro.menu.stacksmash.disabled=Disabled +d1_mini_pro.menu.stacksmash.disabled.build.stacksmash_flags= +d1_mini_pro.menu.stacksmash.enabled=Enabled +d1_mini_pro.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector d1_mini_pro.menu.ssl.all=All SSL ciphers (most compatible) d1_mini_pro.menu.ssl.all.build.sslflags= d1_mini_pro.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -4051,13 +4002,6 @@ d1_mini_pro.menu.ip.hb6f=v2 IPv6 Higher Bandwidth d1_mini_pro.menu.ip.hb6f.build.lwip_include=lwip2/include d1_mini_pro.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat d1_mini_pro.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -d1_mini_pro.menu.ip.hb1=v1.4 Higher Bandwidth -d1_mini_pro.menu.ip.hb1.build.lwip_lib=-llwip_gcc -d1_mini_pro.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini_pro.menu.ip.src=v1.4 Compile from source -d1_mini_pro.menu.ip.src.build.lwip_lib=-llwip_src -d1_mini_pro.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini_pro.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" d1_mini_pro.menu.dbg.Disabled=Disabled d1_mini_pro.menu.dbg.Disabled.build.debug_port= d1_mini_pro.menu.dbg.Serial=Serial @@ -4175,6 +4119,10 @@ d1_mini_lite.menu.exception.disabled.build.stdcpp_lib=-lstdc++ d1_mini_lite.menu.exception.enabled=Enabled d1_mini_lite.menu.exception.enabled.build.exception_flags=-fexceptions d1_mini_lite.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +d1_mini_lite.menu.stacksmash.disabled=Disabled +d1_mini_lite.menu.stacksmash.disabled.build.stacksmash_flags= +d1_mini_lite.menu.stacksmash.enabled=Enabled +d1_mini_lite.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector d1_mini_lite.menu.ssl.all=All SSL ciphers (most compatible) d1_mini_lite.menu.ssl.all.build.sslflags= d1_mini_lite.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -4284,13 +4232,6 @@ d1_mini_lite.menu.ip.hb6f=v2 IPv6 Higher Bandwidth d1_mini_lite.menu.ip.hb6f.build.lwip_include=lwip2/include d1_mini_lite.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat d1_mini_lite.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -d1_mini_lite.menu.ip.hb1=v1.4 Higher Bandwidth -d1_mini_lite.menu.ip.hb1.build.lwip_lib=-llwip_gcc -d1_mini_lite.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini_lite.menu.ip.src=v1.4 Compile from source -d1_mini_lite.menu.ip.src.build.lwip_lib=-llwip_src -d1_mini_lite.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini_lite.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" d1_mini_lite.menu.dbg.Disabled=Disabled d1_mini_lite.menu.dbg.Disabled.build.debug_port= d1_mini_lite.menu.dbg.Serial=Serial @@ -4408,6 +4349,10 @@ d1.menu.exception.disabled.build.stdcpp_lib=-lstdc++ d1.menu.exception.enabled=Enabled d1.menu.exception.enabled.build.exception_flags=-fexceptions d1.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +d1.menu.stacksmash.disabled=Disabled +d1.menu.stacksmash.disabled.build.stacksmash_flags= +d1.menu.stacksmash.enabled=Enabled +d1.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector d1.menu.ssl.all=All SSL ciphers (most compatible) d1.menu.ssl.all.build.sslflags= d1.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -4477,13 +4422,6 @@ d1.menu.ip.hb6f=v2 IPv6 Higher Bandwidth d1.menu.ip.hb6f.build.lwip_include=lwip2/include d1.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat d1.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -d1.menu.ip.hb1=v1.4 Higher Bandwidth -d1.menu.ip.hb1.build.lwip_lib=-llwip_gcc -d1.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -d1.menu.ip.src=v1.4 Compile from source -d1.menu.ip.src.build.lwip_lib=-llwip_src -d1.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -d1.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" d1.menu.dbg.Disabled=Disabled d1.menu.dbg.Disabled.build.debug_port= d1.menu.dbg.Serial=Serial @@ -4601,6 +4539,10 @@ espino.menu.exception.disabled.build.stdcpp_lib=-lstdc++ espino.menu.exception.enabled=Enabled espino.menu.exception.enabled.build.exception_flags=-fexceptions espino.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +espino.menu.stacksmash.disabled=Disabled +espino.menu.stacksmash.disabled.build.stacksmash_flags= +espino.menu.stacksmash.enabled=Enabled +espino.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector espino.menu.ssl.all=All SSL ciphers (most compatible) espino.menu.ssl.all.build.sslflags= espino.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -4673,13 +4615,6 @@ espino.menu.ip.hb6f=v2 IPv6 Higher Bandwidth espino.menu.ip.hb6f.build.lwip_include=lwip2/include espino.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat espino.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -espino.menu.ip.hb1=v1.4 Higher Bandwidth -espino.menu.ip.hb1.build.lwip_lib=-llwip_gcc -espino.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -espino.menu.ip.src=v1.4 Compile from source -espino.menu.ip.src.build.lwip_lib=-llwip_src -espino.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -espino.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" espino.menu.dbg.Disabled=Disabled espino.menu.dbg.Disabled.build.debug_port= espino.menu.dbg.Serial=Serial @@ -4797,6 +4732,10 @@ espinotee.menu.exception.disabled.build.stdcpp_lib=-lstdc++ espinotee.menu.exception.enabled=Enabled espinotee.menu.exception.enabled.build.exception_flags=-fexceptions espinotee.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +espinotee.menu.stacksmash.disabled=Disabled +espinotee.menu.stacksmash.disabled.build.stacksmash_flags= +espinotee.menu.stacksmash.enabled=Enabled +espinotee.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector espinotee.menu.ssl.all=All SSL ciphers (most compatible) espinotee.menu.ssl.all.build.sslflags= espinotee.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -4866,13 +4805,6 @@ espinotee.menu.ip.hb6f=v2 IPv6 Higher Bandwidth espinotee.menu.ip.hb6f.build.lwip_include=lwip2/include espinotee.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat espinotee.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -espinotee.menu.ip.hb1=v1.4 Higher Bandwidth -espinotee.menu.ip.hb1.build.lwip_lib=-llwip_gcc -espinotee.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -espinotee.menu.ip.src=v1.4 Compile from source -espinotee.menu.ip.src.build.lwip_lib=-llwip_src -espinotee.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -espinotee.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" espinotee.menu.dbg.Disabled=Disabled espinotee.menu.dbg.Disabled.build.debug_port= espinotee.menu.dbg.Serial=Serial @@ -5007,6 +4939,10 @@ wifinfo.menu.exception.disabled.build.stdcpp_lib=-lstdc++ wifinfo.menu.exception.enabled=Enabled wifinfo.menu.exception.enabled.build.exception_flags=-fexceptions wifinfo.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +wifinfo.menu.stacksmash.disabled=Disabled +wifinfo.menu.stacksmash.disabled.build.stacksmash_flags= +wifinfo.menu.stacksmash.enabled=Enabled +wifinfo.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector wifinfo.menu.ssl.all=All SSL ciphers (most compatible) wifinfo.menu.ssl.all.build.sslflags= wifinfo.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -5123,13 +5059,6 @@ wifinfo.menu.ip.hb6f=v2 IPv6 Higher Bandwidth wifinfo.menu.ip.hb6f.build.lwip_include=lwip2/include wifinfo.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat wifinfo.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -wifinfo.menu.ip.hb1=v1.4 Higher Bandwidth -wifinfo.menu.ip.hb1.build.lwip_lib=-llwip_gcc -wifinfo.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -wifinfo.menu.ip.src=v1.4 Compile from source -wifinfo.menu.ip.src.build.lwip_lib=-llwip_src -wifinfo.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -wifinfo.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" wifinfo.menu.dbg.Disabled=Disabled wifinfo.menu.dbg.Disabled.build.debug_port= wifinfo.menu.dbg.Serial=Serial @@ -5259,6 +5188,10 @@ arduino-esp8266.menu.exception.disabled.build.stdcpp_lib=-lstdc++ arduino-esp8266.menu.exception.enabled=Enabled arduino-esp8266.menu.exception.enabled.build.exception_flags=-fexceptions arduino-esp8266.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +arduino-esp8266.menu.stacksmash.disabled=Disabled +arduino-esp8266.menu.stacksmash.disabled.build.stacksmash_flags= +arduino-esp8266.menu.stacksmash.enabled=Enabled +arduino-esp8266.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector arduino-esp8266.menu.ssl.all=All SSL ciphers (most compatible) arduino-esp8266.menu.ssl.all.build.sslflags= arduino-esp8266.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -5328,13 +5261,6 @@ arduino-esp8266.menu.ip.hb6f=v2 IPv6 Higher Bandwidth arduino-esp8266.menu.ip.hb6f.build.lwip_include=lwip2/include arduino-esp8266.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat arduino-esp8266.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -arduino-esp8266.menu.ip.hb1=v1.4 Higher Bandwidth -arduino-esp8266.menu.ip.hb1.build.lwip_lib=-llwip_gcc -arduino-esp8266.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -arduino-esp8266.menu.ip.src=v1.4 Compile from source -arduino-esp8266.menu.ip.src.build.lwip_lib=-llwip_src -arduino-esp8266.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -arduino-esp8266.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" arduino-esp8266.menu.dbg.Disabled=Disabled arduino-esp8266.menu.dbg.Disabled.build.debug_port= arduino-esp8266.menu.dbg.Serial=Serial @@ -5453,14 +5379,85 @@ gen4iod.menu.exception.disabled.build.stdcpp_lib=-lstdc++ gen4iod.menu.exception.enabled=Enabled gen4iod.menu.exception.enabled.build.exception_flags=-fexceptions gen4iod.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +gen4iod.menu.stacksmash.disabled=Disabled +gen4iod.menu.stacksmash.disabled.build.stacksmash_flags= +gen4iod.menu.stacksmash.enabled=Enabled +gen4iod.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector gen4iod.menu.ssl.all=All SSL ciphers (most compatible) gen4iod.menu.ssl.all.build.sslflags= gen4iod.menu.ssl.basic=Basic SSL ciphers (lower ROM use) gen4iod.menu.ssl.basic.build.sslflags=-DBEARSSL_SSL_BASIC gen4iod.upload.resetmethod=--before default_reset --after hard_reset -gen4iod.build.flash_mode=dio -gen4iod.build.flash_flags=-DFLASHMODE_DIO +gen4iod.menu.FlashMode.dout=DOUT (compatible) +gen4iod.menu.FlashMode.dout.build.flash_mode=dout +gen4iod.menu.FlashMode.dout.build.flash_flags=-DFLASHMODE_DOUT +gen4iod.menu.FlashMode.dio=DIO +gen4iod.menu.FlashMode.dio.build.flash_mode=dio +gen4iod.menu.FlashMode.dio.build.flash_flags=-DFLASHMODE_DIO +gen4iod.menu.FlashMode.qout=QOUT +gen4iod.menu.FlashMode.qout.build.flash_mode=qout +gen4iod.menu.FlashMode.qout.build.flash_flags=-DFLASHMODE_QOUT +gen4iod.menu.FlashMode.qio=QIO (fast) +gen4iod.menu.FlashMode.qio.build.flash_mode=qio +gen4iod.menu.FlashMode.qio.build.flash_flags=-DFLASHMODE_QIO gen4iod.build.flash_freq=80 +gen4iod.menu.eesz.2M64=2MB (FS:64KB OTA:~992KB) +gen4iod.menu.eesz.2M64.build.flash_size=2M +gen4iod.menu.eesz.2M64.build.flash_size_bytes=0x200000 +gen4iod.menu.eesz.2M64.build.flash_ld=eagle.flash.2m64.ld +gen4iod.menu.eesz.2M64.build.spiffs_pagesize=256 +gen4iod.menu.eesz.2M64.upload.maximum_size=1044464 +gen4iod.menu.eesz.2M64.build.rfcal_addr=0x1FC000 +gen4iod.menu.eesz.2M64.build.spiffs_start=0x1F0000 +gen4iod.menu.eesz.2M64.build.spiffs_end=0x1FB000 +gen4iod.menu.eesz.2M64.build.spiffs_blocksize=4096 +gen4iod.menu.eesz.2M128=2MB (FS:128KB OTA:~960KB) +gen4iod.menu.eesz.2M128.build.flash_size=2M +gen4iod.menu.eesz.2M128.build.flash_size_bytes=0x200000 +gen4iod.menu.eesz.2M128.build.flash_ld=eagle.flash.2m128.ld +gen4iod.menu.eesz.2M128.build.spiffs_pagesize=256 +gen4iod.menu.eesz.2M128.upload.maximum_size=1044464 +gen4iod.menu.eesz.2M128.build.rfcal_addr=0x1FC000 +gen4iod.menu.eesz.2M128.build.spiffs_start=0x1E0000 +gen4iod.menu.eesz.2M128.build.spiffs_end=0x1FB000 +gen4iod.menu.eesz.2M128.build.spiffs_blocksize=4096 +gen4iod.menu.eesz.2M256=2MB (FS:256KB OTA:~896KB) +gen4iod.menu.eesz.2M256.build.flash_size=2M +gen4iod.menu.eesz.2M256.build.flash_size_bytes=0x200000 +gen4iod.menu.eesz.2M256.build.flash_ld=eagle.flash.2m256.ld +gen4iod.menu.eesz.2M256.build.spiffs_pagesize=256 +gen4iod.menu.eesz.2M256.upload.maximum_size=1044464 +gen4iod.menu.eesz.2M256.build.rfcal_addr=0x1FC000 +gen4iod.menu.eesz.2M256.build.spiffs_start=0x1C0000 +gen4iod.menu.eesz.2M256.build.spiffs_end=0x1FB000 +gen4iod.menu.eesz.2M256.build.spiffs_blocksize=4096 +gen4iod.menu.eesz.2M512=2MB (FS:512KB OTA:~768KB) +gen4iod.menu.eesz.2M512.build.flash_size=2M +gen4iod.menu.eesz.2M512.build.flash_size_bytes=0x200000 +gen4iod.menu.eesz.2M512.build.flash_ld=eagle.flash.2m512.ld +gen4iod.menu.eesz.2M512.build.spiffs_pagesize=256 +gen4iod.menu.eesz.2M512.upload.maximum_size=1044464 +gen4iod.menu.eesz.2M512.build.rfcal_addr=0x1FC000 +gen4iod.menu.eesz.2M512.build.spiffs_start=0x180000 +gen4iod.menu.eesz.2M512.build.spiffs_end=0x1FA000 +gen4iod.menu.eesz.2M512.build.spiffs_blocksize=8192 +gen4iod.menu.eesz.2M1M=2MB (FS:1MB OTA:~512KB) +gen4iod.menu.eesz.2M1M.build.flash_size=2M +gen4iod.menu.eesz.2M1M.build.flash_size_bytes=0x200000 +gen4iod.menu.eesz.2M1M.build.flash_ld=eagle.flash.2m1m.ld +gen4iod.menu.eesz.2M1M.build.spiffs_pagesize=256 +gen4iod.menu.eesz.2M1M.upload.maximum_size=1044464 +gen4iod.menu.eesz.2M1M.build.rfcal_addr=0x1FC000 +gen4iod.menu.eesz.2M1M.build.spiffs_start=0x100000 +gen4iod.menu.eesz.2M1M.build.spiffs_end=0x1FA000 +gen4iod.menu.eesz.2M1M.build.spiffs_blocksize=8192 +gen4iod.menu.eesz.2M=2MB (FS:none OTA:~1019KB) +gen4iod.menu.eesz.2M.build.flash_size=2M +gen4iod.menu.eesz.2M.build.flash_size_bytes=0x200000 +gen4iod.menu.eesz.2M.build.flash_ld=eagle.flash.2m.ld +gen4iod.menu.eesz.2M.build.spiffs_pagesize=256 +gen4iod.menu.eesz.2M.upload.maximum_size=1044464 +gen4iod.menu.eesz.2M.build.rfcal_addr=0x1FC000 gen4iod.menu.eesz.512K32=512KB (FS:32KB OTA:~230KB) gen4iod.menu.eesz.512K32.build.flash_size=512K gen4iod.menu.eesz.512K32.build.flash_size_bytes=0x80000 @@ -5522,13 +5519,6 @@ gen4iod.menu.ip.hb6f=v2 IPv6 Higher Bandwidth gen4iod.menu.ip.hb6f.build.lwip_include=lwip2/include gen4iod.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat gen4iod.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -gen4iod.menu.ip.hb1=v1.4 Higher Bandwidth -gen4iod.menu.ip.hb1.build.lwip_lib=-llwip_gcc -gen4iod.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -gen4iod.menu.ip.src=v1.4 Compile from source -gen4iod.menu.ip.src.build.lwip_lib=-llwip_src -gen4iod.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -gen4iod.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" gen4iod.menu.dbg.Disabled=Disabled gen4iod.menu.dbg.Disabled.build.debug_port= gen4iod.menu.dbg.Serial=Serial @@ -5647,6 +5637,10 @@ oak.menu.exception.disabled.build.stdcpp_lib=-lstdc++ oak.menu.exception.enabled=Enabled oak.menu.exception.enabled.build.exception_flags=-fexceptions oak.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +oak.menu.stacksmash.disabled=Disabled +oak.menu.stacksmash.disabled.build.stacksmash_flags= +oak.menu.stacksmash.enabled=Enabled +oak.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector oak.menu.ssl.all=All SSL ciphers (most compatible) oak.menu.ssl.all.build.sslflags= oak.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -5716,13 +5710,6 @@ oak.menu.ip.hb6f=v2 IPv6 Higher Bandwidth oak.menu.ip.hb6f.build.lwip_include=lwip2/include oak.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat oak.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -oak.menu.ip.hb1=v1.4 Higher Bandwidth -oak.menu.ip.hb1.build.lwip_lib=-llwip_gcc -oak.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -oak.menu.ip.src=v1.4 Compile from source -oak.menu.ip.src.build.lwip_lib=-llwip_src -oak.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -oak.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" oak.menu.dbg.Disabled=Disabled oak.menu.dbg.Disabled.build.debug_port= oak.menu.dbg.Serial=Serial @@ -5840,6 +5827,10 @@ wifiduino.menu.exception.disabled.build.stdcpp_lib=-lstdc++ wifiduino.menu.exception.enabled=Enabled wifiduino.menu.exception.enabled.build.exception_flags=-fexceptions wifiduino.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +wifiduino.menu.stacksmash.disabled=Disabled +wifiduino.menu.stacksmash.disabled.build.stacksmash_flags= +wifiduino.menu.stacksmash.enabled=Enabled +wifiduino.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector wifiduino.menu.ssl.all=All SSL ciphers (most compatible) wifiduino.menu.ssl.all.build.sslflags= wifiduino.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -5909,13 +5900,6 @@ wifiduino.menu.ip.hb6f=v2 IPv6 Higher Bandwidth wifiduino.menu.ip.hb6f.build.lwip_include=lwip2/include wifiduino.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat wifiduino.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -wifiduino.menu.ip.hb1=v1.4 Higher Bandwidth -wifiduino.menu.ip.hb1.build.lwip_lib=-llwip_gcc -wifiduino.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -wifiduino.menu.ip.src=v1.4 Compile from source -wifiduino.menu.ip.src.build.lwip_lib=-llwip_src -wifiduino.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -wifiduino.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" wifiduino.menu.dbg.Disabled=Disabled wifiduino.menu.dbg.Disabled.build.debug_port= wifiduino.menu.dbg.Serial=Serial @@ -6033,6 +6017,10 @@ wifi_slot.menu.exception.disabled.build.stdcpp_lib=-lstdc++ wifi_slot.menu.exception.enabled=Enabled wifi_slot.menu.exception.enabled.build.exception_flags=-fexceptions wifi_slot.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +wifi_slot.menu.stacksmash.disabled=Disabled +wifi_slot.menu.stacksmash.disabled.build.stacksmash_flags= +wifi_slot.menu.stacksmash.enabled=Enabled +wifi_slot.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector wifi_slot.menu.ssl.all=All SSL ciphers (most compatible) wifi_slot.menu.ssl.all.build.sslflags= wifi_slot.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -6216,13 +6204,6 @@ wifi_slot.menu.ip.hb6f=v2 IPv6 Higher Bandwidth wifi_slot.menu.ip.hb6f.build.lwip_include=lwip2/include wifi_slot.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat wifi_slot.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -wifi_slot.menu.ip.hb1=v1.4 Higher Bandwidth -wifi_slot.menu.ip.hb1.build.lwip_lib=-llwip_gcc -wifi_slot.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -wifi_slot.menu.ip.src=v1.4 Compile from source -wifi_slot.menu.ip.src.build.lwip_lib=-llwip_src -wifi_slot.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -wifi_slot.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" wifi_slot.menu.dbg.Disabled=Disabled wifi_slot.menu.dbg.Disabled.build.debug_port= wifi_slot.menu.dbg.Serial=Serial @@ -6340,6 +6321,10 @@ wiolink.menu.exception.disabled.build.stdcpp_lib=-lstdc++ wiolink.menu.exception.enabled=Enabled wiolink.menu.exception.enabled.build.exception_flags=-fexceptions wiolink.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +wiolink.menu.stacksmash.disabled=Disabled +wiolink.menu.stacksmash.disabled.build.stacksmash_flags= +wiolink.menu.stacksmash.enabled=Enabled +wiolink.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector wiolink.menu.ssl.all=All SSL ciphers (most compatible) wiolink.menu.ssl.all.build.sslflags= wiolink.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -6409,13 +6394,6 @@ wiolink.menu.ip.hb6f=v2 IPv6 Higher Bandwidth wiolink.menu.ip.hb6f.build.lwip_include=lwip2/include wiolink.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat wiolink.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -wiolink.menu.ip.hb1=v1.4 Higher Bandwidth -wiolink.menu.ip.hb1.build.lwip_lib=-llwip_gcc -wiolink.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -wiolink.menu.ip.src=v1.4 Compile from source -wiolink.menu.ip.src.build.lwip_lib=-llwip_src -wiolink.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -wiolink.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" wiolink.menu.dbg.Disabled=Disabled wiolink.menu.dbg.Disabled.build.debug_port= wiolink.menu.dbg.Serial=Serial @@ -6533,6 +6511,10 @@ espectro.menu.exception.disabled.build.stdcpp_lib=-lstdc++ espectro.menu.exception.enabled=Enabled espectro.menu.exception.enabled.build.exception_flags=-fexceptions espectro.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +espectro.menu.stacksmash.disabled=Disabled +espectro.menu.stacksmash.disabled.build.stacksmash_flags= +espectro.menu.stacksmash.enabled=Enabled +espectro.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector espectro.menu.ssl.all=All SSL ciphers (most compatible) espectro.menu.ssl.all.build.sslflags= espectro.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -6602,13 +6584,6 @@ espectro.menu.ip.hb6f=v2 IPv6 Higher Bandwidth espectro.menu.ip.hb6f.build.lwip_include=lwip2/include espectro.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat espectro.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -espectro.menu.ip.hb1=v1.4 Higher Bandwidth -espectro.menu.ip.hb1.build.lwip_lib=-llwip_gcc -espectro.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -espectro.menu.ip.src=v1.4 Compile from source -espectro.menu.ip.src.build.lwip_lib=-llwip_src -espectro.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -espectro.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" espectro.menu.dbg.Disabled=Disabled espectro.menu.dbg.Disabled.build.debug_port= espectro.menu.dbg.Serial=Serial @@ -6726,6 +6701,10 @@ eduinowifi.menu.exception.disabled.build.stdcpp_lib=-lstdc++ eduinowifi.menu.exception.enabled=Enabled eduinowifi.menu.exception.enabled.build.exception_flags=-fexceptions eduinowifi.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +eduinowifi.menu.stacksmash.disabled=Disabled +eduinowifi.menu.stacksmash.disabled.build.stacksmash_flags= +eduinowifi.menu.stacksmash.enabled=Enabled +eduinowifi.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector eduinowifi.menu.ssl.all=All SSL ciphers (most compatible) eduinowifi.menu.ssl.all.build.sslflags= eduinowifi.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -6795,13 +6774,6 @@ eduinowifi.menu.ip.hb6f=v2 IPv6 Higher Bandwidth eduinowifi.menu.ip.hb6f.build.lwip_include=lwip2/include eduinowifi.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat eduinowifi.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -eduinowifi.menu.ip.hb1=v1.4 Higher Bandwidth -eduinowifi.menu.ip.hb1.build.lwip_lib=-llwip_gcc -eduinowifi.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -eduinowifi.menu.ip.src=v1.4 Compile from source -eduinowifi.menu.ip.src.build.lwip_lib=-llwip_src -eduinowifi.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -eduinowifi.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" eduinowifi.menu.dbg.Disabled=Disabled eduinowifi.menu.dbg.Disabled.build.debug_port= eduinowifi.menu.dbg.Serial=Serial @@ -6929,6 +6901,10 @@ sonoff.menu.exception.disabled.build.stdcpp_lib=-lstdc++ sonoff.menu.exception.enabled=Enabled sonoff.menu.exception.enabled.build.exception_flags=-fexceptions sonoff.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +sonoff.menu.stacksmash.disabled=Disabled +sonoff.menu.stacksmash.disabled.build.stacksmash_flags= +sonoff.menu.stacksmash.enabled=Enabled +sonoff.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector sonoff.menu.ssl.all=All SSL ciphers (most compatible) sonoff.menu.ssl.all.build.sslflags= sonoff.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -7038,13 +7014,6 @@ sonoff.menu.ip.hb6f=v2 IPv6 Higher Bandwidth sonoff.menu.ip.hb6f.build.lwip_include=lwip2/include sonoff.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat sonoff.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -sonoff.menu.ip.hb1=v1.4 Higher Bandwidth -sonoff.menu.ip.hb1.build.lwip_lib=-llwip_gcc -sonoff.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -sonoff.menu.ip.src=v1.4 Compile from source -sonoff.menu.ip.src.build.lwip_lib=-llwip_src -sonoff.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -sonoff.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" sonoff.menu.dbg.Disabled=Disabled sonoff.menu.dbg.Disabled.build.debug_port= sonoff.menu.dbg.Serial=Serial @@ -7163,6 +7132,10 @@ espmxdevkit.menu.exception.disabled.build.stdcpp_lib=-lstdc++ espmxdevkit.menu.exception.enabled=Enabled espmxdevkit.menu.exception.enabled.build.exception_flags=-fexceptions espmxdevkit.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +espmxdevkit.menu.stacksmash.disabled=Disabled +espmxdevkit.menu.stacksmash.disabled.build.stacksmash_flags= +espmxdevkit.menu.stacksmash.enabled=Enabled +espmxdevkit.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector espmxdevkit.menu.ssl.all=All SSL ciphers (most compatible) espmxdevkit.menu.ssl.all.build.sslflags= espmxdevkit.menu.ssl.basic=Basic SSL ciphers (lower ROM use) @@ -7272,13 +7245,6 @@ espmxdevkit.menu.ip.hb6f=v2 IPv6 Higher Bandwidth espmxdevkit.menu.ip.hb6f.build.lwip_include=lwip2/include espmxdevkit.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat espmxdevkit.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 -espmxdevkit.menu.ip.hb1=v1.4 Higher Bandwidth -espmxdevkit.menu.ip.hb1.build.lwip_lib=-llwip_gcc -espmxdevkit.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC -espmxdevkit.menu.ip.src=v1.4 Compile from source -espmxdevkit.menu.ip.src.build.lwip_lib=-llwip_src -espmxdevkit.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC -espmxdevkit.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" espmxdevkit.menu.dbg.Disabled=Disabled espmxdevkit.menu.dbg.Disabled.build.debug_port= espmxdevkit.menu.dbg.Serial=Serial diff --git a/bootloaders/eboot/Makefile b/bootloaders/eboot/Makefile index ff4489e474..17c5351462 100644 --- a/bootloaders/eboot/Makefile +++ b/bootloaders/eboot/Makefile @@ -23,7 +23,7 @@ INC += -I../../tools/sdk/include -I../../tools/sdk/uzlib/src CFLAGS += -std=gnu99 -CFLAGS += -Os -g -Wall -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mno-text-section-literals -ffunction-sections -fdata-sections +CFLAGS += -Os -fcommon -g -Wall -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mno-text-section-literals -ffunction-sections -fdata-sections CFLAGS += $(INC) diff --git a/bootloaders/eboot/eboot.elf b/bootloaders/eboot/eboot.elf index 60329d847e..1a6e5bc234 100755 Binary files a/bootloaders/eboot/eboot.elf and b/bootloaders/eboot/eboot.elf differ diff --git a/cores/esp8266/AddrList.h b/cores/esp8266/AddrList.h index f7adc3d700..33d1f78eb1 100644 --- a/cores/esp8266/AddrList.h +++ b/cores/esp8266/AddrList.h @@ -128,7 +128,7 @@ struct netifWrapper const char* ifmac () const { return (const char*)_netif->hwaddr; } int ifnumber () const { return _netif->num; } bool ifUp () const { return !!(_netif->flags & NETIF_FLAG_UP); } - CONST netif* interface () const { return _netif; } + const netif* interface () const { return _netif; } const ip_addr_t* ipFromNetifNum () const { diff --git a/cores/esp8266/Arduino.h b/cores/esp8266/Arduino.h index edb6bdd5c4..72cf07c896 100644 --- a/cores/esp8266/Arduino.h +++ b/cores/esp8266/Arduino.h @@ -127,14 +127,8 @@ void timer0_isr_init(void); void timer0_attachInterrupt(timercallback userFunc); void timer0_detachInterrupt(void); -// undefine stdlib's abs if encountered -#ifdef abs -#undef abs -#endif - -#define abs(x) ((x)>0?(x):-(x)) +// Use stdlib abs() and round() to avoid issues with the C++ libraries #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) -#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) #define radians(deg) ((deg)*DEG_TO_RAD) #define degrees(rad) ((rad)*RAD_TO_DEG) #define sq(x) ((x)*(x)) @@ -225,13 +219,6 @@ void optimistic_yield(uint32_t interval_us); #endif -//for compatibility, below 4 lines to be removed in release 3.0.0 -#ifdef __cplusplus -extern "C" -#endif -const int TIM_DIV265 __attribute__((deprecated, weak)) = TIM_DIV256; - - #ifdef __cplusplus @@ -249,6 +236,7 @@ const int TIM_DIV265 __attribute__((deprecated, weak)) = TIM_DIV256; using std::min; using std::max; +using std::round; using std::isinf; using std::isnan; diff --git a/cores/esp8266/Client.h b/cores/esp8266/Client.h index 6cb99a04b6..ed0f0f8026 100644 --- a/cores/esp8266/Client.h +++ b/cores/esp8266/Client.h @@ -42,11 +42,9 @@ class Client: public Stream { uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); } -#if LWIP_VERSION_MAJOR != 1 const uint8_t* rawIPAddress(const IPAddress& addr) { return addr.raw_address(); } -#endif }; #endif diff --git a/cores/esp8266/Esp-version.cpp b/cores/esp8266/Esp-version.cpp index f92aa2a54f..c1ff61eb06 100644 --- a/cores/esp8266/Esp-version.cpp +++ b/cores/esp8266/Esp-version.cpp @@ -21,7 +21,6 @@ #include #include #include -#include // LWIP_VERSION_* #include // LWIP_HASH_STR (lwip2) #include // BEARSSL_GIT short hash @@ -29,13 +28,11 @@ #define STR(x) STRHELPER(x) // stringifier static const char arduino_esp8266_git_ver [] PROGMEM = "/Core:" STR(ARDUINO_ESP8266_GIT_DESC) "="; -#if LWIP_VERSION_MAJOR > 1 #if LWIP_IPV6 static const char lwip_version [] PROGMEM = "/lwIP:IPv6+" LWIP_HASH_STR; #else static const char lwip_version [] PROGMEM = "/lwIP:" LWIP_HASH_STR; #endif -#endif static const char bearssl_version [] PROGMEM = "/BearSSL:" STR(BEARSSL_GIT); String EspClass::getFullVersion() { @@ -45,23 +42,7 @@ String EspClass::getFullVersion() { s += system_get_sdk_version(); s += FPSTR(arduino_esp8266_git_ver); s += String(esp8266::coreVersionNumeric()); -#if LWIP_VERSION_MAJOR == 1 - s += F("/lwIP:"); - s += LWIP_VERSION_MAJOR; - s += '.'; - s += LWIP_VERSION_MINOR; - s += '.'; - s += LWIP_VERSION_REVISION; -#if LWIP_VERSION_IS_DEVELOPMENT - s += F("-dev"); -#endif -#if LWIP_VERSION_IS_RC - s += F("rc"); - s += String(LWIP_VERSION_RC); -#endif -#else // LWIP_VERSION_MAJOR != 1 s += FPSTR(lwip_version); -#endif // LWIP_VERSION_MAJOR != 1 s += FPSTR(bearssl_version); return s; diff --git a/cores/esp8266/IPAddress.cpp b/cores/esp8266/IPAddress.cpp index d121ba6e53..940f5c14d9 100644 --- a/cores/esp8266/IPAddress.cpp +++ b/cores/esp8266/IPAddress.cpp @@ -180,7 +180,7 @@ bool IPAddress::isValid(const char* arg) { return IPAddress().fromString(arg); } -CONST IPAddress INADDR_ANY; // generic "0.0.0.0" for IPv4 & IPv6 +const IPAddress INADDR_ANY; // generic "0.0.0.0" for IPv4 & IPv6 const IPAddress INADDR_NONE(255,255,255,255); /**************************************/ diff --git a/cores/esp8266/IPAddress.h b/cores/esp8266/IPAddress.h index cdd4b2499f..d2170017e8 100644 --- a/cores/esp8266/IPAddress.h +++ b/cores/esp8266/IPAddress.h @@ -26,28 +26,11 @@ #include #include +#include -#if LWIP_VERSION_MAJOR == 1 -// compatibility macros to make lwIP-v1 compiling lwIP-v2 API -#define LWIP_IPV6_NUM_ADDRESSES 0 -#define ip_2_ip4(x) (x) -#define ipv4_addr ip_addr -#define ipv4_addr_t ip_addr_t -#define IP_IS_V4_VAL(x) (1) -#define IP_SET_TYPE_VAL(x,y) do { (void)0; } while (0) -#define IP_ANY_TYPE (&ip_addr_any) -#define IP4_ADDR_ANY IPADDR_ANY -#define IP4_ADDR_ANY4 IP_ADDR_ANY -#define IPADDR4_INIT(x) { x } -#define CONST /* nothing: lwIP-v1 does not use const */ -#define ip4_addr_netcmp ip_addr_netcmp -#define netif_dhcp_data(netif) ((netif)->dhcp) -#else // lwIP-v2+ -#define CONST const #if !LWIP_IPV6 struct ip_addr: ipv4_addr { }; #endif // !LWIP_IPV6 -#endif // lwIP-v2+ // A class to make it easier to handle and pass around IP addresses // IPv6 update: @@ -220,7 +203,7 @@ class IPAddress: public Printable { }; -extern CONST IPAddress INADDR_ANY; +extern const IPAddress INADDR_ANY; extern const IPAddress INADDR_NONE; #endif diff --git a/cores/esp8266/StackThunk.h b/cores/esp8266/StackThunk.h index 874081a747..ffaeb32947 100644 --- a/cores/esp8266/StackThunk.h +++ b/cores/esp8266/StackThunk.h @@ -51,7 +51,7 @@ extern uint32_t stack_thunk_refcnt; // Thunking macro #define make_stack_thunk(fcnToThunk) \ -__asm("\n\ +__asm__ ("\n\ .text\n\ .literal_position\n\ .literal .LC_STACK_VALUE"#fcnToThunk", 0xdeadbeef\n\ diff --git a/cores/esp8266/Tone.cpp b/cores/esp8266/Tone.cpp index 064fdad5df..27726b28d0 100644 --- a/cores/esp8266/Tone.cpp +++ b/cores/esp8266/Tone.cpp @@ -34,7 +34,9 @@ static void _startTone(uint8_t _pin, uint32_t high, uint32_t low, uint32_t durat return; } - pinMode(_pin, OUTPUT); + if (!(_toneMap & 1UL << _pin)) { + pinMode(_pin, OUTPUT); + } high = std::max(high, (uint32_t)microsecondsToClockCycles(25)); // new 20KHz maximum tone frequency, low = std::max(low, (uint32_t)microsecondsToClockCycles(25)); // (25us high + 25us low period = 20KHz) @@ -43,7 +45,7 @@ static void _startTone(uint8_t _pin, uint32_t high, uint32_t low, uint32_t durat duration += high + low - 1; duration -= duration % (high + low); if (startWaveformClockCycles(_pin, high, low, duration)) { - _toneMap |= 1 << _pin; + _toneMap |= 1UL << _pin; } } @@ -86,6 +88,6 @@ void noTone(uint8_t _pin) { return; } stopWaveform(_pin); - _toneMap &= ~(1 << _pin); + _toneMap &= ~(1UL << _pin); digitalWrite(_pin, 0); } diff --git a/cores/esp8266/Udp.h b/cores/esp8266/Udp.h index de5127b18f..6c8ee4b385 100644 --- a/cores/esp8266/Udp.h +++ b/cores/esp8266/Udp.h @@ -83,14 +83,14 @@ class UDP: public Stream { // Return the port of the host who sent the current incoming packet virtual uint16_t remotePort() =0; protected: + uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); } -#if LWIP_VERSION_MAJOR != 1 + const uint8_t* rawIPAddress(const IPAddress& addr) { return addr.raw_address(); } -#endif }; #endif diff --git a/cores/esp8266/core_esp8266_features.cpp b/cores/esp8266/core_esp8266_features.cpp index 03396e5008..68f631d05c 100644 --- a/cores/esp8266/core_esp8266_features.cpp +++ b/cores/esp8266/core_esp8266_features.cpp @@ -37,8 +37,9 @@ void precache(void *f, uint32_t bytes) { // page (ie 1 word in 8) for this to work. #define CACHE_PAGE_SIZE 32 - register uint32_t a0 asm("a0"); - register uint32_t lines = (bytes/CACHE_PAGE_SIZE)+2; + uint32_t a0; + __asm__("mov.n %0, a0" : "=r"(a0)); + uint32_t lines = (bytes/CACHE_PAGE_SIZE)+2; volatile uint32_t *p = (uint32_t*)((f ? (uint32_t)f : a0) & ~0x03); uint32_t x; for (uint32_t i=0; i #include "ets_sys.h" -#include "core_esp8266_waveform.h" - -extern "C" { - -// Maximum delay between IRQs -#define MAXIRQUS (10000) - -// Set/clear GPIO 0-15 by bitmask -#define SetGPIO(a) do { GPOS = a; } while (0) -#define ClearGPIO(a) do { GPOC = a; } while (0) +#include + +// Timer is 80MHz fixed. 160MHz CPU frequency need scaling. +constexpr bool ISCPUFREQ160MHZ = clockCyclesPerMicrosecond() == 160; +// Maximum delay between IRQs, Timer1, <= 2^23 / 80MHz +constexpr int32_t MAXIRQTICKSCCYS = microsecondsToClockCycles(10000); +// Maximum servicing time for any single IRQ +constexpr uint32_t ISRTIMEOUTCCYS = microsecondsToClockCycles(18); +// The latency between in-ISR rearming of the timer and the earliest firing +constexpr int32_t IRQLATENCYCCYS = microsecondsToClockCycles(2); +// The SDK and hardware take some time to actually get to our NMI code +constexpr int32_t DELTAIRQCCYS = ISCPUFREQ160MHZ ? + microsecondsToClockCycles(2) >> 1 : microsecondsToClockCycles(2); + +// for INFINITE, the NMI proceeds on the waveform without expiry deadline. +// for EXPIRES, the NMI expires the waveform automatically on the expiry ccy. +// for UPDATEEXPIRY, the NMI recomputes the exact expiry ccy and transitions to EXPIRES. +// for INIT, the NMI initializes nextPeriodCcy, and if expiryCcy != 0 includes UPDATEEXPIRY. +enum class WaveformMode : uint8_t {INFINITE = 0, EXPIRES = 1, UPDATEEXPIRY = 2, INIT = 3}; // Waveform generator can create tones, PWM, and servos typedef struct { - uint32_t nextServiceCycle; // ESP cycle timer when a transition required - uint32_t expiryCycle; // For time-limited waveform, the cycle when this waveform must stop - uint32_t nextTimeHighCycles; // Copy over low->high to keep smooth waveform - uint32_t nextTimeLowCycles; // Copy over high->low to keep smooth waveform + uint32_t nextPeriodCcy; // ESP clock cycle when a period begins. If WaveformMode::INIT, temporarily holds positive phase offset ccy count + uint32_t endDutyCcy; // ESP clock cycle when going from duty to off + int32_t dutyCcys; // Set next off cycle at low->high to maintain phase + int32_t adjDutyCcys; // Temporary correction for next period + int32_t periodCcys; // Set next phase cycle at low->high to maintain phase + uint32_t expiryCcy; // For time-limited waveform, the CPU clock cycle when this waveform must stop. If WaveformMode::UPDATE, temporarily holds relative ccy count + WaveformMode mode; + int8_t alignPhase; // < 0 no phase alignment, otherwise starts waveform in relative phase offset to given pin + bool autoPwm; // perform PWM duty to idle cycle ratio correction under high load at the expense of precise timings } Waveform; -static Waveform waveform[17]; // State of all possible pins -static volatile uint32_t waveformState = 0; // Is the pin high or low, updated in NMI so no access outside the NMI code -static volatile uint32_t waveformEnabled = 0; // Is it actively running, updated in NMI so no access outside the NMI code +namespace { -// Enable lock-free by only allowing updates to waveformState and waveformEnabled from IRQ service routine -static volatile uint32_t waveformToEnable = 0; // Message to the NMI handler to start a waveform on a inactive pin -static volatile uint32_t waveformToDisable = 0; // Message to the NMI handler to disable a pin from waveform generation + static struct { + Waveform pins[17]; // State of all possible pins + uint32_t states = 0; // Is the pin high or low, updated in NMI so no access outside the NMI code + uint32_t enabled = 0; // Is it actively running, updated in NMI so no access outside the NMI code -static uint32_t (*timer1CB)() = NULL; + // Enable lock-free by only allowing updates to waveform.states and waveform.enabled from IRQ service routine + int32_t toSetBits = 0; // Message to the NMI handler to start/modify exactly one waveform + int32_t toDisableBits = 0; // Message to the NMI handler to disable exactly one pin from waveform generation + uint32_t(*timer1CB)() = nullptr; -// Non-speed critical bits -#pragma GCC optimize ("Os") + bool timer1Running = false; + + uint32_t nextEventCcy; + } waveform; -static inline ICACHE_RAM_ATTR uint32_t GetCycleCount() { - uint32_t ccount; - __asm__ __volatile__("esync; rsr %0,ccount":"=a"(ccount)); - return ccount; } // Interrupt on/off control static ICACHE_RAM_ATTR void timer1Interrupt(); -static bool timerRunning = false; + +// Non-speed critical bits +#pragma GCC optimize ("Os") static void initTimer() { timer1_disable(); ETS_FRC_TIMER1_INTR_ATTACH(NULL, NULL); ETS_FRC_TIMER1_NMI_INTR_ATTACH(timer1Interrupt); timer1_enable(TIM_DIV1, TIM_EDGE, TIM_SINGLE); - timerRunning = true; + waveform.timer1Running = true; + timer1_write(IRQLATENCYCCYS); // Cause an interrupt post-haste } static void ICACHE_RAM_ATTR deinitTimer() { ETS_FRC_TIMER1_NMI_INTR_ATTACH(NULL); timer1_disable(); timer1_isr_init(); - timerRunning = false; + waveform.timer1Running = false; } +extern "C" { + // Set a callback. Pass in NULL to stop it void setTimer1Callback(uint32_t (*fn)()) { - timer1CB = fn; - if (!timerRunning && fn) { + waveform.timer1CB = fn; + std::atomic_thread_fence(std::memory_order_acq_rel); + if (!waveform.timer1Running && fn) { initTimer(); - timer1_write(microsecondsToClockCycles(1)); // Cause an interrupt post-haste - } else if (timerRunning && !fn && !waveformEnabled) { + } else if (waveform.timer1Running && !fn && !waveform.enabled) { deinitTimer(); } } +int startWaveform(uint8_t pin, uint32_t highUS, uint32_t lowUS, + uint32_t runTimeUS, int8_t alignPhase, uint32_t phaseOffsetUS, bool autoPwm) { + return startWaveformClockCycles(pin, + microsecondsToClockCycles(highUS), microsecondsToClockCycles(lowUS), + microsecondsToClockCycles(runTimeUS), alignPhase, microsecondsToClockCycles(phaseOffsetUS), autoPwm); +} + // Start up a waveform on a pin, or change the current one. Will change to the new // waveform smoothly on next low->high transition. For immediate change, stopWaveform() // first, then it will immediately begin. -int startWaveform(uint8_t pin, uint32_t timeHighUS, uint32_t timeLowUS, uint32_t runTimeUS) { - return startWaveformClockCycles(pin, microsecondsToClockCycles(timeHighUS), microsecondsToClockCycles(timeLowUS), microsecondsToClockCycles(runTimeUS)); -} - -int startWaveformClockCycles(uint8_t pin, uint32_t timeHighCycles, uint32_t timeLowCycles, uint32_t runTimeCycles) { - if ((pin > 16) || isFlashInterfacePin(pin)) { - return false; +int startWaveformClockCycles(uint8_t pin, uint32_t highCcys, uint32_t lowCcys, + uint32_t runTimeCcys, int8_t alignPhase, uint32_t phaseOffsetCcys, bool autoPwm) { + uint32_t periodCcys = highCcys + lowCcys; + if (periodCcys < MAXIRQTICKSCCYS) { + if (!highCcys) { + periodCcys = (MAXIRQTICKSCCYS / periodCcys) * periodCcys; + } + else if (!lowCcys) { + highCcys = periodCcys = (MAXIRQTICKSCCYS / periodCcys) * periodCcys; + } } - Waveform *wave = &waveform[pin]; - // Adjust to shave off some of the IRQ time, approximately - wave->nextTimeHighCycles = timeHighCycles; - wave->nextTimeLowCycles = timeLowCycles; - wave->expiryCycle = runTimeCycles ? GetCycleCount() + runTimeCycles : 0; - if (runTimeCycles && !wave->expiryCycle) { - wave->expiryCycle = 1; // expiryCycle==0 means no timeout, so avoid setting it + // sanity checks, including mixed signed/unsigned arithmetic safety + if ((pin > 16) || isFlashInterfacePin(pin) || (alignPhase > 16) || + static_cast(periodCcys) <= 0 || + static_cast(highCcys) < 0 || static_cast(lowCcys) < 0) { + return false; } - - uint32_t mask = 1<nextServiceCycle = GetCycleCount() + microsecondsToClockCycles(1); - waveformToEnable |= mask; - if (!timerRunning) { - initTimer(); - timer1_write(microsecondsToClockCycles(10)); - } else { - // Ensure timely service.... - if (T1L > microsecondsToClockCycles(10)) { - timer1_write(microsecondsToClockCycles(10)); + Waveform& wave = waveform.pins[pin]; + wave.dutyCcys = highCcys; + wave.adjDutyCcys = 0; + wave.periodCcys = periodCcys; + wave.autoPwm = autoPwm; + + std::atomic_thread_fence(std::memory_order_acquire); + const uint32_t pinBit = 1UL << pin; + if (!(waveform.enabled & pinBit)) { + // wave.nextPeriodCcy and wave.endDutyCcy are initialized by the ISR + wave.nextPeriodCcy = phaseOffsetCcys; + wave.expiryCcy = runTimeCcys; // in WaveformMode::INIT, temporarily hold relative cycle count + wave.mode = WaveformMode::INIT; + wave.alignPhase = (alignPhase < 0) ? -1 : alignPhase; + if (!wave.dutyCcys) { + // If initially at zero duty cycle, force GPIO off + if (pin == 16) { + GP16O = 0; } + else { + GPOC = pinBit; + } + } + std::atomic_thread_fence(std::memory_order_release); + waveform.toSetBits = 1UL << pin; + std::atomic_thread_fence(std::memory_order_release); + if (!waveform.timer1Running) { + initTimer(); } - while (waveformToEnable) { - delay(0); // Wait for waveform to update + else if (T1V > IRQLATENCYCCYS) { + // Must not interfere if Timer is due shortly + timer1_write(IRQLATENCYCCYS); } } - - return true; -} - -// Speed critical bits -#pragma GCC optimize ("O2") -// Normally would not want two copies like this, but due to different -// optimization levels the inline attribute gets lost if we try the -// other version. - -static inline ICACHE_RAM_ATTR uint32_t GetCycleCountIRQ() { - uint32_t ccount; - __asm__ __volatile__("rsr %0,ccount":"=a"(ccount)); - return ccount; -} - -static inline ICACHE_RAM_ATTR uint32_t min_u32(uint32_t a, uint32_t b) { - if (a < b) { - return a; + else { + wave.mode = WaveformMode::INFINITE; // turn off possible expiry to make update atomic from NMI + std::atomic_thread_fence(std::memory_order_release); + wave.expiryCcy = runTimeCcys; // in WaveformMode::UPDATEEXPIRY, temporarily hold relative cycle count + if (runTimeCcys) { + wave.mode = WaveformMode::UPDATEEXPIRY; + std::atomic_thread_fence(std::memory_order_release); + waveform.toSetBits = 1UL << pin; + } } - return b; + std::atomic_thread_fence(std::memory_order_acq_rel); + while (waveform.toSetBits) { + delay(0); // Wait for waveform to update + std::atomic_thread_fence(std::memory_order_acquire); + } + return true; } // Stops a waveform on a pin int ICACHE_RAM_ATTR stopWaveform(uint8_t pin) { // Can't possibly need to stop anything if there is no timer active - if (!timerRunning) { + if (!waveform.timer1Running) { return false; } // If user sends in a pin >16 but <32, this will always point to a 0 bit // If they send >=32, then the shift will result in 0 and it will also return false - if (waveformEnabled & (1UL << pin)) { - waveformToDisable = 1UL << pin; + std::atomic_thread_fence(std::memory_order_acquire); + const uint32_t pinBit = 1UL << pin; + if (waveform.enabled & pinBit) { + waveform.toDisableBits = 1UL << pin; + std::atomic_thread_fence(std::memory_order_release); // Must not interfere if Timer is due shortly - if (T1L > microsecondsToClockCycles(10)) { - timer1_write(microsecondsToClockCycles(10)); + if (T1V > IRQLATENCYCCYS) { + timer1_write(IRQLATENCYCCYS); } - while (waveformToDisable) { + while (waveform.toDisableBits) { /* no-op */ // Can't delay() since stopWaveform may be called from an IRQ + std::atomic_thread_fence(std::memory_order_acquire); } } - if (!waveformEnabled && !timer1CB) { + if (!waveform.enabled && !waveform.timer1CB) { deinitTimer(); } return true; } -// The SDK and hardware take some time to actually get to our NMI code, so -// decrement the next IRQ's timer value by a bit so we can actually catch the -// real CPU cycle counter we want for the waveforms. -#if F_CPU == 80000000 - #define DELTAIRQ (microsecondsToClockCycles(3)) -#else - #define DELTAIRQ (microsecondsToClockCycles(2)) -#endif - +}; -static ICACHE_RAM_ATTR void timer1Interrupt() { - // Optimize the NMI inner loop by keeping track of the min and max GPIO that we - // are generating. In the common case (1 PWM) these may be the same pin and - // we can avoid looking at the other pins. - static int startPin = 0; - static int endPin = 0; +// Speed critical bits +#pragma GCC optimize ("O2") - uint32_t nextEventCycles = microsecondsToClockCycles(MAXIRQUS); - uint32_t timeoutCycle = GetCycleCountIRQ() + microsecondsToClockCycles(14); +// For dynamic CPU clock frequency switch in loop the scaling logic would have to be adapted. +// Using constexpr makes sure that the CPU clock frequency is compile-time fixed. +static inline ICACHE_RAM_ATTR int32_t scaleCcys(const int32_t ccys, const bool isCPU2X) { + if (ISCPUFREQ160MHZ) { + return isCPU2X ? ccys : (ccys >> 1); + } + else { + return isCPU2X ? (ccys << 1) : ccys; + } +} - if (waveformToEnable || waveformToDisable) { +static ICACHE_RAM_ATTR void timer1Interrupt() { + const uint32_t isrStartCcy = ESP.getCycleCount(); + int32_t clockDrift = isrStartCcy - waveform.nextEventCcy; + const bool isCPU2X = CPU2X & 1; + if ((waveform.toSetBits && !(waveform.enabled & waveform.toSetBits)) || waveform.toDisableBits) { // Handle enable/disable requests from main app. - waveformEnabled = (waveformEnabled & ~waveformToDisable) | waveformToEnable; // Set the requested waveforms on/off - waveformState &= ~waveformToEnable; // And clear the state of any just started - waveformToEnable = 0; - waveformToDisable = 0; + waveform.enabled = (waveform.enabled & ~waveform.toDisableBits) | waveform.toSetBits; // Set the requested waveforms on/off // Find the first GPIO being generated by checking GCC's find-first-set (returns 1 + the bit of the first 1 in an int32_t) - startPin = __builtin_ffs(waveformEnabled) - 1; - // Find the last bit by subtracting off GCC's count-leading-zeros (no offset in this one) - endPin = 32 - __builtin_clz(waveformEnabled); + waveform.toDisableBits = 0; } - bool done = false; - if (waveformEnabled) { - do { - nextEventCycles = microsecondsToClockCycles(MAXIRQUS); - for (int i = startPin; i <= endPin; i++) { - uint32_t mask = 1<= 0 && waveform.enabled & (1UL << wave.alignPhase)) { + wave.nextPeriodCcy = waveform.pins[wave.alignPhase].nextPeriodCcy + wave.nextPeriodCcy; + } + else { + wave.nextPeriodCcy = waveform.nextEventCcy; + } + if (!wave.expiryCcy) { + wave.mode = WaveformMode::INFINITE; + break; + } + // fall through + case WaveformMode::UPDATEEXPIRY: + // in WaveformMode::UPDATEEXPIRY, expiryCcy temporarily holds relative CPU cycle count + wave.expiryCcy = wave.nextPeriodCcy + scaleCcys(wave.expiryCcy, isCPU2X); + wave.mode = WaveformMode::EXPIRES; + break; + default: + break; + } + waveform.toSetBits = 0; + } - Waveform *wave = &waveform[i]; - uint32_t now = GetCycleCountIRQ(); + // Exit the loop if the next event, if any, is sufficiently distant. + const uint32_t isrTimeoutCcy = isrStartCcy + ISRTIMEOUTCCYS; + uint32_t busyPins = waveform.enabled; + waveform.nextEventCcy = isrStartCcy + MAXIRQTICKSCCYS; + + uint32_t now = ESP.getCycleCount(); + uint32_t isrNextEventCcy = now; + while (busyPins) { + if (static_cast(isrNextEventCcy - now) > IRQLATENCYCCYS) { + waveform.nextEventCcy = isrNextEventCcy; + break; + } + isrNextEventCcy = waveform.nextEventCcy; + uint32_t loopPins = busyPins; + while (loopPins) { + const int pin = __builtin_ffsl(loopPins) - 1; + const uint32_t pinBit = 1UL << pin; + loopPins ^= pinBit; + + Waveform& wave = waveform.pins[pin]; + + if (clockDrift) { + wave.endDutyCcy += clockDrift; + wave.nextPeriodCcy += clockDrift; + wave.expiryCcy += clockDrift; + } + uint32_t waveNextEventCcy = (waveform.states & pinBit) ? wave.endDutyCcy : wave.nextPeriodCcy; + if (WaveformMode::EXPIRES == wave.mode && + static_cast(waveNextEventCcy - wave.expiryCcy) >= 0 && + static_cast(now - wave.expiryCcy) >= 0) { // Disable any waveforms that are done - if (wave->expiryCycle) { - int32_t expiryToGo = wave->expiryCycle - now; - if (expiryToGo < 0) { - // Done, remove! - waveformEnabled &= ~mask; - if (i == 16) { - GP16O &= ~1; - } else { - ClearGPIO(mask); + waveform.enabled ^= pinBit; + busyPins ^= pinBit; + } + else { + const int32_t overshootCcys = now - waveNextEventCcy; + if (overshootCcys >= 0) { + const int32_t periodCcys = scaleCcys(wave.periodCcys, isCPU2X); + if (waveform.states & pinBit) { + // active configuration and forward are 100% duty + if (wave.periodCcys == wave.dutyCcys) { + wave.nextPeriodCcy += periodCcys; + wave.endDutyCcy = wave.nextPeriodCcy; + } + else { + if (wave.autoPwm) { + wave.adjDutyCcys += overshootCcys; + } + waveform.states ^= pinBit; + if (16 == pin) { + GP16O = 0; + } + else { + GPOC = pinBit; } - continue; } - } - - // Check for toggles - int32_t cyclesToGo = wave->nextServiceCycle - now; - if (cyclesToGo < 0) { - waveformState ^= mask; - if (waveformState & mask) { - if (i == 16) { - GP16O |= 1; // GPIO16 write slow as it's RMW - } else { - SetGPIO(mask); + waveNextEventCcy = wave.nextPeriodCcy; + } + else { + wave.nextPeriodCcy += periodCcys; + if (!wave.dutyCcys) { + wave.endDutyCcy = wave.nextPeriodCcy; } - wave->nextServiceCycle = now + wave->nextTimeHighCycles; - nextEventCycles = min_u32(nextEventCycles, wave->nextTimeHighCycles); - } else { - if (i == 16) { - GP16O &= ~1; // GPIO16 write slow as it's RMW - } else { - ClearGPIO(mask); + else { + int32_t dutyCcys = scaleCcys(wave.dutyCcys, isCPU2X); + if (dutyCcys <= wave.adjDutyCcys) { + dutyCcys >>= 1; + wave.adjDutyCcys -= dutyCcys; + } + else if (wave.adjDutyCcys) { + dutyCcys -= wave.adjDutyCcys; + wave.adjDutyCcys = 0; + } + wave.endDutyCcy = now + dutyCcys; + if (static_cast(wave.endDutyCcy - wave.nextPeriodCcy) > 0) { + wave.endDutyCcy = wave.nextPeriodCcy; + } + waveform.states |= pinBit; + if (16 == pin) { + GP16O = 1; + } + else { + GPOS = pinBit; + } } - wave->nextServiceCycle = now + wave->nextTimeLowCycles; - nextEventCycles = min_u32(nextEventCycles, wave->nextTimeLowCycles); + waveNextEventCcy = wave.endDutyCcy; + } + + if (WaveformMode::EXPIRES == wave.mode && static_cast(waveNextEventCcy - wave.expiryCcy) > 0) { + waveNextEventCcy = wave.expiryCcy; + } + } + + if (static_cast(waveNextEventCcy - isrTimeoutCcy) >= 0) { + busyPins ^= pinBit; + if (static_cast(waveform.nextEventCcy - waveNextEventCcy) > 0) { + waveform.nextEventCcy = waveNextEventCcy; } - } else { - uint32_t deltaCycles = wave->nextServiceCycle - now; - nextEventCycles = min_u32(nextEventCycles, deltaCycles); + } + else if (static_cast(isrNextEventCcy - waveNextEventCcy) > 0) { + isrNextEventCcy = waveNextEventCcy; } } + now = ESP.getCycleCount(); + } + clockDrift = 0; + } - // Exit the loop if we've hit the fixed runtime limit or the next event is known to be after that timeout would occur - uint32_t now = GetCycleCountIRQ(); - int32_t cycleDeltaNextEvent = timeoutCycle - (now + nextEventCycles); - int32_t cyclesLeftTimeout = timeoutCycle - now; - done = (cycleDeltaNextEvent < 0) || (cyclesLeftTimeout < 0); - } while (!done); - } // if (waveformEnabled) + int32_t callbackCcys = 0; + if (waveform.timer1CB) { + callbackCcys = scaleCcys(microsecondsToClockCycles(waveform.timer1CB()), isCPU2X); + } + now = ESP.getCycleCount(); + int32_t nextEventCcys = waveform.nextEventCcy - now; + // Account for unknown duration of timer1CB(). + if (waveform.timer1CB && nextEventCcys > callbackCcys) { + waveform.nextEventCcy = now + callbackCcys; + nextEventCcys = callbackCcys; + } - if (timer1CB) { - nextEventCycles = min_u32(nextEventCycles, timer1CB()); + // Timer is 80MHz fixed. 160MHz CPU frequency need scaling. + int32_t deltaIrqCcys = DELTAIRQCCYS; + int32_t irqLatencyCcys = IRQLATENCYCCYS; + if (isCPU2X) { + nextEventCcys >>= 1; + deltaIrqCcys >>= 1; + irqLatencyCcys >>= 1; } - if (nextEventCycles < microsecondsToClockCycles(10)) { - nextEventCycles = microsecondsToClockCycles(10); + // Firing timer too soon, the NMI occurs before ISR has returned. + if (nextEventCcys < irqLatencyCcys + deltaIrqCcys) { + waveform.nextEventCcy = now + IRQLATENCYCCYS + DELTAIRQCCYS; + nextEventCcys = irqLatencyCcys; + } + else { + nextEventCcys -= deltaIrqCcys; } - nextEventCycles -= DELTAIRQ; - - // Do it here instead of global function to save time and because we know it's edge-IRQ -#if F_CPU == 160000000 - T1L = nextEventCycles >> 1; // Already know we're in range by MAXIRQUS -#else - T1L = nextEventCycles; // Already know we're in range by MAXIRQUS -#endif - TEIE |= TEIE1; // Edge int enable -} -}; + // Register access is fast and edge IRQ was configured before. + T1L = nextEventCcys; +} diff --git a/cores/esp8266/core_esp8266_waveform.h b/cores/esp8266/core_esp8266_waveform.h index e42a17f89f..61cb999664 100644 --- a/cores/esp8266/core_esp8266_waveform.h +++ b/cores/esp8266/core_esp8266_waveform.h @@ -3,6 +3,7 @@ supporting outputs on all pins in parallel. Copyright (c) 2018 Earle F. Philhower, III. All rights reserved. + Copyright (c) 2020 Dirk O. Kaar. The core idea is to have a programmable waveform generator with a unique high and low period (defined in microseconds or CPU clock cycles). TIMER1 is @@ -19,7 +20,7 @@ This replaces older tone(), analogWrite(), and the Servo classes. - Everywhere in the code where "cycles" is used, it means ESP.getCycleCount() + Everywhere in the code where "ccy" or "ccys" is used, it means ESP.getCycleCount() clock cycle count, or an interval measured in CPU clock cycles, but not TIMER1 cycles (which may be 2 CPU clock cycles @ 160MHz). @@ -48,13 +49,25 @@ extern "C" { #endif // Start or change a waveform of the specified high and low times on specific pin. -// If runtimeUS > 0 then automatically stop it after that many usecs. +// If runtimeUS > 0 then automatically stop it after that many usecs, relative to the next +// full period. +// If waveform is not yet started on pin, and on pin == alignPhase a waveform is running, +// the new waveform is started at phaseOffsetUS phase offset, in microseconds, to that. +// Setting autoPwm to true allows the wave generator to maintain PWM duty to idle cycle ratio +// under load, for applications where frequency or duty cycle must not change, leave false. // Returns true or false on success or failure. -int startWaveform(uint8_t pin, uint32_t timeHighUS, uint32_t timeLowUS, uint32_t runTimeUS); +int startWaveform(uint8_t pin, uint32_t timeHighUS, uint32_t timeLowUS, + uint32_t runTimeUS = 0, int8_t alignPhase = -1, uint32_t phaseOffsetUS = 0, bool autoPwm = false); // Start or change a waveform of the specified high and low CPU clock cycles on specific pin. -// If runtimeCycles > 0 then automatically stop it after that many CPU clock cycles. +// If runtimeCycles > 0 then automatically stop it after that many CPU clock cycles, relative to the next +// full period. +// If waveform is not yet started on pin, and on pin == alignPhase a waveform is running, +// the new waveform is started at phaseOffsetCcys phase offset, in CPU clock cycles, to that. +// Setting autoPwm to true allows the wave generator to maintain PWM duty to idle cycle ratio +// under load, for applications where frequency or duty cycle must not change, leave false. // Returns true or false on success or failure. -int startWaveformClockCycles(uint8_t pin, uint32_t timeHighCycles, uint32_t timeLowCycles, uint32_t runTimeCycles); +int startWaveformClockCycles(uint8_t pin, uint32_t timeHighCcys, uint32_t timeLowCcys, + uint32_t runTimeCcys = 0, int8_t alignPhase = -1, uint32_t phaseOffsetCcys = 0, bool autoPwm = false); // Stop a waveform, if any, on the specified pin. // Returns true or false on success or failure. int stopWaveform(uint8_t pin); diff --git a/cores/esp8266/core_esp8266_wiring_digital.cpp b/cores/esp8266/core_esp8266_wiring_digital.cpp index ab6ed5dee9..9c15703e0a 100644 --- a/cores/esp8266/core_esp8266_wiring_digital.cpp +++ b/cores/esp8266/core_esp8266_wiring_digital.cpp @@ -130,8 +130,10 @@ typedef struct { static interrupt_handler_t interrupt_handlers[16] = { {0, 0, 0, 0}, }; static uint32_t interrupt_reg = 0; -void ICACHE_RAM_ATTR interrupt_handler(void*) +void ICACHE_RAM_ATTR interrupt_handler(void *arg, void *frame) { + (void) arg; + (void) frame; uint32_t status = GPIE; GPIEC = status;//clear them interrupts uint32_t levels = GPI; diff --git a/cores/esp8266/core_esp8266_wiring_pwm.cpp b/cores/esp8266/core_esp8266_wiring_pwm.cpp index 1ebdd64c89..608e06bdae 100644 --- a/cores/esp8266/core_esp8266_wiring_pwm.cpp +++ b/cores/esp8266/core_esp8266_wiring_pwm.cpp @@ -39,8 +39,8 @@ extern void __analogWriteRange(uint32_t range) { extern void __analogWriteFreq(uint32_t freq) { if (freq < 100) { analogFreq = 100; - } else if (freq > 40000) { - analogFreq = 40000; + } else if (freq > 60000) { + analogFreq = 60000; } else { analogFreq = freq; } @@ -57,18 +57,18 @@ extern void __analogWrite(uint8_t pin, int val) { val = analogScale; } - analogMap &= ~(1 << pin); + if (analogMap & 1UL << pin) { + analogMap &= ~(1 << pin); + } + else { + pinMode(pin, OUTPUT); + } uint32_t high = (analogPeriod * val) / analogScale; uint32_t low = analogPeriod - high; - pinMode(pin, OUTPUT); - if (low == 0) { - digitalWrite(pin, HIGH); - } else if (high == 0) { - digitalWrite(pin, LOW); - } else { - if (startWaveformClockCycles(pin, high, low, 0)) { - analogMap |= (1 << pin); - } + // Find the first GPIO being generated by checking GCC's find-first-set (returns 1 + the bit of the first 1 in an int32_t) + int phaseReference = __builtin_ffs(analogMap) - 1; + if (startWaveformClockCycles(pin, high, low, 0, phaseReference, 0, true)) { + analogMap |= (1 << pin); } } diff --git a/cores/esp8266/gdb_hooks.cpp b/cores/esp8266/gdb_hooks.cpp index 3516712c9f..8864f757fb 100644 --- a/cores/esp8266/gdb_hooks.cpp +++ b/cores/esp8266/gdb_hooks.cpp @@ -31,6 +31,11 @@ static bool ICACHE_RAM_ATTR __gdb_no_op() return false; } +// To save space, don't create a dummy no-op for each GCC, just point to the no-op +// Need to turn off GCC's checking of parameter types or we'll get many warnings +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wattribute-alias" +#pragma GCC diagnostic ignored "-Wmissing-attributes" void gdb_init(void) __attribute__ ((weak, alias("__gdb_no_op"))); void gdb_do_break(void) __attribute__ ((weak, alias("__gdb_no_op"))); bool gdb_present(void) __attribute__ ((weak, alias("__gdb_no_op"))); @@ -40,5 +45,6 @@ bool gdbstub_has_uart_isr_control(void) __attribute__ ((weak, alias("__gdb_no_op void gdbstub_set_uart_isr_callback(void (*func)(void*, uint8_t), void* arg) __attribute__ ((weak, alias("__gdb_no_op"))); void gdbstub_write_char(char c) __attribute__ ((weak, alias("__gdb_no_op"))); void gdbstub_write(const char* buf, size_t size) __attribute__ ((weak, alias("__gdb_no_op"))); +#pragma GCC diagnostic pop }; diff --git a/cores/esp8266/sntp-lwip2.cpp b/cores/esp8266/sntp-lwip2.cpp index cc3d8e853a..8e8549c33c 100644 --- a/cores/esp8266/sntp-lwip2.cpp +++ b/cores/esp8266/sntp-lwip2.cpp @@ -60,44 +60,6 @@ void settimeofday_cb (const TrivialCB& cb) extern "C" { -#if LWIP_VERSION_MAJOR == 1 - -#include - -static const char stod14[] PROGMEM = "settimeofday() can't set time!\n"; -bool sntp_set_timezone(sint8 timezone); -bool sntp_set_timezone_in_seconds(int32_t timezone) -{ - return sntp_set_timezone((sint8)(timezone/(60*60))); //TODO: move this to the same file as sntp_set_timezone() in lwip1.4, and implement correctly over there. -} - -void sntp_set_daylight(int daylight); - -int settimeofday(const struct timeval* tv, const struct timezone* tz) -{ - if (tz) /*before*/ - { - sntp_set_timezone_in_seconds(tz->tz_minuteswest * 60); - // apparently tz->tz_dsttime is a bitfield and should not be further used (cf man) - sntp_set_daylight(0); - } - if (tv) /* after*/ - { - // can't call lwip1.4's static sntp_set_system_time() - os_printf(stod14); - - // reset time subsystem - timeshift64_is_set = false; - - return -1; - } - return 0; -} - -#endif // lwip 1.4 only - -#if LWIP_VERSION_MAJOR == 2 - #include uint32_t sntp_real_timestamp = 0; @@ -128,6 +90,4 @@ int settimeofday(const struct timeval* tv, const struct timezone* tz) return 0; } -#endif // lwip2 only - }; diff --git a/cores/esp8266/time.cpp b/cores/esp8266/time.cpp index ae5a187651..8940fc5d20 100644 --- a/cores/esp8266/time.cpp +++ b/cores/esp8266/time.cpp @@ -73,13 +73,6 @@ int clock_gettime(clockid_t unused, struct timespec *tp) return 0; } -#if LWIP_VERSION_MAJOR == 1 -// hack for espressif time management included in patched lwIP-1.4 -#define sntp_real_timestamp sntp_get_current_timestamp() -#endif - -#if LWIP_VERSION_MAJOR != 1 - // backport Espressif api bool sntp_set_timezone_in_seconds (int32_t timezone_sec) @@ -103,8 +96,6 @@ uint32 sntp_get_current_timestamp() return sntp_real_timestamp; } -#endif - time_t time(time_t * t) { if (t) diff --git a/cores/esp8266/uart.cpp b/cores/esp8266/uart.cpp index fd8170b586..a21300e51d 100644 --- a/cores/esp8266/uart.cpp +++ b/cores/esp8266/uart.cpp @@ -371,8 +371,9 @@ uart_get_rx_buffer_size(uart_t* uart) // The default ISR handler called when GDB is not enabled void ICACHE_RAM_ATTR -uart_isr(void * arg) +uart_isr(void * arg, void * frame) { + (void) frame; uart_t* uart = (uart_t*)arg; uint32_t usis = USIS(uart->uart_nr); diff --git a/doc/boards.rst b/doc/boards.rst index 7ab98e2513..9c94b63120 100644 --- a/doc/boards.rst +++ b/doc/boards.rst @@ -413,7 +413,7 @@ Datasheet and associated downloads can be found on the 4D Systems product page. The gen4-IoD range can be programmed using the Arduino IDE and also the 4D Systems Workshop4 IDE, which incorporates many additional graphics benefits. GFX4d library is available, along with a number of demo applications. -- Product page: http://www.4dsystems.com.au/product/gen4-IoD +- Product page: https://4dsystems.com.au/products/iot-display-modules Digistump Oak ------------- diff --git a/doc/esp8266wifi/client-class.rst b/doc/esp8266wifi/client-class.rst index 2f153b254d..dee85589a1 100644 --- a/doc/esp8266wifi/client-class.rst +++ b/doc/esp8266wifi/client-class.rst @@ -107,7 +107,4 @@ Other Function Calls IPAddress localIP () uint16_t localPort () -Documentation for the above functions is not yet prepared. - -For code samples please refer to separate section with `examples -:arrow\_right: `__ dedicated specifically to the Client Class. +Documentation for the above functions is not yet available. diff --git a/doc/esp8266wifi/client-examples.rst b/doc/esp8266wifi/client-examples.rst deleted file mode 100644 index b5bb605862..0000000000 --- a/doc/esp8266wifi/client-examples.rst +++ /dev/null @@ -1,322 +0,0 @@ -:orphan: - -Client ------- - -Let's write a simple client program to access a single web page and display its contents on a serial monitor. This is typical operation performed by a client to access server's API to retrieve specific information. For instance we may want to contact GitHub's API to periodically check the number of open issues reported on `esp8266/Arduino `__ repository. - -Table of Contents ------------------ - -- `Introduction <#introduction>`__ -- `Get Connected to Wi-Fi <#get-connected-to-wi-fi>`__ -- `Select a Server <#select-a-server>`__ -- `Instantiate the Client <#instantiate-the-client>`__ -- `Get Connected to the Server <#get-connected-to-the-server>`__ -- `Request the Data <#request-the-data>`__ -- `Read Reply from the Server <#read-reply-from-the-server>`__ -- `Now to the Sketch <#now-to-the-sketch>`__ -- `Test it Live <#test-it-live>`__ -- `Test it More <#test-it-more>`__ -- `Conclusion <#conclusion>`__ - -Introduction -~~~~~~~~~~~~ - -This time we are going to concentrate just on retrieving a web page contents sent by a server, to demonstrate basic client's functionality. Once you are able to retrieve information from a server, you should be able to phrase it and extract specific data you need. - -Get Connected to Wi-Fi -~~~~~~~~~~~~~~~~~~~~~~ - -We should start with connecting the module to an access point to obtain an access to internet. The code to provide this functionality has been already discussed in chapter `Quick Start `__. Please refer to it for details. - -Select a Server -~~~~~~~~~~~~~~~ - -Once connected to the network we should connect to the specific server. Web address of this server is declared in ``host`` character string as below. - -.. code:: cpp - - const char* host = "www.example.com"; - -I have selected ``www.example.com`` domain name and you can select any other. Just check if you can access it using a web browser. - -.. figure:: pictures/client-example-domain.png - :alt: A web page to be retreived by the clinet program - - alt text - -Instantiate the Client -~~~~~~~~~~~~~~~~~~~~~~ - -Now we should declare a client that will be contacting the host (server): - -.. code:: cpp - - WiFiClient client; - -Get Connected to the Server -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In next line we will connect to the host and check the connection result. Note ``80``, that is the standard port number used for web access. - -.. code:: cpp - - if (client.connect(host, 80)) - { - // we are connected to the host! - } - else - { - // connection failure - } - -Request the Data -~~~~~~~~~~~~~~~~ - -If connection is successful, we should send request the host to provide specific information we need. This is done using the `HTTP GET `__ request as in the following lines: - -.. code:: cpp - - client.print(String("GET /") + " HTTP/1.1\r\n" + - "Host: " + host + "\r\n" + - "Connection: close\r\n" + - "\r\n" - ); - -Read Reply from the Server -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Then, while connection by our client is still alive or while data are available to read (``while (client.connected() || client.available())``, see below) we can read line by line and print out server's response: - -.. code:: cpp - - while (client.connected() || client.available()) - { - if (client.available()) - { - String line = client.readStringUntil('\n'); - Serial.println(line); - } - } - -The inner ``if (client.available())`` is checking if there are any data available from the server. If so, then they are printed out. - -Data can be unavailable while the TCP connection is still alive. That means data could be later received. - -Once server sends all requested data it will disconnect, then once all received data are read, program will exit the ``while`` loop. - -Now to the Sketch -~~~~~~~~~~~~~~~~~ - -Complete sketch, including a case when contention to the server fails, is presented below. - -.. code:: cpp - - #include - - const char* ssid = "********"; - const char* password = "********"; - - const char* host = "www.example.com"; - - - void setup() - { - Serial.begin(115200); - Serial.println(); - - Serial.printf("Connecting to %s ", ssid); - WiFi.begin(ssid, password); - while (WiFi.status() != WL_CONNECTED) - { - delay(500); - Serial.print("."); - } - Serial.println(" connected"); - } - - - void loop() - { - WiFiClient client; - - Serial.printf("\n[Connecting to %s ... ", host); - if (client.connect(host, 80)) - { - Serial.println("connected]"); - - Serial.println("[Sending a request]"); - client.print(String("GET /") + " HTTP/1.1\r\n" + - "Host: " + host + "\r\n" + - "Connection: close\r\n" + - "\r\n" - ); - - Serial.println("[Response:]"); - while (client.connected() || client.available()) - { - if (client.available()) - { - String line = client.readStringUntil('\n'); - Serial.println(line); - } - } - client.stop(); - Serial.println("\n[Disconnected]"); - } - else - { - Serial.println("connection failed!]"); - client.stop(); - } - delay(5000); - } - -Test it Live -~~~~~~~~~~~~ - -Upload sketch the module and open serial monitor. You should see a log similar to presented below. - -First, after establishing Wi-Fi connection, you should see confirmation, that client connected to the server and send the request: - -:: - - Connecting to sensor-net ........ connected - - [Connecting to www.example.com ... connected] - [Sending a request] - -Then, after getting the request, server will first respond with a header that specifies what type of information will follow (e.g. ``Content-Type: text/html``), how long it is (like ``Content-Length: 1270``), etc.: - -:: - - [Response:] - HTTP/1.1 200 OK - - Cache-Control: max-age=604800 - Content-Type: text/html - Date: Sat, 30 Jul 2016 12:30:45 GMT - Etag: "359670651+ident" - Expires: Sat, 06 Aug 2016 12:30:45 GMT - Last-Modified: Fri, 09 Aug 2013 23:54:35 GMT - Server: ECS (ewr/15BD) - Vary: Accept-Encoding - X-Cache: HIT - x-ec-custom-error: 1 - Content-Length: 1270 - Connection: close - -End of header is marked with an empty line and then you should see the HTML code of requested web page. - -:: - - - - - Example Domain - - - - -