Support for latest Espressif ESP8266 frameworks: NONOS-SDK 3.0.4 and RTOS-SDK 3.4#284
Support for latest Espressif ESP8266 frameworks: NONOS-SDK 3.0.4 and RTOS-SDK 3.4#284freedib wants to merge 10 commits intoplatformio:developfrom
Conversation
Requires package framework-esp8266-nonos-sdk@ 3.0.5 https://github.com/freedib/framework-esp8266-nonos-sdk.git Fix build bugs platform.py - Remove dependency to xtensa 1.40802.0 esp8266-nonos-sdk & esp8266-rtos-sdk - Suppress literal-suffix warnings from SDK building - Set correct libraries list for nonos-sdk & rtos-sdk esp8266-nonos-sdk - Set correct include paths for nonos-sdk - Avoid building SDK drivers on each run for nonos-sdk Support for nonos-sdk 3.0.5 platform.json: - Update nonos-sdk and rtos-sdk version numbers esp8266-nonos-sdk.py: - Add SPI_FLASH_SIZE_MAP to compile flags - Use the new "esp_init_data_default_v08.bin" file for NONOS 3.0.4
Requires package tool-genbin https://github.com/freedib/tool-genbin.git @ 1.0.0 OTA is build if board contains a build.partitions entry containing the word "ota". a good practice is to use "partitions_two_ota.csv" as in esp-idf esp8266-nonos-sdk.py and esp8266-rtos-sdk.py - change linker script LDSCRIPT_PATH if OTA - change ElfToBin builder to use genbin.py instead of esptool genbin.py allows to create user1.bin and user2.bin in one call (named firmware.bin.user1.bin and firmware.bin.user2.bin) - set correct FLASH_EXTRA_IMAGES list for flashing main.py - allow a custom bootloader like firmware.bin.user1.bin to upload platform.json - add dependency to genbin boards/esp12e_ota.json - example board for use with OTA
Requires package framework-esp8266-rtos-sdk @ 3.4 https://github.com/freedib/framework-esp8266-rtos-sdk.git Code adapted from Wallace William to fit most recent esp-idf code esp8266-rtos-sdk.py (replacement) - remove all code for old rtos-sdk @ 1.5 and replace it with 3.4 code _embed_files.py (new) - support for embedded data main.py - add _get_board_flash_mode function - add definition for ESPTOOL - change definition for OBJCOPY if esp8266-rtos-sdk - use a different uploader command for esp8266-rtos-sdk platform.py - change xtensa version and cmake/ninja usage if esp8266-rtos-sdk platform.json - change framework-esp8266-rtos-sdk version - add cmake & ninja tools esp8266-nonos-sdk.py - remove references to old rtos sdk
esp8266-nonos-sdk.py & arduino.py - source the _embed_files.py
|
RTOS-SDK @ 3.4 requires a new toolchain-xtensa @ 8.4.0. |
|
tool-genbin have been renamed to tool-genbin-esp8266. |
|
Thank you for your contribution, hope to support RTOS-SDK 3.4 as soon as possible, the current version is too old |
|
When will it be merged? |
|
I am sure a lot of folks are eagerly awaiting this PR to be merged. Is there any particular reason it's being held back? Can I contribute in any way? |
|
@freedib I am getting this error when i try to install Any chance to fix it? |
|
Because this pull request have not been merged, tool-genbin-esp8266 have not been added to platformio registry. If developing for NONOS SDK: If developing for RTOS SDK on Linux 64: |
|
@freedib Thanks it all works except mdns from components. VScode finds mdns.h library fine, but when i run compilation i see this error. |
|
@h1aji Right. I didn't test mDNS :-( |
|
Hallo, i was searching for a long time and now found this.
Im working on windows. Thanks. |
|
@Bastian0302 what python version are you using? |
|
I installed 3.10.11 with the check box „add to path“ but still not working. Update: I uninstalled Paython, deleted .platformio,and isntalled all new. Additional Information:
I have no clue where i can start finding the error. |
|
@ivankravets it will be really awesome if this PR could get merged! ESP8266 is still an awesome and cheap device to use. 🙏 |
|
I would like to return to PlatformIO, but the old version of RTOS SDK does not allow me to do this. I'm really looking forward to the update. I want stability. |
|
Apparently this project is dead, year passed and nobody cares to merge most important PR. |
|
@ivankravets is there any chance to get this merged? It might be not so trivial as it links two external dependencies (RTOS sdk repo and tool-genbin), but please at least give it a try. I'm porting https://github.com/cziter15/ksIotFrameworkLib to espidf, but it would be nice to support esp8266 too. |
|
@ivankravets @valeros |
|
@Bastian0302 did you fix the issue? if yes than please let me know im having the same issue on my end aswell. |
|
I can’t fix the problem. And new models of the ESP32 make it unnecessary to investigate further at this topic. |
|
Hello. I can help fixing the issue. Are we talking of comment on May 30, 2023? |
|
I fixed the problem. The labeling of the toolchain was incorrect. I made also a few fixes on the platform to support windows, so please make a git pull on it. [env] The missing feature of the platform is automatic generation of sdkconfig. Actually I generate this file using the framework with the command: idf.py menuconfig. |
|
In case it might help you, here's how I set up a project and use
export PATH="$PATH":/opt/toolchains/xtensa-lx106-elf/bin/
export IDF_PATH=/opt/sdks/esp8266-rtos-sdk
export ESPPORT=/dev/ttyUSB0
export ESPBAUD=921600
python -m venv .venv
. .venv/bin/activate
pip install -r $IDF_PATH/requirements.txt
idf_component_register(
SRCS
"src/smartconfig.cpp"
"src/wifi.cpp"
INCLUDE_DIRS
"include"
PRIV_REQUIRES
utils
common
)and in idf_component_register(SRCS "src/main.cpp" INCLUDE_DIRS "include")
cmake -B cmake-build-release -S . -DCMAKE_BUILD_TYPE=Release
cmake --build cmake-build-release --target flashI use |
|
Thanks. You right. sdkconfig is auto-generated by cmake when we pass only -S and -B parameters. platform-espressif8266 and framework-esp8266-rtos-sdk have been updated to support it |
tbb98
left a comment
There was a problem hiding this comment.
i wonder when they will press the button
|
There now really good boards with esp32 and esp8266 layout, Pins are compatible and I replaced a lot of them. Only products like Plug Switches are no longer usable because you can’t replace the chip. Sad but that’s how it goes. |
|
Hello @valeros Please consider to merge the PR, we are waiting to revive our boards. Arduino core is not the only choice, let's code also with c/c++. Thank you! |
This Pull Request implements support for the latest Espressif ESP8266 frameworks
Changes are explained in each commit of the Pull Request
Support for the Espressif NONOS-SDK requires two additional packages
GIT: https://github.com/freedib/framework-esp8266-nonos-sdk.git
GIT: https://github.com/freedib/tool-genbin.git
The builder appends -DSPI_FLASH_SIZE_MAP=n to CCFLAGS for the compiler. main.c should handle this value accordingly to Espressif documentation.
OTA is activated the same way than ESP-IDF thru a build.partition in board definition. If used, two bin files are generated, and the first one uploaded. Then, the two bin files can be uploaded to a web server for FOTA update.
Support for the Espressif RTOS-SDK @ 3.4 is very similar to the latest ESP-IDF platform with ESP8266 in mind. Support for old RTOS-SDK @ 1.5 have been removed.
It requires one additional package:
GIT: https://github.com/freedib/framework-esp8266-rtos-sdk.git
All other tools (Cmake and Ninja) are already packaged for platformio.
No change are required to boards definition.
Embed_files support have been included in esp8266-nonos-sdk and Arduino builders. It should replace the one proposed in Pull Request #267 to support the new esp8266-rtos-sdk builder