Updating ESP32 Platform / Arduino Framework

I am trying to resolve a BLE problem and wanted to update to the latest stable ESP32 Arduino Framework :
ESP32 Arduino Release 1.0.6 based on ESP-IDF v3.3.5

But I cant see how to do that. Instead I followed the next best thing and updated the ESP32 platform to ESP 3.2.1 as the ‘Platform button’ allowed.

Now I compile and get incompatible pointer errors!

So, How should I update the Arduino ‘Framework’ to 1.06? and is it the same as updating the ESP32 ‘Platform’?

And what to do about those errors?

.. platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c: In function 'spiTransferBytesNL':
..platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c:922:39: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
                 uint8_t * last_out8 = &result[c_longs-1];
..platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c:923:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
                 uint8_t * last_data8 = &last_data;

Careful, the platform version does not correspond to the Arduino core version. They are completely separate. In the release page you can see that e.g. platform-espressif32 3.2.0 uses Arduino core version 1.0.6, and so does the most recent 3.2.1.

So if you use a standard

platform = espressif32
board = esp32dev
framework = arduino

while having the latest Espressif32 version installed / updated to, you will get in the compilation output

Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (3.2.1) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) 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)
 - framework-arduinoespressif32 3.10006.210326 (1.0.6)
 - tool-esptoolpy 1.30000.201119 (3.0.0)
 - toolchain-xtensa32 2.50200.97 (5.2.0)

while shows you that the core version 1.0.6 is already the used one.

Nothing, they’re just a warning and the resulting code will work. Also it is already fixed for the next framework version. If it really bothers you can put the explicit (uint8_t*) cast in there.

1 Like

Side note: this thread is related to the new feature requests at Feature request: allow to specify in a project a specific framework version · Issue #3972 · platformio/platformio-core · GitHub, the ability to specify the required versions as part of the checked in project specification.

Thanks for that.
I did update Platform to 3.2.1 as allowed by the ‘Update Platform’ Button, but now the button just says ‘Uninstall’
I saw the release 3.2.1 uses Arduino core 1…0.6 but still have no idea how to update to THAT later platform so I get to run with 1.0.6.

Yes that’s the most recent version, so no update available then :smiley:

As said above, if you are running the latest platform-espressif32 you will get the package framework-arduinoespressif32 of version 1.0.6 automatically with it. No special configuration required.

When you specify

platform = espressif32

in the platformio.ini it will take the latest Espressif32 platform that you have installed in PlatformIO. The documentation also tells you have to force a different version by e.g. specifying

platform = espressif32@3.2.1

(that of course has the disadvantage that this project will not simply use the latest ESP32 platform that is installed but that fixed version – so no ‘autoupdate’.)

Right. I’m confusing myself.