From 68512ac8703f914ee6b79042bc9651df21aab9c5 Mon Sep 17 00:00:00 2001 From: "RyanTM (Pololu)" Date: Wed, 16 Dec 2020 15:13:12 -0800 Subject: [PATCH] remove default support for esp32 The esp32 core is too complex to maintain for the benefit of having it. It * uses xtensa-esp32-elf-gcc, which has a bunch of non-static binaries * requires Python with specific libraries installed * is a big download It should still be possible to use this core provided you set up your environment correctly and use the correct customization options. --- README.md | 1 - ci.rb | 13 +------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/README.md b/README.md index a8b99a8..1788d21 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,6 @@ ci: All examples in your library are compiled with the following boards by default: -* esp32:esp32:featheresp32 * esp8266:esp8266:huzzah * arduino:avr:leonardo * arduino:avr:mega diff --git a/ci.rb b/ci.rb index bd9c00e..e66c3f1 100755 --- a/ci.rb +++ b/ci.rb @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -I nixpkgs=channel:nixos-20.09 -i ruby -p patchelf ruby arduino-cli "python3.withPackages(ps: [ ps.pyserial ])" +#!nix-shell -I nixpkgs=channel:nixos-20.09 -i ruby -p ruby arduino-cli python3 class String def red; "\e[31m#{self}\e[0m" end @@ -15,7 +15,6 @@ def magenta; "\e[35m#{self}\e[0m" end end boards = %w( - esp32:esp32:featheresp32 esp8266:esp8266:huzzah arduino:avr:leonardo arduino:avr:mega @@ -38,7 +37,6 @@ def magenta; "\e[35m#{self}\e[0m" end additional_urls = [] additional_urls << "https://arduino.esp8266.com/stable/package_esp8266com_index.json" if cores.include? "esp8266:esp8266" -additional_urls << "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" if cores.include? "esp32:esp32" additional_urls -= (config["skip_additional_urls"] || []) additional_urls -= (ENV["ARDUINO_CI_SKIP_ADDITIONAL_URLS"]&.split(',') || []) additional_urls += (config["add_additional_urls"] || []) @@ -49,15 +47,6 @@ def magenta; "\e[35m#{self}\e[0m" end system("arduino-cli core update-index --additional-urls=\"#{additional_urls.join(",")}\"") system("arduino-cli core install --additional-urls=\"#{additional_urls.join(",")}\" #{cores.join(" ")}") -if cores.include? "esp32:esp32" - # Fixup esp32 dynamically-linked binaries - zlib = `nix-build -I nixpkgs=channel:nixos-20.09 --no-out-link -E '(import {}).zlib'`.chomp - cpplib = `nix-build -I nixpkgs=channel:nixos-20.09 --no-out-link -E '(import {}).stdenv.cc.cc.lib'`.chomp - Dir.glob("#{Dir.home}/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/*/bin/*").each do |bin| - system "patchelf --set-interpreter \"$(< \"$NIX_CC/nix-support/dynamic-linker\")\" --add-needed #{zlib}/lib/libz.so --add-needed #{cpplib}/lib/libstdc++.so.6 #{bin}" - end -end - env="ARDUINO_DIRECTORIES_USER=\"$PWD/out\"" lib = "$PWD/out/libraries" `rm -rf "#{lib}"`