Skip to content

Instantly share code, notes, and snippets.

@mikenabhan
Created September 1, 2021 02:53
Show Gist options
  • Save mikenabhan/a14a74a04beac4bff15a32f6d3a2aa92 to your computer and use it in GitHub Desktop.
Save mikenabhan/a14a74a04beac4bff15a32f6d3a2aa92 to your computer and use it in GitHub Desktop.
This is a GIST that will help you complile MagTag firmware in ESPHome while platformIO is in a transitional state.
substitutions:
devicename: magtag
upper_devicename: Magtag
esphome:
name: magtag
platform: esp32
board: esp32dev
platformio_options:
platform:
- https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
platform_packages:
- framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.0-rc1
- platformio/tool-esptoolpy @ ~1.30100
- espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r1
board_build.mcu: esp32s2
logger:
api:
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
@zala143
Copy link

zala143 commented Jul 5, 2022

thanks for sharing, can you confirm how you were able to flash the magtag? i cannot download an image, i just the following??. thanks

INFO Reading configuration /config/esphome/magtag-01.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing magtag-01 (board: esp32dev; framework: arduino; platform: 
https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream)
--------------------------------------------------------------------------------
Configuring from remote
* Adding toolchain toolchain-riscv32-esp with version 8.4.0+2021r1
* Adding toolchain toolchain-xtensa-esp32 with version 8.4.0+2021r1
* Adding toolchain toolchain-xtensa-esp32s2 with version 8.4.0+2021r1
Tool Manager: Installing espressif/toolchain-xtensa-esp32s2 @ 8.4.0+2021r1
Error: Could not find the package with 'espressif/toolchain-xtensa-esp32s2 @ 8.4.0+2021r1' requirements for your system 'linux_aarch64'

@mikenabhan
Copy link
Author

I think this is outdated at this point, a lot has changed since I posted this and there is almost certainly a better way. It looks to me that the library required is not available for your system which appears to be 64bit arm. If you have access to an x86 system I would give that a try. I am not very involved in the Arduino/platformio world so I don't have any more insight.

This GitHub issue may be of some help to you. esphome/feature-requests#996

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment