Okay so pyparsing > 2.2.0 is incompatible with the idf?
thats a bit annoying, need a virtualenv to use matplotlib now since that requires 2.2.1 but whatever.
pio run does do its job now.
uploading still causes the same error, but it gets past linking now:
> Executing task in folder master_gate: platformio run --target upload <
Processing esp-wrover-kit (platform: espressif32; board: esp-wrover-kit; framework: espidf)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp-wrover-kit.html
PLATFORM: Espressif 32 (3.2.0) > Espressif ESP-WROVER-KIT
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (ftdi) On-board (ftdi) External (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.40200.210118 (4.2.0)
- tool-cmake 3.16.4
- tool-esptoolpy 1.30000.201119 (3.0.0)
- tool-mkspiffs 2.230.0 (2.30)
- tool-ninja 1.7.1
- toolchain-esp32ulp 1.22851.191205 (2.28.51)
- toolchain-xtensa32 2.80400.210211 (8.4.0)
Reading CMake configuration...
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in debug mode
Generating partitions .pio/build/esp-wrover-kit/partitions.bin
Generating project linker script .pio/build/esp-wrover-kit/esp32.project.ld
Building .pio/build/esp-wrover-kit/bootloader.bin
Generating an empty partition .pio/build/esp-wrover-kit/ota_data_initial.bin
esptool.py v3.0
Linking .pio/build/esp-wrover-kit/firmware.elf
Retrieving maximum program size .pio/build/esp-wrover-kit/firmware.elf
Checking size .pio/build/esp-wrover-kit/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 21.1% (used 69164 bytes from 327680 bytes)
Flash: [========= ] 85.3% (used 1660212 bytes from 1945600 bytes)
Building .pio/build/esp-wrover-kit/firmware.bin
esptool.py v3.0
Configuring upload protocol...
AVAILABLE: esp-prog, espota, esptool, ftdi, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: /dev/ttyUSB0
Uploading .pio/build/esp-wrover-kit/firmware.bin
usage: esptool write_flash [-h] [--erase-all]
[--flash_freq {keep,40m,26m,20m,80m}]
[--flash_mode {keep,qio,qout,dio,dout}]
[--flash_size FLASH_SIZE]
[--spi-connection SPI_CONNECTION] [--no-progress]
[--verify] [--encrypt]
[--ignore-flash-encryption-efuse-setting]
[--compress | --no-compress]
<address> <filename> [<address> <filename> ...]
esptool write_flash: error: argument <address> <filename>: Detected overlap at address: 0x8000 for file: /home/zweieuro/Documents/PlatformIO/Projects/master_gate/.pio/build/esp-wrover-kit/partitions.bin
*** [upload] Error 2
Also it is a bit weird that the vscode run has different results than the one on my system, i am guessing the extension is packages with 2.2.0 which is why the linker error only occures on my system where it was 2.2.1
running pio run --target upload --verbose
produces a lot of output, but at the end it may be relevant to this issue (everything above is just the .elf file that was generated)
<lambda>(["upload"], [".pio/build/esp-wrover-kit/firmware.bin"])
AVAILABLE: esp-prog, espota, esptool, ftdi, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
MethodWrapper(["upload"], [".pio/build/esp-wrover-kit/firmware.bin"])
Auto-detected: /dev/ttyUSB0
"/usr/bin/python" "/home/zweieuro/.platformio/packages/tool-esptoolpy/esptool.py" --chip esp32 --port "/dev/ttyUSB0" --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 /home/zweieuro/Documents/PlatformIO/Projects/master_gate/.pio/build/esp-wrover-kit/bootloader.bin 0x8000 /home/zweieuro/Documents/PlatformIO/Projects/master_gate/.pio/build/esp-wrover-kit/partitions.bin 0xd000 /home/zweieuro/Documents/PlatformIO/Projects/master_gate/.pio/build/esp-wrover-kit/ota_data_initial.bin 0x10000 .pio/build/esp-wrover-kit/firmware.bin
looking through the bin files and their sizes yields:
32K bootloader.bin lands from 0x1000 - 0x8000 seems to be not enough space for the bottloader (28672)
1,6M firmware.bin
8,0K ota_data_initial.bin
4,0K partitions.bin
To fix this i removed all the offset values from the partition table so it can be done automatically and changed
CONFIG_PARTITION_TABLE_OFFSET=0x8000
to
CONFIG_PARTITION_TABLE_OFFSET=0x9000
and now it could upload fine