Error please upgrade to the platformio core 6

Guidance on how to upgrade from PlatformIO Core (CLI) v5.x to v6.x with emphasis on major changes, what is new, and what has been removed.

Guidance on how to upgrade from PlatformIO Core (CLI) v5.x to v6.x with emphasis on
major changes, what is new, and what has been removed.

Note

PlatformIO Core 6.0 is FULLY BACKWARD COMPATIBLE* with PlatformIO 5.0 projects.
It means, there are no breaking changes or required migration steps.
Project compatibility between major PlatformIO Core releases is our main task
and part of PlatformIO’s decentralized architecture.

We highly recommend using the latest PlatformIO Core.
See pio upgrade command.

* see a note regarding Unit Testing and the grouped test suites
in the migration steps below.

Please read PlatformIO 6.0 Release Notes before.

Contents

  • Migration Steps

  • What is new

    • Package Management

      • Run package command

      • Virtual symbolic links

    • Unit Testing

      • Test-driven development

      • Hardware-less development

  • What is changed or removed

    • Dropped automatic updates

    • Command Line Interface

Migration Steps¶

PlatformIO Core 6.0 received a lot of new features and updates to improve the
lives of everyday engineers. To benefit from its improvements, we recommend
taking into account the following steps:

  1. Replace deprecated pio lib, pio platform,
    and pio update commands with the unified Package Management CLI

  2. Avoid using global libraries previously installed using the pio lib --global
    command. Ensure that the globallib_dir folder is empty.
    Please use a declarative approach for the safety-critical embedded development
    and declare project dependencies using the lib_deps option

  3. Ensure that project dependencies are declared using the platform,
    platform_packages, and lib_deps options
    in “platformio.ini” (Project Configuration File):

    1. meet the updated Package Specifications

    2. use recommended Semantic Version Requirements
      (check PlatformIO Registry for the available package versions)

    Bad practice (not recommended)

    [env:myenv]
    ; Depend on ANY/Latest version of the development platform
    ; allowing breaking changes
    platform = espressif32
    
    lib_deps =
      ; Omit library package owner (<owner>/<name>) and depend on the library by name.
      ; Lead to the conflicts when there are multiple libraries with the same name
      OneWire
    
      ; Depend on ANY/Latest version of the development platform
      ; allowing breaking changes
      me-no-dev/AsyncTCP
    
      ; Depend on the development branch of the Git repository,
      ; allow breaking changes, and untested commits
      https://github.com/username/HelloWorld.git
    

    Good practice (highly recommended)

    [env:myenv]
    ; Depend on the latest compatible version of development platform
    ; allowing new functionality (backward-compatible), and bug fixes.
    ; No breaking changes
    ; FYI: ^4 == ^4.0.0 == (>=4.0.0, <5.0.0)
    platform = espressif32 @ ^4
    
    lib_deps =
      ; Depend on the latest 6.x stable version of ArduinoJson.
      ; The minimum required version is 6.19.4.
      ; New functionality (backward-compatible) and bug-fixed are allowed
      bblanchon/ArduinoJson @ ^6.19.4
    
      ; Depend on the exact 1.1.1 version
      ; No new functionality (backward-compatible) or bug fixes.
      ; Recommended for safety-critical projects
      me-no-dev/AsyncTCP @ 1.1.1
    
      ; Depend on the particular tag (v2.13) of a Git repository
      https://github.com/username/HelloWorld.git#v2.13
    
  4. If you use a custom testing transport via the “test_transport” option
    in “platformio.ini” (Project Configuration File), please align your codebase with
    Custom unity_config.h. The
    “test_transport” option has been removed.

  5. There is a known bug in PlatformIO Core 5.0 when Unit Testing didn’t handle
    correctly grouped test suites. Please ensure that a test suite folder that
    contains test source files is prefixed with test_.
    See Test Hierarchy for details.

What is new¶

In this section, we are going to highlight the most important changes and
features introduced in PlatformIO Core 6.0. Please visit
PlatformIO 6.0 Release Notes for more detailed information.

Package Management¶

PlatformIO Core 6.0 brings a powerful solution to manage different
Package Types using the unified Package Management CLI:

  • pio pkg install — install the project dependencies or custom packages

  • pio pkg list — list installed packages

  • pio pkg outdated — check for project outdated packages

  • pio pkg search — search for packages

  • pio pkg show — show package information

  • pio pkg uninstall uninstall the project dependencies or custom packages

  • pio pkg update — update the project dependencies or custom packages.

There are no more global packages that could lead to potential issues.
The new package management solution allows you to use a modern declarative approach
for safety-critical embedded development. Using the Semantic Version Requirements
guarantees the full project reproducibility on any supported host machine for decades.

The new Package Management CLI operates in accordance with the active (working) project.
The pio pkg install command will install all required project dependencies.
The pio pkg list commmand allows listing not only dependent libraries
but also development platforms and their packages.

The notable addition is the pio pkg outdated command. It allows you to
check for outdated project packages and list version information for all
dependencies. There are three color legends to help you easily identify
which updates are backward-incompatible.

Run package command¶

PlatformIO Registry contains a rich set of popular toolchains and other useful tools.
The pio pkg exec command allows you to run an arbitrary command from the specified
package. If you specify package requirements using the pio pkg exec --package
option, PlatformIO will ensure that the package is installed before running any command.

Practical use cases include running debugging servers, uploaders or
special tools from a toolchain. A few examples of how to leverage the
new pio pkg exec command:

# Ensure JLink tool is installed and start GDB server
> pio pkg exec --package=tool-jlink -- JLinkGDBServer -singlerun -if JTAG -select USB -jtagconf -1,-1 -device EFR32BG22CxxxF512 -port 2331

# Run Espressif SoC serial bootloader utility and erase a flash from the target device
> pio pkg exec -- esptool.py erase_flash

# Disassembly AVR ELF file
> pio pkg exec -- avr-objdump -d -m avr2 .pio/build/uno/firmware.elf

Virtual symbolic links¶

The most requested feature from the library maintainers was the ability to link
the existing package with the project without hard copying (duplicating). As a
workaround, developers used a Unix-native symlink solution and hence it was
not possible to declare a symlinked dependency in the “platformio.ini” (Project Configuration File).

The PlatformIO Core (CLI) 6.0 introduces cross-platform virtual symbolic links without
any dependencies on the host OS. PlatformIO symlink:// resources do not
require any specific OS permissions. They are portable between different
host machines.

See Package Specifications for “Local Folder”.

Unit Testing¶

It’s been six years
since we added support for unit testing, and Unity was the only available testing framework.
We didn’t expect that the PlatformIO Unit Testing solution will gain broad
popularity, especially when it comes to using it on native (host) machines.

So, the time has come to refresh our view on PlatformIO Unit Testing with taking into account
your feedback and feature requests.

Test-driven development¶

The PlatformIO Core 6.0 introduces an absolutely a new workflow for
test-driven development
in the embedded systems industry.
Thanks to the rich set of supported Testing Frameworks and the ability
to organize tests in groups using the Test Hierarchy, you can create
hybrid projects and benefit from multiple testing frameworks depending on the project
requirements simultaneously. See a simple example of the hybrid configuration:

[env:native]
platform = native
test_framework = googletest
test_filter =
  common/*
  native/*

[env:embedded]
platform = ...
framework = ...
test_framework = unity
test_filter =
  common/*
  embedded/*

Use more advanced C++ testing frameworks with Mocking support such as
GoogleTest in pair with the Native
development platform to run desktop tests on the host machine and a lightweight
framework, such as Unity, for running tests on
the target embedded device with constrained resources.

Hardware-less development¶

It’s hard to imagine today a next-gen project development workflow that does
not benefit from Continuous Integration systems. PlatformIO already provides multiple
solutions to improve code quality including Static Code Analysis. In addition to
the testing frameworks that allow you to mock objects and simulate the
behavior of real objects, the PlatformIO Core 6.0 adds support for the
Simulators.

The combination of simulation tools and testing frameworks allow you to
simulate hardware systems and run unit tests in virtual environments.
Simulators can significantly accelerate project development, especially
when used in pair with Continuous Integration.

Integration of any simulator tool to the PlatformIO Unit Testing
is very simple and does not require any extra software or code writing.
Please take a look at the example below how easy it is to integrate
the Renode simulation framework:

[env:hifive1-revb]
platform = sifive
framework = zephyr
board = hifive1-revb

platform_packages =
    platformio/tool-renode
test_testing_command =
    ${platformio.packages_dir}/tool-renode/renode
    --disable-xwt
    -e include @scripts/single-node/sifive_fe310.resc
    -e showAnalyzer uart1
    -e sysbus LoadELF @${platformio.build_dir}/${this.__env__}/firmware.elf
    -e start

What is changed or removed¶

Dropped automatic updates¶

Thanks to your feedback, we finally removed automatic updates of global libraries
and development platforms. Please use pio pkg outdated to check for outdated
project packages and list version information for all dependencies.

The pio pkg update is intended to update the project dependencies,
custom packages from the PlatformIO Registry, or external sources.

Command Line Interface¶

The following commands have been changed in v6.0.

Command

Description

pio pkg

NEW Unified package management solution

pio project init

NEW pio project init --no-install-dependencies option

pio project metadata

NEW pio project metadata --json-output-path option

pio run

NEW pio run --program-arg option

pio test

NEW pio test --program-arg, pio test --json-output-path,
pio test --junit-output-path, and pio test --list-tests options

pio project data

RENAMED to the pio project metadata

pio lib

DEPRECATED in favor of Package Management CLI

pio platform

DEPRECATED in favor of Package Management CLI

pio update

DEPRECATED in favor of Package Management CLI

Содержание

  1. Troubleshooting¶
  2. Package Manager¶
  3. [Error 5] Access is denied¶
  4. Solution 1: Remove folder¶
  5. Solution 2: Antivirus¶
  6. Solution 3: Run from Terminal¶
  7. Building¶
  8. UnicodeWarning: Unicode equal comparison failed¶
  9. UnicodeDecodeError: Non-ASCII characters found in build environment¶
  10. Error: Please upgrade to the PlatformIO Core 6 #3700
  11. Comments
  12. The problem
  13. Which version of ESPHome has the issue?
  14. What type of installation are you using?
  15. Which version of Home Assistant has the issue?
  16. What platform are you using?
  17. Board
  18. Component causing the issue
  19. Example YAML snippet
  20. Anything in the logs that might be useful for us?
  21. Additional information
  22. error while installing “platformio-ide-terminal #893
  23. Comments
  24. Description
  25. Steps to reproduce
  26. Versions
  27. Additional Information
  28. Platformio-ide no install windows 7 #851
  29. Comments
  30. Configuration
  31. Description of problem
  32. Steps to Reproduce
  33. Actual Results
  34. Additional info

Troubleshooting¶

Package Manager¶

[Error 5] Access is denied¶

PlatformIO installs all packages to “ core_dir /packages” directory. You MUST HAVE write access to this folder. Please note that PlatformIO does not require “sudo”/administrative privileges.

Solution 1: Remove folder¶

A quick solution is to remove “ core_dir /packages” folder and repeat installation/building/uploading again.

Solution 2: Antivirus¶

Some antivirus tools forbid programs to create files in the background. PlatformIO Package Manager does all work in the background: downloads package, unpacks archive in temporary folder and moves final files to “ core_dir /packages” folder.

Antivirus tool can block PlatformIO, that is why you see “[Error 5] Access is denied”. Try to disable it for a while or add core_dir directory to exclusion/whitelist.

Solution 3: Run from Terminal¶

As we mentioned in “Solution 2”, antivirus tools can block background file system operations. Another solution is to run PlatformIO Core (CLI) from a system terminal.

Open System Terminal, on Windows cmd.exe (not PlatformIO IDE Terminal)

Build a project and upload firmware using PlatformIO Core (CLI) which will download and install all dependent packages:

If “pio” command is not globally available in your environment and you use PlatformIO IDE , please use built-in PlatformIO Core (CLI) which is located in:

Windows: C:Users\.platformiopenvScriptsplatformio Please replace with a real user name

You can add platformio and pio commands to your system environment. See Install Shell Commands .

Building¶

UnicodeWarning: Unicode equal comparison failed¶

Full warning message is “UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode — interpreting them as being unequal”.

KNOWN ISSUE. Please move your project to a folder which full path does not contain non-ASCII chars.

UnicodeDecodeError: Non-ASCII characters found in build environment¶

KNOWN ISSUE. PlatformIO Core (CLI) currently does not support projects which contain non-ASCII characters (codes) in a full path or depend on the libraries which use non-ASCII characters in their names.

TEMPORARY SOLUTION

Use PlatformIO IDE , it will automatically install PlatformIO Core (CLI) in a root of system disk ( %DISK%/.platformio ) and avoid an issue when system User contains non-ASCII characters

Do not use non-ASCII characters in project folder name or its parent folders.

Also, if you want to place PlatformIO Core (CLI) in own location, see:

Set PLATFORMIO_CORE_DIR environment variable with own path

Источник

Error: Please upgrade to the PlatformIO Core 6 #3700

The problem

I’m trying to intialize a ESP-01. When I try write to the device I get the error: «Error: Please upgrade to the PlatformIO Core 6». I already has a ESP32 running without any problems. I got the message via USB in my laptop, and also via USB in the RPI4.

All software (HASSIO and ESPHome) is up to date.

Which version of ESPHome has the issue?

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

What platform are you using?

Board

Component causing the issue

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

The text was updated successfully, but these errors were encountered:

Your esphome version is very old.

I removed it, and reinstall. Everything works now. Why didn’t it ask to update?

I removed it, and reinstall. Everything works now. Why didn’t it ask to update?

what exactly did you remove? I’m having this issue too.

You need to remove the add-on and get the current version.

I removed it, and reinstall. Everything works now. Why didn’t it ask to update?

I had a similar problem. Thankfully uninstalling and reinstalling the addon doesn’t remove any data. I had historically restored from backup to new HA installation, so I wonder if that broke it somehow.

I too encountered this, on Mac. Deleting the .esphome and build directories was not sufficient, nor was pip uninstall esphome && pip install esphome —upgrade — I had to delete and recreate the Python virtualenv.

After doing this, esphome run test.yaml was able to build again, and I noticed some output:

Maybe instead of recreating the virtualenv I could have done pip install -U platformio .

All the responses discuss upgrading. Why is this considered acceptable?

I’ve installed esphome about a year ago, built a project and forgot about it. Today I wanted to make a small change in the configuration, and surprise! I can’t actually make a rebuild because I need to upgrade some components. I have zero reasons to upgrade anything, I don’t need any new bugs, if it works, why fix it?

This is not an esphome issue, we have no control over that. It’s from platformio.

Okay please forgive this inexperienced user here! I have this issue and I am getting the error whenever I try to update an existing node or add a new one.

I’m extremely worried about just deleting the add on and then reinstalling it as it would be very painful if I lost the configuration for the nodes (especially one that is remote and uses mqtt to communicate)

Do I just need to literally uninstall the add on and then reinstall it? Restart in-between. Will my node configuration come back or should I save the .yaml files?

Any help appreciated!

Yes, it is mentioned in the change logs «It is safe to delete the ESPHome addon as your configuration YAML files are stored in the Home Assistant configuration folder.»Just uninstall, install and done.

Thanks for fhe response.

Could I also check if HA is likely to request a restart after the uninstall and if so, should I do that or not.

Источник

error while installing “platformio-ide-terminal #893

  • I have reset Atom to defaults prior to submitting report.
  • I have not reset Atom to defaults prior to submitting report.

Description

unable to install .I was using it properly. suddenly I faced some issues with the terminal(not able to type in the terminal) so i uninstalled.after that i could not reinstall it.

Steps to reproduce

1.Go to File —> Settings in Atom editor
2. Click on Install
3. Search for «Terminal»
4. Click on «Install» blue button under platformio-ide-terminal

Expected behavior:
Install platformio-ide-terminal

Actual behavior:
Gives error message after processing for a while

Reproduces how often:
up to 4 times

Versions

OS name and version:
Platformio-ide-terminal version:2.10
windows 10.

Additional Information

######sccreen shot

######version
apm 2.5.0
npm 6.14.5
node 10.20.1 x64
atom 1.50.0
git 2.17.1.windows.2

Installing “platformio-ide-terminal@2.10.0” failed.Hide output…

1AppDataLocalTempapm-install-dir-2020726-32016-1k55zjk.jchhnode_modulesplatformio-ide-terminalnode_modulesnode-pty-prebuilt-multiarch
prebuild-install || node scripts/install.js

1AppDataLocalTempapm-install-dir-2020726-32016-1k55zjk.jchhnode_modulesplatformio-ide-terminalnode_modulesnode-pty-prebuilt-multiarch>if not defined npm_config_node_gyp (node «C:Usersakhil sarasanAppDataLocalatomapp-1.50.0resourcesappapmnode_modulesnpmnode_modulesnpm-lifecyclenode-gyp-bin. node_modulesnode-gypbinnode-gyp.js» rebuild ) else (node «C:Usersakhil sarasanAppDataLocalatomapp-1.50.0resourcesappapmnode_modulesnpmnode_modulesnode-gypbinnode-gyp.js» rebuild )

prebuild-install WARN install unexpected end of file
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS — not found
gyp ERR! find VS looking for Visual Studio 2013
gyp ERR! find VS — not found
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the «Desktop development with C++» workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (C:Usersakhil sarasanAppDataLocalatomapp-1.50.0resourcesappapmnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:121:47)
gyp ERR! stack at findVisualStudio2013 (C:Usersakhil sarasanAppDataLocalatomapp-1.50.0resourcesappapmnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:74:16)
gyp ERR! stack at regSearchKeys (C:Usersakhil sarasanAppDataLocalatomapp-1.50.0resourcesappapmnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:372:16)
gyp ERR! stack at regGetValue (C:Usersakhil sarasanAppDataLocalatomapp-1.50.0resourcesappapmnode_modulesnpmnode_modulesnode-gyplibutil.js:54:7)
gyp ERR! stack at C:Usersakhil sarasanAppDataLocalatomapp-1.50.0resourcesappapmnode_modulesnpmnode_modulesnode-gyplibutil.js:33:16
gyp ERR! stack at ChildProcess.exithandler (child_process.js:301:5)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command «C:Usersakhil sarasanAppDataLocalatomapp-1.50.0resourcesappapmbinnode.exe» «C:Usersakhil sarasanAppDataLocalatomapp-1.50.0resourcesappapmnode_modulesnpmnode_modulesnode-gypbinnode-gyp.js» «rebuild»
gyp ERR! cwd C:UsersAKHILS 1AppDataLocalTempapm-install-dir-2020726-32016-1k55zjk.jchhnode_modulesplatformio-ide-terminalnode_modulesnode-pty-prebuilt-multiarch
gyp ERR! node -v v10.20.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open ‘C:UsersAKHILS 1AppDataLocalTempapm-install-dir-2020726-32016-1k55zjk.jchhpackage.json’
npm WARN apm-install-dir-2020726-32016-1k55zjk.jchh No description
npm WARN apm-install-dir-2020726-32016-1k55zjk.jchh No repository field.
npm WARN apm-install-dir-2020726-32016-1k55zjk.jchh No README data
npm WARN apm-install-dir-2020726-32016-1k55zjk.jchh No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-pty-prebuilt-multiarch@0.9.0-beta21.legacy install: prebuild-install || node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-pty-prebuilt-multiarch@0.9.0-beta21.legacy install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:Usersakhil sarasan.atom.apm_logs2020-08-25T18_35_16_173Z-debug.log

The text was updated successfully, but these errors were encountered:

Источник

Platformio-ide no install windows 7 #851

Configuration

Operating system: windows 7 Professional

PlatformIO Version ( platformio —version ): don’t work

IDE Version 1.7.1

Description of problem

Platformio-IDE Core Failed to Retrieve.
I tried everything but the problem persists.
I followed the installation guide and everything seems to be fine but when I start Atom, is the welcome screen of platformio-ide but can not download or to start the core.
performing pip in the end the result is this:
pio
Traceback (most recent call last):
File «C:Python27Librunpy.py», line 174, in _run_module_as_main

File «C:Python27Librunpy.py», line 72, in run_code
exec code in run_globals
File «C:Usersfdebernardi.atompackagesplatformio-idepenvScriptspio.exe_main
.py», line 5, in
File «c:usersfdebernardi.atompackagesplatformio-idepenvlibsite-packagesplatformio_main_.py», line 24, in
from platformio import version, exception, maintenance
File «c:usersfdebernardi.atompackagesplatformio-idepenvlibsite-packagesplatformiomaintenance.py», line 25, in
from platformio.commands.lib import lib_update as cmd_lib_update
File «c:usersfdebernardi.atompackagesplatformio-idepenvlibsite-packagesplatformiocommandslib.py», line 32, in
» library storage %s » % join(util.get_home_dir(), «lib»))
File «c:usersfdebernardi.atompackagesplatformio-idepenvlibsite-packagesplatformioutil.py», line 214, in get_home_dir
os.makedirs(home_dir)
File «c:usersfdebernardi.atompackagesplatformio-idepenvlibos.py», line 150, in makedirs
makedirs(head, mode)
File «c:usersfdebernardi.atompackagesplatformio-idepenvlibos.py», line 150, in makedirs
makedirs(head, mode)
File «c:usersfdebernardi.atompackagesplatformio-idepenvlibos.py», line 150, in makedirs
makedirs(head, mode)
File «c:usersfdebernardi.atompackagesplatformio-idepenvlibos.py», line 157, in makedirs
mkdir(name, mode)
WindowsError: [Error 3] Impossibile trovare il percorso specificato: ‘Q:\ ‘
PS C:Usersfdebernardi>

Steps to Reproduce

For each new installation before doing a file cleaning eliminating atom from the control panel and folders in appdata and .atom

Actual Results

Platformio-IDE CORE not installed.

Additional info

I installed platformio-ide on ubuntu 15.04 mate smoothly.
On another PC with windows7 U. it worked the first time and on another laptop
windows7 with U. I had to struggle after various installations and removals, but is now working.
Only the latter laptop with windows 7 professional does not want platformio.

The text was updated successfully, but these errors were encountered:

Источник

Recommend Projects

  • React photo

    React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo

    Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo

    Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo

    TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo

    Django

    The Web framework for perfectionists with deadlines.

  • Laravel photo

    Laravel

    A PHP framework for web artisans

  • D3 photo

    D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Visualization

    Some thing interesting about visualization, use data art

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo

    Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo

    Microsoft

    Open source projects and samples from Microsoft.

  • Google photo

    Google

    Google ❤️ Open Source for everyone.

  • Alibaba photo

    Alibaba

    Alibaba Open Source for everyone

  • D3 photo

    D3

    Data-Driven Documents codes.

  • Tencent photo

    Tencent

    China tencent open source team.

The problem

I’m trying to intialize a ESP-01. When I try write to the device I get the error: «Error: Please upgrade to the PlatformIO Core 6». I already has a ESP32 running without any problems. I got the message via USB in my laptop, and also via USB in the RPI4.

All software (HASSIO and ESPHome) is up to date.

Please help.

Which version of ESPHome has the issue?

2022.2.5

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2022.10.4

What platform are you using?

ESP8266

Board

ESP-01

Component causing the issue

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

INFO Reading configuration /config/esphome/tempsensor-1.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing tempsensor-1 (board: esp01_1m; framework: arduino; platform: platformio/espressif8266 @ 3.2.0)
--------------------------------------------------------------------------------
Platform Manager: Installing platformio/espressif8266 @ 3.2.0
Error: Please upgrade to the PlatformIO Core 6

Additional information

No response

Your esphome version is very old.

I removed it, and reinstall. Everything works now. Why didn’t it ask to update?

I removed it, and reinstall. Everything works now. Why didn’t it ask to update?

what exactly did you remove? I’m having this issue too.

You need to remove the add-on and get the current version.

I had a similar problem. Thankfully uninstalling and reinstalling the addon doesn’t remove any data. I had historically restored from backup to new HA installation, so I wonder if that broke it somehow.

I too encountered this, on Mac. Deleting the .esphome and build directories was not sufficient, nor was pip uninstall esphome && pip install esphome --upgrade — I had to delete and recreate the Python virtualenv.

After doing this, esphome run test.yaml was able to build again, and I noticed some output:

***********
There is a new version 6.1.4 of PlatformIO available.
Please upgrade it via `platformio upgrade` or `pip install -U platformio` command.
Changes: https://docs.platformio.org/en/latest/history.html
***********

Maybe instead of recreating the virtualenv I could have done pip install -U platformio.

All the responses discuss upgrading. Why is this considered acceptable?

I’ve installed esphome about a year ago, built a project and forgot about it. Today I wanted to make a small change in the configuration, and surprise! I can’t actually make a rebuild because I need to upgrade some components. I have zero reasons to upgrade anything, I don’t need any new bugs, if it works, why fix it?

This is not an esphome issue, we have no control over that. It’s from platformio.

Okay please forgive this inexperienced user here! I have this issue and I am getting the error whenever I try to update an existing node or add a new one.

I’m extremely worried about just deleting the add on and then reinstalling it as it would be very painful if I lost the configuration for the nodes (especially one that is remote and uses mqtt to communicate)

Do I just need to literally uninstall the add on and then reinstall it? Restart in-between. Will my node configuration come back or should I save the .yaml files?

Any help appreciated!

Thanks

Yes, it is mentioned in the change logs «It is safe to delete the ESPHome addon as your configuration YAML files are stored in the Home Assistant configuration folder.»Just uninstall, install and done.

Thanks for fhe response.

Could I also check if HA is likely to request a restart after the uninstall and if so, should I do that or not.

Thanks

Had to do:

pip install -U platformio
pip install -U esphome

for it to work

I removed the ESPHome and re-added. All good and didn’t lose anything.

Did the uninstall/install and everything seems to be still there and working after updating.

Thanks everybody!

I too did the re&re from 2022.3.x to 2022.11.3 and have finished updating 9 of my 10 devices with no issues.
EmporiaVue is still not supported…

Tool Manager: Installing platformio/toolchain-esp32ulp @ ~1.22851.0
INFO Installing platformio/toolchain-esp32ulp @ ~1.22851.0
Error: Could not find the package with 'platformio/toolchain-esp32ulp @ ~1.22851.0' requirements for your system 'linux_aarch64'

Same problem for me today using esphome:latest via docker on command line of Rasp. Pi 4. Same fix as per these commands.

rm -R .esphome
docker pull esphome/esphome:2022.11.3
docker run  --privileged --rm -v "${PWD}":/config -it esphome/esphome:2022.11.3 run test.yaml

cguimaraes

ESP-IDF: Import of non-existent variable »projenv»

Configuration

Operating system: MacOS

PlatformIO Version (platformio --version): PlatformIO Core, version 6.0.3rc1

Description of problem

Before the update to PlatformIO Core v6.0.0, I was able to globally define additional macros (e.g. -DFoo) in a project from any extra_script.py of used libraries.
Just like this:

Import('env')
from os.path import join, realpath

cppdefines = []

framework = env.get("PIOFRAMEWORK")[0]
if framework == 'zephyr':
  cppdefines=["FOO_ZEPHYR"]

elif framework == 'arduino':
  cppdefines=["FOO_ARDUINO"]

elif framework == 'espidf':
  cppdefines=["FOO_ESPIDF"]

env.Append(CPPDEFINES=cppdefines)

global_env = DefaultEnvironment()
global_env.Append(CPPDEFINES=cppdefines)

After the update to PlatformIO Core >= v6.0.0, any file in the project/src will not take them into account (confirmed by running with platformio run -v ).

It seems that adding the following lines solves the problem for a subset of frameworks.

Import('projenv')
projenv.Append(CPPDEFINES=cppdefines)

However, ESP-IDF framework still fails due to Import of non-existent variable ''projenv'' .

Steps to Reproduce

  1. Create a dummy library and set extra_script_py (the one above for example).
  2. Create a dummy source that uses the library.
  3. Check if any of the FOO_* is being defined and observe errors

Actual Results

Processing az-delivery-devkit-v4 (platform: espressif32; board: az-delivery-devkit-v4; framework: espidf)
----------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/az-delivery-devkit-v4.html
PLATFORM: Espressif 32 (4.4.0) > AZ-Delivery ESP-32 Dev Kit C V4
HARDWARE: ESP32 240MHz, 520KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-espidf @ 3.40302.0 (4.3.2)
 - tool-cmake @ 3.16.4
 - tool-esptoolpy @ 1.30300.0 (3.3.0)
 - tool-mkfatfs @ 2.0.1
 - tool-mklittlefs @ 1.203.210628 (2.3)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - tool-ninja @ 1.9.0
 - toolchain-esp32ulp @ 1.22851.191205 (2.28.51)
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
WARNING: There was an error checking the latest version of pip.
Reading CMake configuration...

*** Import of non-existent variable ''projenv''
File "extra_script.py", line 1, in <module>

Expected Results

It to build.

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:az-delivery-devkit-v4]
platform = espressif32
board = az-delivery-devkit-v4
framework = espidf

Additional info

N/A

ivankravets

*** Import of non-existent variable »projenv»
File «extra_script.py», line 1, in

What is your extra script? It seems you have a broken import directive. It should be Import("projenv").

cguimaraes

cguimaraes

Note that, for Arduino and Zephyr projects the partial fix worked without major issues, but it fails for ESP-IDF.

cguimaraes

@ivankravets I just noticed that you closed the issue.

It seems you have a broken import directive.

You observation is correct.
Still, my question is why such directive does not exist whenever I have a project for espidf framework?

ivankravets

The projenv environment is only available for the POST script. Could you share a simple project to reproduce this issue?

cguimaraes

Here is an out-of-the-box example that allows to reproduce the issue: https://github.com/cguimaraes/fix-89-example-for-pio

For some reason, the following lines are not properly defining ZENOH_ARDUINO_ESP32 or ZENOH_ESPIDF for any file in the src directory of the main project, thus the #error "Unknown platform".

global_env = DefaultEnvironment()
global_env.Append(CPPDEFINES=cppdefines)
In file included from .pio/libdeps/az-delivery-devkit-v4/zenoh-pico/include/zenoh-pico/collections/element.h:18,
                 from .pio/libdeps/az-delivery-devkit-v4/zenoh-pico/include/zenoh-pico/collections/intmap.h:18,
                 from .pio/libdeps/az-delivery-devkit-v4/zenoh-pico/include/zenoh-pico/utils/properties.h:19,
                 from .pio/libdeps/az-delivery-devkit-v4/zenoh-pico/include/zenoh-pico/api/config.h:18,
                 from .pio/libdeps/az-delivery-devkit-v4/zenoh-pico/include/zenoh-pico.h:19,
                 from /Users/user/Documents/TestEnvironment/fix-89-example-for-pio/arduino/src/zn_pub.ino:20:
.pio/libdeps/az-delivery-devkit-v4/zenoh-pico/include/zenoh-pico/system/platform.h:30:2: error: #error "Unknown platform"
 #error "Unknown platform"

Note that, in Platformio Core <=v6.0.0 it was working just fine.

The PR mentioned in a previous post ( https://github.com/eclipse-zenoh/zenoh-pico/pull/92/files ) fixes this, but not for the ESPIDF.
But according to your last message, it seems that Arduino/Zephyr builds should also fail for the same reason which is not the case.

ivankravets

That was the bug in PlatformIO Core 5. PlatformIO Core 6.0 fixes it and introduces 2 isolated build environments: global and project.

  1. Please upgrade to the latest PlatformIO Core 6.0.3-dev using the pio upgrade --dev command
  2. Try this code:
Import("projenv")

projenv.Append(CPPDEFINES=cppdefines)

Now, macros will go to the «src» files from the project.

cguimaraes

That bring us to the initial issue on this post whenever the target framework is espidf.

Processing az-delivery-devkit-v4 (platform: espressif32; board: az-delivery-devkit-v4; framework: espidf)
----------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/az-delivery-devkit-v4.html
PLATFORM: Espressif 32 (4.4.0) > AZ-Delivery ESP-32 Dev Kit C V4
HARDWARE: ESP32 240MHz, 520KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-espidf @ 3.40302.0 (4.3.2)
 - tool-cmake @ 3.16.4
 - tool-esptoolpy @ 1.30300.0 (3.3.0)
 - tool-mkfatfs @ 2.0.1
 - tool-mklittlefs @ 1.203.210628 (2.3)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - tool-ninja @ 1.9.0
 - toolchain-esp32ulp @ 1.22851.191205 (2.28.51)
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
WARNING: There was an error checking the latest version of pip.
Reading CMake configuration...

*** Import of non-existent variable ''projenv''

ivankravets

Could you re-run pio upgrade --dev. Does it work now?

cguimaraes

Unfortunately, the issue still persists.
I have also executed pio pkg update after pio upgrade --dev.

% platformio run
Processing az-delivery-devkit-v4 (platform: espressif32; board: az-delivery-devkit-v4; framework: espidf)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/az-delivery-devkit-v4.html
PLATFORM: Espressif 32 (4.4.0) > AZ-Delivery ESP-32 Dev Kit C V4
HARDWARE: ESP32 240MHz, 520KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-espidf @ 3.40302.0 (4.3.2)
 - tool-cmake @ 3.16.4
 - tool-esptoolpy @ 1.30300.0 (3.3.0)
 - tool-ninja @ 1.9.0
 - toolchain-esp32ulp @ 1.22851.191205 (2.28.51)
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
WARNING: There was an error checking the latest version of pip.
Reading CMake configuration...

*** Import of non-existent variable ''projenv''
File "extra_script.py", line 1, in <module>

ivankravets

Did you remove “pre:” prefix from extra scripts path in PlatformIO.ini?

cguimaraes

This is the platformio.ini of the main project:

[env:az-delivery-devkit-v4]
platform = espressif32
board = az-delivery-devkit-v4
framework = espidf
lib_deps = https://github.com/eclipse-zenoh/zenoh-pico

In Zenoh-Pico library, there is the following library.json:

{
    "name": "zenoh-pico",
    "license": "Apache-2.0",
    "build": {
        "extraScript": "extra_script.py"
    },
    "dependencies":
    {
       "BluetoothSerial": "1.0"
    }
}

ivankravets

I see the problem. It is linked with the ESP-IDF build script on the PlatformIO side. We will think about how to resolve this issue.

ivankravets

cguimaraes

@ivankravets thank you for the fix.
But, contrary to what you said, the build_flags are being set in the main project as expected.
Meaning that it fixed all the issues I was witnessing.

cguimaraes

@ivankravets it seems that this issue has been introduced again for ESP-IDF.
Any flag being set in cppdefines in the extra_script.py of my library is not taking effect on the main project (which makes use of the library).

ivankravets

cguimaraes

In extra_script.py of the library, I have the following lines to expose flags into the main project:

# pass flags to a global build environment (for all libraries, etc)
global_env = DefaultEnvironment()
global_env.Append(CPPDEFINES=CPPDEFINES)

where CPPDEFINES is

CPPDEFINES = ["ZENOH_ESPIDF"]

The issue so far is only with ESP-IDF platform.
The same approach is working as expected for MbedOS, Zephyr and Arduino ports.

ivankravets

  • #1

Попытался установить Platformio .Но не тут -то было.
Окно имело такой вид-PL1.jpg

как по инструкции должен был добавить расширение Platformio , но оно уже было установлено

PL2.jpg

щелкнул по нему появилось окно

PL3.jpg
и все и дальше ни чего не происходит Что делать?

  • #3

Переустанавливал -тоже самое.

Эдуард Анисимов


  • #4

@vladrin, У меня это решилось следующим образом.
Правой кнопкой на плагине. Выбрать «Установить другую версию…»
1588493880652.png
Появится вот такое окно.
1588493975960.png
Выбираете версию 1.8.0
После переинсталляции и перезагрузки, должно заработать.
После этого он скажет что есть новая версия.
Я проапдейтил. Всё работает.

  • #5

Снес Windows.заново все установил, выбрал версию 1.8.0,
обновил до 1.10 .перезапустил — и ничего -все как было.

Эдуард Анисимов


  • #6

А версия 1.8 заработала? Пока не заработает. Обновлять нельзя. Попробуйте 1.9
Но обязательно дождитесь пока не заработает.
Она ковыряется минут 5. Что то обновляет. Что то где то прописывает.
Пока она это всё не «проковыряет» обновляться бесполезно.

По крайней мере, этот метод помог мне не раз.

Эдуард Анисимов


  • #8

Забыл ещё сказать. Имя пользователя в системе должно быть англоязычным.
Вот тут ещё скинул какие галки и где должны стоять. Проверьте.
1588495695519.png

  • #9

Прошло мину 10 и ничего висит синяя 1 ,наводишь на нее курсор (устаревшее расширение ,попробую еще раз все переустановить
pl4.jpg

Эдуард Анисимов


  • #11

Справа внизу, на синей полоске, колокольчик с точкой. Там какое то предупреждение, скорее всего.
Нужно посмотреть. Может прольёт какой то свет на проблему.

Больше не знаю, чем помочь.

  • #12

Нажал на колокольчик20200503_123815.jpg

  • #13

Это расширение установлено, на что ругается непонятно

  • #14

(Эдуард Анисимов,Больше не знаю, чем помочь.)

С твоей помощью кое -как удалось все запустить но на этом проблемы не закончились,может посмотришь еще:

Проект Blink из ардуино

Pl5.jpg

Pl6.jpg

запуск без отладки—

Pl7.jpg

нажимаю показать ошибки —

Pl8.jpg

и все!

kostyamat


  • #15

Снес Windows.заново все установил

🤔 Наверное нужно было процессор ещё заменить, и лучше в комплекте с оперативкой.

@vladrin, оно же ниже написало — мол «не умею я ещё работать с отладчиком для Arduino Uno». Что не понятно? Какие ещё ошибки вы хотели посмотреть?

А выше, на синеньком скриншете, оно просто объяснило, что расширение GIT supercharger зависит от установленной в системе программы GIT, а она на компе не установлена.

Как вы вообще собираетесь со всем этим работать, не зная языка (или не желая читать и вспоминать школьный курс), и даже не пробуя воспользоваться хотя бы онлайн переводчиком?

Изменено: 3 Май 2020

  • #16

🤔 Наверное нужно было процессор ещё заменить, и лучше в комплекте с оперативкой.

Не смешно! мне скоро 70 и мне все интересно ,а если что-то не получается пытаюсь делать как умею

  • #17

не то нажимаеш
внизу дави кнопку с галочкой build
отладжка тут не работает

  • #18

не то нажимаеш
внизу дави кнопку с галочкой build
отладжка тут не работает

Благодарю! Сказывается возраст- невнимательность.Раньше занимался PIC контроллерами с (ассемблером) ,теперь решил освоить эту тему,еще раз большое спасибо.

kostyamat


  • #19

@vladrin, вот и мне не смешно, я же «смешной» смайлик не поставил.

Дополнил выше, перечитайте. (GIT supercharger лучше выключить, или удалить, вы с GIT точно не разберётесь, да и не нужно оно вам).

  • #20

@vladrin, вот и мне не смешно, я же «смешной» смайлик не поставил.

Дополнил выше, перечитайте. (GIT supercharger лучше выключить, или удалить, вы с GIT точно не разберётесь, да и не нужно оно вам).

Спасибо!

  • #21

если с ардуиной собрался работать, то лучше использовать Atmel Studio 7 IDE + плагин visual micro
там все куда проще и все заточено под авр и есть отладчик виртуальный

Arduino IDE for Microchip Studio

Develop exactly the same code in Microchip Studio or the Arduino IDE. A fully compatible Arduino development environment that benfits from the Microchip Studio IDE (Atmel Studio) and programming tools.

www.visualmicro.com


www.visualmicro.com

  • #22

если с ардуиной собрался работать, то лучше использовать Atmel Studio 7 IDE + плагин visual micro
там все куда проще и все заточено под авр и есть отладчик виртуальный

Arduino IDE for Microchip Studio

Develop exactly the same code in Microchip Studio or the Arduino IDE. A fully compatible Arduino development environment that benfits from the Microchip Studio IDE (Atmel Studio) and programming tools.

www.visualmicro.com


www.visualmicro.com

Спасибо за совет-попробую.

  • #24

@kostyamat,
за денежку в виде доната или если коммерческое использование
и вроде отладчик там в плагине денег стоит, но я не пользуюсь им для авр, проще тогда в протеусе загрузить елф файл

Nope, only the ones mentioned in the platformio.ini.

I will create one, just to make sure we’re talking about the same here.
The problem is, I tested it on:
— Windows 10 with Python 3.8
— Ubuntu 18.04 (command line) With Python 2.7
— Travis with Python 2.7
— Chromebook with Chrome-OS + VScode

And so it is really not clear what’s the problem here.

So below is just the concatenation of the platformio*.ini files as mentioned in the platform.ini in this order:

Code: Select all

extra_configs =
  platformio_core_defs.ini
  platformio_esp82xx_base.ini
  platformio_esp82xx_envs.ini
  platformio_esp32_envs.ini
  platformio_special_envs.ini

Use this as platformio.ini:

Code: Select all

;
; PlatformIO Project Configuration File
;
; Please make sure to read documentation with examples first
; http://docs.platformio.org/en/stable/projectconf.html
;

; *********************************************************************;
; You can uncomment or add here Your favorite environment you want to work on at the moment
; (uncomment only one !)
; *********************************************************************;

[platformio]
description  = Firmware for ESP82xx/ESP32 for easy IoT deployment of sensors.
;default_envs = custom_ESP8266_4M1M, custom_ESP32_4M316k
;default_envs = dev_ESP8266_4M1M
;default_envs = normal_ESP8266_4M1M
;default_envs = test_beta_ESP8266_4M1M
; ..etc
;build_cache_dir = $PROJECT_DIR.buildcache



; add these:
; -Werror -Wall -Wextra -pedantic -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op
;                    -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-promo -Wstrict-null-sentinel
;                    -Wstrict-overflow=5 -Wundef -Wno-unused -Wno-variadic-macros -Wno-parentheses -fdiagnostics-show-option
; thanks @chouffe103
[compiler_warnings]
build_flags = -Wall -Wno-parentheses -fdiagnostics-show-option


[minimal_size]
build_flags = 
  -Os
  -ffunction-sections 
  -fdata-sections
  -Wl,--gc-sections
  -s


[espota]
upload_protocol = espota
; each flag in a new line
; Do not use port 8266 for OTA, since that's used for ESPeasy p2p
upload_flags_esp8266 = 
  --port=18266
upload_flags_esp32 =
  --port=3232
build_flags = -DFEATURE_ARDUINO_OTA
upload_port = 192.168.1.152



[debug_flags]
build_flags               = 

[mqtt_flags]
build_flags               = -DMQTT_MAX_PACKET_SIZE=1024


[common]
lib_ldf_mode              = chain
lib_archive               = false
framework                 = arduino
upload_speed              = 115200
monitor_speed             = 115200
;targets                   = size, checkprogsize
targets                   =
extra_scripts             = pre:pre_default_check.py


[env]
extends                   = common


; *********************************************************************

; **** Definition cheat sheet:
; board_build.flash_mode in terms of performance: QIO > QOUT > DIO > DOUT
; for lib_ldf_mode, see http://docs.platformio.org/en/latest/librarymanager/ldf.html;ldf

; **** Frequently used build flags:
; Use custom.h file to override default settings for ESPeasy: -D USE_CUSTOM_H
; Set VCC mode to measure Vcc of ESP chip :                   -D FEATURE_ADC_VCC=true

; Build Flags:
;  -DUSE_CONFIG_OVERRIDE
; lwIP 1.4 (Default)
;  -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
; lwIP 2 - Low Memory
;  -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
; lwIP 2 - Higher Bandwitdh
;  -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
; VTABLES in Flash (default)
;  -DVTABLES_IN_FLASH
; VTABLES in Heap
;  -DVTABLES_IN_DRAM
; VTABLES in IRAM
;  -DVTABLES_IN_IRAM
; NO_EXTRA_4K_HEAP - this forces the default NONOS-SDK user's heap location
;     Default currently overlaps cont stack (Arduino) with sys stack (System)
;     to save up-to 4 kB of heap. (starting core_2.4.2)
; ESP8266_DISABLE_EXTRA4K  - Calls disable_extra4k_at_link_time() from setup
;                            to force the linker keep user's stack in user ram.
; CONT_STACKSIZE to set the 'cont' (Arduino) stack size. Default = 4096
; -mtarget-align  see: https://github.com/arendst/Sonoff-Tasmota/issues/3678#issuecomment-419712437

[esp82xx_defaults]
build_flags               = -D BUILD_GIT='"${sysenv.TRAVIS_TAG}"'
                            -D NDEBUG
                            -lstdc++ -lsupc++
                            -mtarget-align
                            -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
                            -DVTABLES_IN_FLASH
                            -DPUYA_SUPPORT=1

[esp82xx_2_5_x]
build_flags               = -D BUILD_GIT='"${sysenv.TRAVIS_TAG}"'
                            -DNDEBUG
                            -mtarget-align
                            -DVTABLES_IN_FLASH
                            -fno-exceptions
                            -lstdc++
                            -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY_LOW_FLASH
                            -DPUYA_SUPPORT=1
                            -DCORE_POST_2_5_0

[esp82xx_2_6_x]
build_flags               = ${esp82xx_2_5_x.build_flags} 
                            -O2
                            -DBEARSSL_SSL_BASIC
                            -DCORE_POST_2_6_0 


;[core_2_3_0]
;platform                  = https://github.com/TD-er/platform-espressif8266.git#patch/v1.5.0_Puya
;build_flags               = -D BUILD_GIT='"${sysenv.TRAVIS_TAG}"'
;                            -DNDEBUG
;                            -DVTABLES_IN_FLASH
;                            -fno-exceptions
;                            -DPUYA_SUPPORT=1
;                            -DARDUINO_ESP8266_RELEASE_2_3_0
;                            -DFORCE_PRE_2_5_0
;lib_ignore                = ESP32_ping, ESP32WebServer, IRremoteESP8266, HeatpumpIR

;[core_2_4_0]
;platform                  = https://github.com/TD-er/platform-espressif8266.git#patch/v1.6.0_Puya
;build_flags               = ${esp82xx_defaults.build_flags} -DARDUINO_ESP8266_RELEASE_2_4_0 -DFORCE_PRE_2_5_0
;lib_ignore                = ESP32_ping, ESP32WebServer, IRremoteESP8266, HeatpumpIR

;[core_2_4_1]
;platform                  = https://github.com/TD-er/platform-espressif8266.git#patch/v1.7.3_Puya
;build_flags               = ${esp82xx_defaults.build_flags} -DARDUINO_ESP8266_RELEASE_2_4_1 -DFORCE_PRE_2_5_0
;lib_ignore                = ESP32_ping, ESP32WebServer, IRremoteESP8266, HeatpumpIR


[core_2_4_2]
platform                  = https://github.com/TD-er/platform-espressif8266.git#patch/v1.8.0_Puya
build_flags               = ${esp82xx_defaults.build_flags} -DARDUINO_ESP8266_RELEASE_2_4_2 -DFORCE_PRE_2_5_0
lib_ignore                = ESP32_ping, ESP32WebServer, IRremoteESP8266, HeatpumpIR

;[core_2_5_0]
;platform                  = espressif8266@2.0.4
;build_flags               = ${esp82xx_2_5_x.build_flags}

;[core_2_5_2]
;platform                  = espressif8266@2.2.3
;build_flags               = ${esp82xx_2_5_x.build_flags}


; See for SDK flags: https://github.com/esp8266/Arduino/blob/master/tools/platformio-build.py

[core_2_6_0]
platform                  = https://github.com/Jason2866/platform-espressif8266.git#core_2_6_0
build_flags               = ${esp82xx_2_6_x.build_flags} 
                            -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703

[core_2_6_1]
platform                  = https://github.com/Jason2866/platform-espressif8266.git#core_2_6_1
build_flags               = ${esp82xx_2_6_x.build_flags} 
                            -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703

[core_2_6_1_sdk3]
platform                  = https://github.com/Jason2866/platform-espressif8266.git#core_2_6_1
build_flags               = ${esp82xx_2_6_x.build_flags} 
                            -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK3

[core_stage]
platform                  = https://github.com/platformio/platform-espressif8266.git#feature/stage
build_flags               = ${esp82xx_2_6_x.build_flags}
                            -DARDUINO_ESP8266_RELEASE='"2.7.0-dev stage"'
                            -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191105

[core_esp32_1_11_1]
platform                  = espressif32@1.11.1

[core_esp32_stage]
platform                  = https://github.com/platformio/platform-espressif32.git#feature/stage

;;; ESP82xx base definitions*******************************************
; Basic definitions used in ESP82xx environments                      ;
; *********************************************************************



[regular_platform]
build_unflags             =
build_flags               = ${core_2_6_1.build_flags}
platform                  = ${core_2_6_1.platform}

[core261_sdk3_platform]
build_unflags             =
build_flags               = ${core_2_6_1_sdk3.build_flags}
platform                  = ${core_2_6_1_sdk3.platform}

[beta_platform]
build_unflags             =
build_flags               = ${core_stage.build_flags}
platform                  = ${core_stage.platform}



[esp82xx_common]
extends                   = common
board_build.f_cpu         = 80000000L
build_flags               = ${debug_flags.build_flags} ${mqtt_flags.build_flags} -DHTTPCLIENT_1_1_COMPATIBLE=0
build_unflags             = -DDEBUG_ESP_PORT
lib_deps                  = https://github.com/TD-er/ESPEasySerial.git
lib_ignore                = ESP32_ping, ESP32WebServer, IRremoteESP8266, HeatpumpIR, SD(esp8266), SDFS
board                     = esp12e



;;; NORMAL (STABLE) ***************************************************
; normal version with stable plugins                                  ;
; *********************************************************************

[normal]
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags}

[normal_beta]
platform                  = ${beta_platform.platform}
build_flags               = ${beta_platform.build_flags}


;;; TEST  *************************************************************
; additional plugins (and dependend code) that is marked as TESTING   ;
; Includes "normal" + "testing" plugins                               ;
; *********************************************************************

[testing]
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags} -DPLUGIN_BUILD_TESTING

[testing_beta]
platform                  = ${beta_platform.platform}
build_flags               = ${beta_platform.build_flags} -DPLUGIN_BUILD_TESTING


;;; DEV  **************************************************************
; additional plugins (and dependend code) that is in development      ;
; (probably broken or incomplete)                                     ;
; *********************************************************************

[dev]
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags} -DPLUGIN_BUILD_DEV


;;; IR      ***********************************************************
; IR builds                                                           ;
; *********************************************************************

[ir]
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags}
lib_ignore                = ESP32_ping, ESP32WebServer, SD(esp8266), SDFS

[minimal_ir]
extends                   = ir
build_flags               = ${ir.build_flags} -DPLUGIN_BUILD_MINIMAL_IR

[minimal_ir_extended]
extends                   = ir
build_flags               = ${ir.build_flags} -DPLUGIN_BUILD_MINIMAL_IRext

[normal_ir]
extends                   = ir
build_flags               = ${ir.build_flags} -DPLUGIN_BUILD_NORMAL_IR

[normal_ir_extended]
extends                   = ir
build_flags               = ${ir.build_flags} -DPLUGIN_BUILD_IR_EXTENDED

[normal_ir_extended_no_rx]
extends                   = ir
build_flags               = ${ir.build_flags} -DPLUGIN_BUILD_IR_EXTENDED_NO_RX



;;; 1MB flash nodes  **************************************************
; Layout for 1M flash nodes                                           ;
; *********************************************************************
[esp82xx_1M]
extends                   = esp82xx_common
board_build.flash_mode    = dout
board_upload.maximum_size = 786432
build_flags               = -Wl,-Tesp8266.flash.1m128.ld 
                            -DSIZE_1M 
                            -DBUILD_NO_DEBUG
                            ${esp82xx_common.build_flags}

[esp8266_1M]
extends                   = esp82xx_1M
board                     = esp01_1m

[esp8285_1M]
extends                   = esp82xx_1M
board                     = esp8285
build_flags               = ${esp8266_1M.build_flags} -DESP8285


;;; Minimal ***********************************************************
; Minimal build size for OTA                                          ;
; *********************************************************************
[esp82xx_1M_OTA]
extends                   = esp82xx_common
board_build.flash_mode    = dout
board_upload.maximum_size = 616448
build_flags               = ${esp82xx_1M.build_flags} -DPLUGIN_BUILD_MINIMAL_OTA


[esp8266_1M_OTA]
extends                   = esp82xx_1M_OTA
board                     = esp01_1m

[esp8285_1M_OTA]
extends                   = esp82xx_1M_OTA
board                     = esp8285
build_flags               = ${esp82xx_1M_OTA.build_flags} -DESP8285


;;; 2MB flash nodes  **************************************************
; Layout for 2M flash nodes                                           ;
; *********************************************************************

[esp8266_2M256]
extends                   = esp82xx_common
board                     = esp12e
board_build.flash_mode    = dio
board_upload.maximum_size = 1044464
build_flags               = -Wl,-Tesp8266.flash.2m256.ld
                            ${esp82xx_common.build_flags}

[espWroom2M]
extends                   = esp82xx_common
board                     = esp12e
board_build.flash_mode    = dio
board_upload.maximum_size = 1044464
build_flags               = -Wl,-Tesp8266.flash.2m.ld
                            ${esp82xx_common.build_flags}

[espWroom2M256]
extends                   = esp82xx_common
board_build.flash_mode    = dout
board_upload.maximum_size = 1044464
board                     = esp_wroom_02
build_flags               = -Wl,-Tesp8266.flash.2m256.ld
                            ${esp82xx_common.build_flags}


;;; 4MB flash nodes  **************************************************
; Layout for 4M flash nodes                                           ;
; *********************************************************************

[esp8266_4M1M]
extends                   = esp82xx_common
board                     = esp12e
board_build.flash_mode    = dio
board_upload.maximum_size = 1044464
build_flags               = -Wl,-Tesp8266.flash.4m1m.ld
                            ${esp82xx_common.build_flags}

[esp8266_4M2M]
extends                   = esp82xx_common
board                     = esp12e
board_build.flash_mode    = dio
board_upload.maximum_size = 1044464
build_flags               = -Wl,-Tesp8266.flash.4m2m.ld
                            ${esp82xx_common.build_flags}



;;; 16MB flash nodes  *************************************************
; Layout for 16M flash nodes                                          ;
; *********************************************************************

; Configuration for the Wemos D1 mini pro (16M)
; This configuration can only be used with core versions 2.5.0 or newer.
; Performance of 14M SPIFFS is really slow.
; See https://github.com/esp8266/Arduino/issues/5932
[esp8266_16M]
extends                   = esp82xx_common
board                     = esp12e
board_build.flash_mode    = dio
board_upload.maximum_size = 1044464
build_flags               = -Wl,-Tesp8266.flash.16m14m.ld 
                            -DSPIFFS_MAX_OPEN_FILES=20
                            ${esp82xx_common.build_flags}

;;; Custom builds *****************************************************
; Use either the plugins defined in                                   ;
; pre_custom_esp82xx.py or Custom.h                                   ;
; *********************************************************************


[hard_esp82xx]
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags}
                            -DBUILD_NO_DEBUG
                            -DPLUGIN_BUILD_CUSTOM


; Custom: 4M1M version --------------------------
[env:custom_ESP8266_4M1M]
extends                   = esp8266_4M1M
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags} 
                            ${esp8266_4M1M.build_flags} 
                            -DPLUGIN_BUILD_CUSTOM
lib_ignore                = ESP32_ping, ESP32WebServer
extra_scripts             = pre:pre_custom_esp82xx.py


[env:custom_sdk3_ESP8266_4M1M]
extends                   = esp8266_4M1M
platform                  = ${core261_sdk3_platform.platform}
build_flags               = ${core261_sdk3_platform.build_flags}
                            ${esp8266_4M1M.build_flags} 
                            -DPLUGIN_BUILD_CUSTOM
lib_ignore                = ESP32_ping, ESP32WebServer
extra_scripts             = pre:pre_custom_esp82xx.py


[env:custom_beta_ESP8266_4M1M]
extends                   = esp8266_4M1M
platform                  = ${beta_platform.platform}
build_flags               = ${beta_platform.build_flags}
                            ${esp8266_4M1M.build_flags}
                            -DPLUGIN_BUILD_CUSTOM
lib_ignore                = ESP32_ping, ESP32WebServer
extra_scripts             = pre:pre_custom_esp82xx.py


; Custom: 4M2M version --------------------------
[env:custom_ESP8266_4M2M]
extends                   = esp8266_4M2M
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags}
                            ${esp8266_4M1M.build_flags}
                            -DPLUGIN_BUILD_CUSTOM
lib_ignore                = ESP32_ping, ESP32WebServer
extra_scripts             = pre:pre_custom_esp82xx.py




;;; NORMAL (STABLE) ***************************************************
; normal version with stable plugins                                  ;
; *********************************************************************

; NORMAL: 1024k version --------------------------
[env:normal_ESP8266_1M]
extends                   = esp8266_1M
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags}
                            ${esp8266_1M.build_flags}


[env:normal_sdk3_ESP8266_1M]
extends                   = esp8266_1M
platform                  = ${core261_sdk3_platform.platform}
build_flags               = ${core261_sdk3_platform.build_flags}
                            ${esp8266_1M.build_flags}


[env:normal_ESP8266_1M_VCC]
extends                   = esp8266_1M
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags}
                            ${esp8266_1M.build_flags}
                            -D FEATURE_ADC_VCC=true


; NORMAL: 1024k for esp8285 ----------------------
[env:normal_ESP8285_1M]
extends                   = esp8285_1M
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags}
                            ${esp8285_1M.build_flags}


; NORMAL: 2048k WROOM02 version --------------------------
[env:normal_WROOM02_2M]
extends                   = espWroom2M
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags}
                            ${espWroom2M.build_flags}


; NORMAL: 2048k WROOM02 version 256k SPIFFS --------------------------
[env:normal_WROOM02_2M256]
extends                   = espWroom2M256
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags}
                            ${espWroom2M256.build_flags}


; NORMAL: 4096k version --------------------------
[env:normal_ESP8266_4M1M]
extends                   = esp8266_4M1M
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags}
                            ${esp8266_4M1M.build_flags}

; NORMAL: 16M version --------------------------
[env:normal_ESP8266_16M]
extends                   = esp8266_16M
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags}
                            ${esp8266_16M.build_flags}


;;; Minimal ***********************************************************
; Minimal build size for OTA                                          ;
; *********************************************************************

[env:minimal_core_242_ESP8266_1M_OTA]
extends                   = esp8266_1M_OTA
platform                  = ${core_2_4_2.platform}
build_flags               = ${core_2_4_2.build_flags}
                            ${esp8266_1M_OTA.build_flags}

[env:minimal_core_242_ESP8285_1M_OTA]
extends                   = esp8285_1M_OTA
platform                  = ${core_2_4_2.platform}
build_flags               = ${core_2_4_2.build_flags}
                            ${esp8285_1M_OTA.build_flags}

[env:minimal_core_261_ESP8266_1M_OTA]
extends                   = esp8266_1M_OTA
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags} 
                            ${esp8266_1M_OTA.build_flags}

[env:minimal_core_261_ESP8285_1M_OTA]
extends                   = esp8285_1M_OTA
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags} 
                            ${esp8285_1M_OTA.build_flags}

[env:minimal_core_261_sdk3_ESP8266_1M_OTA]
extends                   = esp8266_1M_OTA
platform                  = ${core261_sdk3_platform.platform}
build_flags               = ${core261_sdk3_platform.build_flags} 
                            ${esp8266_1M_OTA.build_flags}

[env:minimal_core_261_sdk3_ESP8285_1M_OTA]
extends                   = esp8285_1M_OTA
platform                  = ${core261_sdk3_platform.platform}
build_flags               = ${core261_sdk3_platform.build_flags} 
                            ${esp8285_1M_OTA.build_flags}



;;; IR      ***********************************************************
; IR builds                                                           ;
; *********************************************************************


; Minimal IR: 1024k version --------------------------
; Build including IR libraries, including extended AC commands
; Minimal set of other plugins
[env:minimal_IRext_ESP8266_1M]
extends                   = esp8266_1M
platform                  = ${minimal_ir_extended.platform}
lib_ignore                = ${minimal_ir_extended.lib_ignore}  
build_flags               = ${minimal_ir_extended.build_flags} 
                            ${esp8266_1M.build_flags}
build_unflags             = ${esp8266_1M_OTA.build_unflags} -DPLUGIN_BUILD_NORMAL_IR


; Minimal IR: 4096k version --------------------------
; Build including IR libraries, INCLUDING extended AC commands
; Includes Extended IR AC commands (takes a lot more program space)
; 4M flash, 1M SPIFFS
[env:minimal_IRext_ESP8266_4M1M]
extends                   = esp8266_4M1M
platform                  = ${minimal_ir_extended.platform} 
lib_ignore                = ${minimal_ir_extended.lib_ignore}
build_flags               = ${minimal_ir_extended.build_flags} 
                            ${esp8266_4M1M.build_flags}

; 4M flash, 2M SPIFFS
[env:minimal_IRext_ESP8266_4M2M]
extends                   = esp8266_4M2M
platform                  = ${minimal_ir_extended.platform} 
lib_ignore                = ${minimal_ir_extended.lib_ignore}
build_flags               = ${minimal_ir_extended.build_flags}
                            ${esp8266_4M2M.build_flags}


; NORMAL IR: 4096k version --------------------------
; Build including IR libraries, INCLUDING extended AC commands
; Includes Extended IR AC commands (takes a lot more program space)
; 4M flash, 2M SPIFFS
[env:normal_IRext_no_rx_ESP8266_4M2M]
extends                   = esp8266_4M2M
platform                  = ${normal_ir_extended_no_rx.platform} 
lib_ignore                = ${normal_ir_extended_no_rx.lib_ignore}
build_flags               = ${normal_ir_extended_no_rx.build_flags}
                            ${esp8266_4M2M.build_flags}



;;; TEST  *************************************************************
; additional plugins (and dependend code) that is marked as TESTING   ;
; Includes "normal" + "testing" plugins                               ;
; *********************************************************************


; TEST: 4096k version + FEATURE_ADC_VCC ----------
[env:test_ESP8266_4M_VCC]
extends                   = esp8266_4M1M
platform                  = ${testing.platform}
build_flags               = ${testing.build_flags}
                            ${esp8266_4M1M.build_flags}
                            -D FEATURE_ADC_VCC=true


[env:test_beta_ESP8266_4M1M]
extends                   = esp8266_4M1M
platform                  = ${testing_beta.platform}
build_flags               = ${testing_beta.build_flags}
                            ${esp8266_4M1M.build_flags}


[env:test_beta_ESP8266_16M]
extends                   = esp8266_16M
platform                  = ${testing_beta.platform}
build_flags               = ${testing_beta.build_flags}
                            ${esp8266_16M.build_flags} 
                            -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22y







;;; DEV  **************************************************************
; additional plugins (and dependend code) that is in development      ;
; (probably broken or incomplete)                                     ;
; *********************************************************************

; DEV : 4096k version ----------------------------
[env:dev_ESP8266_4M1M]
extends                   = esp8266_4M1M
platform                  = ${dev.platform}
build_flags               = ${dev.build_flags} 
                            ${esp8266_4M1M.build_flags}



;;; HARDWARE SPECIFIC VERSIONS ***********************************************************
; versions specially designed to fit, and contents only needed plugins for each hardware ;
; ****************************************************************************************

; ITEAD Products

; ITEAD / SONOFF BASIC version ------------------
;[env:hard_SONOFF_BASIC]
;extends                   = esp8266_1M, hard_esp82xx
;platform                  = ${hard_esp82xx.platform}
;build_flags               = ${hard_esp82xx.build_flags} ${esp8266_1M.build_flags} -D PLUGIN_SET_SONOFF_BASIC


; ITEAD / SONOFF TH10/TH16 version -------------------
;[env:hard_SONOFF_TH1x]
;extends                   = esp8266_1M, hard_esp82xx
;platform                  = ${hard_esp82xx.platform}
;build_flags               = ${hard_esp82xx.build_flags} ${esp8266_1M.build_flags} -D PLUGIN_SET_SONOFF_TH1x

; ITEAD / SONOFF POW & POW R2 version --------------------
; Sonoff Pow (ESP8266 - HLW8012)
; GPIO00 Button
; GPIO05 HLW8012 Sel output
; GPIO12 Red Led and Relay (0 = Off, 1 = On)
; GPIO13 HLW8012 CF1 voltage / current
; GPIO14 HLW8012 CF power
; GPIO15 Blue Led (0 = On, 1 = Off)

; Sonoff Pow R2 (ESP8266 4M flash - CSE7766)
; GPIO00 Button
; GPIO01 Serial RXD 4800 baud 8E1 CSE7766 energy sensor
; GPIO03 Serial TXD
; GPIO12 Red Led and Relay (0 = Off, 1 = On)
; GPIO13 Blue Led (0 = On, 1 = Off)
[env:hard_SONOFF_POW_4M1M]
extends                   = esp8266_4M1M, hard_esp82xx
platform                  = ${hard_esp82xx.platform}
build_flags               = ${hard_esp82xx.build_flags} 
                            ${esp8266_4M1M.build_flags}
                            -D PLUGIN_SET_SONOFF_POW


; Build including power measurement plugins for those devices that have only 1M flash.
; For example those made by BlitzWolf SHP
[env:hard_other_POW_ESP8285_1M]
extends                   = esp8266_1M_OTA, hard_esp82xx
platform                  = ${hard_esp82xx.platform}
build_flags               = ${hard_esp82xx.build_flags} 
                            ${esp8266_1M_OTA.build_flags}
                            -D PLUGIN_SET_SONOFF_POW


; ITEAD / SONOFF S20 version --------------------
;[env:hard_SONOFF_S20]
;extends                   = esp8266_1M_OTA, hard_esp82xx
;platform                  = ${hard_esp82xx.platform}
;build_flags               = ${hard_esp82xx.build_flags} ${esp8266_1M_OTA.build_flags} -D PLUGIN_SET_SONOFF_S2x


; ITEAD / SONOFF 4CH version --------------------
;[env:hard_SONOFF_4CH]
;extends                   = esp8285_1M_OTA, hard_esp82xx
;platform                  = ${hard_esp82xx.platform}
;build_flags               = ${hard_esp82xx.build_flags} ${esp8285_1M_OTA.build_flags} -D PLUGIN_SET_SONOFF_4CH



; ITEAD / SONOFF TOUCH version ------------------
;[env:hard_SONOFF_TOUCH]
;extends                   = esp8285_1M_OTA, hard_esp82xx
;platform                  = ${hard_esp82xx.platform}
;build_flags               = ${hard_esp82xx.build_flags} ${esp8285_1M_OTA.build_flags} -D PLUGIN_SET_SONOFF_TOUCH


; Shelly1 Open Source (ESP8266-2MB)
; https://shelly.cloud/shelly1-open-source/
; GPIO04 Relay (non inverted)
; GPIO05 Button
[env:hard_Shelly_1_2M256]
extends                   = esp8266_2M256, hard_esp82xx
platform                  = ${hard_esp82xx.platform}
build_flags               = ${hard_esp82xx.build_flags} 
                            ${esp8266_2M256.build_flags}
                            -D PLUGIN_SET_SHELLY_1

; Ventus W266 weather station
; https://www.letscontrolit.com/wiki/index.php/VentusW266
[env:hard_Ventus_W266]
extends                   = esp8266_1M, hard_esp82xx
platform                  = ${hard_esp82xx.platform}
build_flags               = ${hard_esp82xx.build_flags}
                            ${esp8266_1M_OTA.build_flags}
                            -D PLUGIN_SET_VENTUS_W266


;;; ESP32 test build ********************************************************************;
; Status of the ESP32 support is still considered "beta"                                 ;
; Most plugins work just fine on ESP32.                                                  ;
; Especially some plugins using serial may not run very well  (GPS does run fine).       ;
; ***************************************************************************************;



[esp32_common]
extends                   = common
platform                  = ${core_esp32_1_11_1.platform}
lib_ignore                = AS_BH1750, ESP8266WiFi, ESP8266Ping, ESP8266WebServer, ESP8266HTTPUpdateServer, ESP8266mDNS, IRremoteESP8266, ESPEasy_ESP8266Ping, ESP32_ping, HeatpumpIR
lib_deps                  = https://github.com/TD-er/ESPEasySerial.git
board_build.f_flash       = 80000000L
board_build.flash_mode    = dout
board_upload.maximum_size = 1900544
board_build.partitions    = esp32_partition_app1810k_spiffs316k.csv
build_unflags             = -Wall
build_flags               = ${mqtt_flags.build_flags} 
                            -D BUILD_GIT='"${sysenv.TRAVIS_TAG}"' 
                            -DCONFIG_FREERTOS_ASSERT_DISABLE
                            -DCONFIG_LWIP_ESP_GRATUITOUS_ARP
                            -DCONFIG_LWIP_GARP_TMR_INTERVAL=30



; Custom: 4096k version --------------------------
[env:custom_ESP32_4M316k]
extends                   = esp32_common
platform                  = ${esp32_common.platform}
build_flags               = ${esp32_common.build_flags}   -DPLUGIN_BUILD_CUSTOM
board                     = esp32dev
extra_scripts             = pre:pre_custom_esp32.py


[env:test_ESP32_4M316k]
extends                   = esp32_common
platform                  = ${esp32_common.platform}
build_flags               = ${esp32_common.build_flags}  -DPLUGIN_SET_TEST_ESP32
board                     = esp32dev


[env:test_ESP32-wrover-kit_4M316k]
extends                   = esp32_common
platform                  = ${esp32_common.platform}
build_flags               = ${esp32_common.build_flags}  -DPLUGIN_SET_TEST_ESP32
board                     = esp-wrover-kit
upload_protocol           = ftdi
debug_tool                = ftdi
debug_extra_cmds          = break Misc.ino:3011


;Special build environment definitions.
;These are used for analysis and debugging.
;
;!! DO NOT LOAD THESE ONTO A MODULE !!

[debug_pio]
build_type                = debug
check_tool                = clangtidy
build_flags               = ${compiler_warnings.build_flags}


[env:spec_debug_custom_ESP8266_4M1M]
extends                   = esp8266_4M1M, debug_pio
platform                  = ${regular_platform.platform}
build_flags               = ${regular_platform.build_flags}
                            ${debug_pio.build_flags}
                            ${esp8266_4M1M.build_flags}
                            -DPLUGIN_BUILD_CUSTOM
lib_ignore                = ESP32_ping, ESP32WebServer
extra_scripts             = pre:pre_custom_esp82xx.py


[env:spec_debug_beta_custom_ESP8266_4M1M]
extends                   = esp8266_4M1M, debug_pio
platform                  = ${beta_platform.platform}
build_flags               = ${beta_platform.build_flags}
                            ${debug_pio.build_flags}
                            ${esp8266_4M1M.build_flags}
                            -DPLUGIN_BUILD_CUSTOM
lib_ignore                = ESP32_ping, ESP32WebServer
extra_scripts             = pre:pre_custom_esp82xx.py


[env:spec_debug_custom_ESP32_4M316k]
extends                   = esp32_common, debug_pio
platform                  = ${esp32_common.platform}
build_flags               = ${esp32_common.build_flags} ${debug_pio.build_flags}   -DPLUGIN_BUILD_CUSTOM
board                     = esp32dev
extra_scripts             = pre:pre_custom_esp32.py



; Special env for memory analysis
; This may generate builds which cannot be run, so do not upload to a node.
; Has the same lib_ignore as the IR builds, or else those cannot be built for testing
[env:spec_memanalyze_ESP8266]
extends                   = esp8266_4M1M
platform                  = ${regular_platform.platform}
lib_ignore                = ESP32_ping, ESP32WebServer
build_flags               = ${esp8266_4M1M.build_flags} -DMEMORY_ANALYSIS -DPLUGIN_BUILD_CUSTOM -w -DUSE_NON_STANDARD_24_TASKS -DTASKS_MAX=24
extra_scripts             = pre:pre_memanalyze.py

Понравилась статья? Поделить с друзьями:
  • Error please select field definition definitions root
  • Error please select android sdk что делать
  • Error please select android sdk android studio
  • Error please select a valid python interpreter перевод
  • Error please select a valid python interpreter error please select a valid python interpreter