Firebeetle Compiling

Hi, I am trying out platfirmIO (after using Arduino for a number of years) for the first time. I also have bought a DFRobot Firebeetle32 board (rather than the unnamed dev boards) and I am having trouble compiling even the most basic project.

I installed platformio extension into VSCode. That seemed to work fine, and I created a new project and specified the firebeetle32 as it was in the list of boards. it seemed to download support ok.

My platform.ini contains

[env:firebeetle32]
platform = espressif32
board = firebeetle32
framework = arduino

Code is :slight_smile:

#include <Arduino.h>

void setup() {
// put your setup code here, to run once:
}

void loop() {
// put your main code here, to run repeatedly:
}

Errors are below. I understand what the errors are, but not how to get around them as I only include Arduino.h

In file included from C:\Users\Stephen.platformio\packages\framework-arduinoespressif32\cores\esp32\HardwareSerial.cpp:20:0:
C:\Users\Stephen.platformio\packages\framework-arduinoespressif32\variants\firebeetle32/pins_arduino.h:62:22: error: redefinition of ‘const uint8_t D0’
static const uint8_t D0 = 3;
^
C:\Users\Stephen.platformio\packages\framework-arduinoespressif32\variants\firebeetle32/pins_arduino.h:33:22: note: ‘const uint8_t D0’ previously defined here
static const uint8_t D0 = 3;
^
C:\Users\Stephen.platformio\packages\framework-arduinoespressif32\variants\firebeetle32/pins_arduino.h:63:22: error: redefinition of ‘const uint8_t D1’
static const uint8_t D1 = 1;
^
C:\Users\Stephen.platformio\packages\framework-arduinoespressif32\variants\firebeetle32/pins_arduino.h:34:22: note: ‘const uint8_t D1’ previously defined here

Any ideas?

The Arduino-ESP32 has an actual error in the release-version that is responsible for that compile error. A fix was just commited yesterday, but is not contained in a re-released package.

I’d suggest using the instruction

platform_packages = 
   framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git

in the platformio.ini (docs) to make PlatformIO use Git to grab the latest master-branch version from there to get the code fix.

Does it work then?

Edit: Request for repackaging of the Arduino framework to fix this issue is done at Update framework-arduinoespressif32 package with hotfixes · Issue #508 · platformio/platform-espressif32 · GitHub.

1 Like

That does indeed fix the issue.

Thanks very much.

S.

1 Like