PlatformIO Community

Specifying alternate platform in platformio.ini

I am attempting to use the most recent master branch of the arduino-esp32 core from Github.

To achieve this, I added the platform-packages = line to platformio.ini:

[env]
platform = espressif32
platform_packages =
  framework-arduino-esp32 @ https://github.com/espressif/arduino-esp32
board = az-delivery-devkit-v4
framework = arduino
monitor_speed = 115200
monitor_port = COM3
monitor_filters = esp32_exception_decoder
board_build.partitions = default.csv
debug_tool = esp-prog
debug_init_break = tbreak setup
...

The Framework supposedly was installed:

Tool Manager: Installing git+https://github.com/espressif/arduino-esp32
git version 2.27.0.windows.1
Cloning into 'C:\Users\Micha\.platformio\.cache\tmp\pkg-installing-44wqqrye'...
remote: Enumerating objects: 5301, done.
remote: Counting objects: 100% (5301/5301), done.
remote: Compressing objects: 100% (3585/3585), done.
remote: Total 5301 (delta 1569), reused 3074 (delta 1130), pack-reused 0
Receiving objects: 100% (5301/5301), 185.31 MiB | 6.11 MiB/s, done.
Resolving deltas: 100% (1569/1569), done.
Updating files: 100% (10009/10009), done.
Tool Manager: framework-arduino-esp32@2.0.4+sha.d1c10d9 has been installed!

But when compiling, I get the error

lib/eModbus/src/RTUutils.cpp: In static member function 'static int RTUutils::UARTinit(HardwareSerial&, int)':
lib/eModbus/src/RTUutils.cpp:126:10: error: 'class HardwareSerial' has no member named 'setRxFIFOFull'
   serial.setRxFIFOFull(1);
          ^~~~~~~~~~~~~

that indicates the alternate framework was not used.

What am I missing here?

Indeed, this is not used, because the right package name would be framework-arduinoespressif32.

Thanks, but that

[env]
platform = espressif32
platform_packages =
  framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32
board = az-delivery-devkit-v4
framework = arduino
monitor_speed = 115200
monitor_port = COM3
monitor_filters = esp32_exception_decoder
board_build.partitions = default.csv
debug_tool = esp-prog
debug_init_break = tbreak setup
...

gets me to

KeyError: 'framework-arduino-esp32':
  File "C:\Users\Micha\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 176:
    env.LoadPioPlatform()
  File "C:\Users\Micha\.platformio\packages\tool-scons\scons-local-4.4.0\SCons\Util.py", line 737:
    return self.method(*nargs, **kwargs)
  File "C:\Users\Micha\.platformio\penv\lib\site-packages\platformio\builder\tools\pioplatform.py", line 75:
    type_ = p.get_package_type(pkg.metadata.name)
  File "C:\Users\Micha\.platformio\penv\lib\site-packages\platformio\platform\base.py", line 175:
    return self.packages[name].get("type")

and stop.

You bricked PlatformIO by telling it to download a package which has, after the download, a different name than expected in the package.json. Remove the folder C:\Useres\Micha\.platformio\packages\framework-arduino-esp32 and retry.

1 Like

That did the trick.

Thanks a lot! :+1: