platform-espressif32
platform-espressif32 copied to clipboard
Firebeetle DFR0654
Hi, I'm not sure which board and MCU I have to select to program a DRF0654 board.
I try several configurations, firebeetle32
, dfrobot_firebeetle2_esp32s3
with different MCU configuration (esp32
, ESP32-E
), but none of then is working properly.
With the following configuration, I can upload the code, but pinout seems to be wrong. I think this is not the right configuration:
board = dfrobot_firebeetle2_esp32s3
board_build.mcu = esp32
Any help is welcome.
Hi @imabot2 ! It seems this board is not supported by the official Arduino core for ESP32. If you want you can submit a PR with proper pinout configuration to that repository so that it will be available in PlatformIO as well.
With Arduino-IDE and the Arduino core for ESP32 selecting the Board "Firebeetle ESP32" compiles working firmware, a compatible/matching board is defined in https://github.com/espressif/arduino-esp32/blob/master/boards.txt#L7063
Here is a picture of the settings to compile for DFR0654:
The pin definition seems to be for the Firebeetle DFR0478 because it deviates a bit. I assume this needs to be added then.
Hi @imabot2 ! It seems this board is not supported by the official Arduino core for ESP32. If you want you can submit a PR with proper pinout configuration to that repository so that it will be available in PlatformIO as well.
What is a PR and how to do that ? Any example somewhere ?
@imabot2 See the Contributions Guide and an example.
Hi, I have also looking into this issue.
The board for the configuration "dfrobot_firebeetle2_esp32s3" does not seem to exist. The .json file links to the webpage for the firebeetle esp32 board however there is already the "firebeetle32" configuration for that board. DFRobot do not sell an esp32s3 board as far as I can see.
If the "dfrobot_firebeetle2_esp32s3" configuration is meant to link to the DRF0654 board, both the .json file on this repo and the arduino_pins.h file are incorrect which has been an issue for a while it seems - https://github.com/platformio/platform-espressif32/issues/644 and https://github.com/lmarzen/esp32-weather-epd/issues/3
The current fix is fix is to use the "firebeetle32" configuration and set platform = [email protected]
in the .ini file and define all the pins manually. The "dfrobot_firebeetle2_esp32s3" configuration was added in release 5.1.0 and this changed the size of the flash and ram size which means it does not work for later versions. It would however be much nicer for it to work properly.
Maybe how to fix?
- The pins_ardunio.h needs to be fixed in the the Arduino core and a correct version can be found on the DFRobot website In this zip folder
-
"ldscript": "esp32s3_out.ld"
needs to be changed to"ldscript": "esp32_out.ld"
in the .json file for "dfrobot_firebeetle2_esp32s3" -
"mcu": "esp32s3",
also needs to be changed to"mcu": "esp32",
-
"openocd_target": "esp32s3.cfg"
also needs to be changed to"openocd_target": "esp-wroom-32.cfg"
I have tested this on my computer and everything seems to work properly with a few basic example sketches. However, I do not really understand what the rest of the .json does so not sure if anything else should be changed. Furthermore, I think the name of the configuration needs to be changed to dfrobot_firebeetle2_esp32-e however this seems complicated as i think other files would also need to be changed to link everything together
@valeros I am not too familiar with how platformio configurations or the arduino core work so could you offer some advice?
Thanks very much.
Hi @ejagombar
The board for the configuration "dfrobot_firebeetle2_esp32s3" does not seem to exist. The .json file links to the webpage for the firebeetle esp32 board however there is already the "firebeetle32" configuration for that board. DFRobot do not sell an esp32s3 board as far as I can see.
Maybe DFRobot are not selling the S3-based boards yet. The dfrobot_firebeetle2_esp32s3
board and its variant were originally taken from https://github.com/espressif/arduino-esp32/pull/6890 and it's definately not the DRF0654
board, so the link in the .json file points to a wrong product page.
Your workaround is fine until a proper variant for DRF0654 is added to the ESP32 repo.
Here is another work around, copied from https://github.com/platformio/platform-espressif32/issues/644... In order to upload code to the Firebeetle 2 ESP32-E using the latest version of espressif32, you must override the flash size settings of the firebeetle32 board configuration. See my platformio.ini file below.
[env:firebeetle32]
platform = espressif32
board = firebeetle32
framework = arduino
; override default settings to enable compatibility with Firebeetle 2 ESP32-E
board_upload.flash_size = 4MB
board_upload.maximum_size = 4194304