Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for sparkfun esp32-s3 thing plus board #1463

Open
Vigeant opened this issue Sep 19, 2024 · 22 comments
Open

support for sparkfun esp32-s3 thing plus board #1463

Vigeant opened this issue Sep 19, 2024 · 22 comments

Comments

@Vigeant
Copy link

Vigeant commented Sep 19, 2024

Good day, still exploring how to do this myself but though I would mention it here.

Please add support for the sparkfun esp32-s3 thing plus board. I noticed that you have many esp32-s3 boards already so should be a quick addition.

@Vigeant
Copy link
Author

Vigeant commented Sep 27, 2024

@valeros I started doing the work and have written the json file, the entry in the boards.txt and the variant folder for the arduino framework. It all compiles and uploads but the code does not run. Any clue how to debug this. My arduino framework additions work with the arduino ide 2.0 (I can compile, upload and execute).

@valeros
Copy link
Member

valeros commented Sep 30, 2024

Hi @Vigeant, share here your board manifest. What code do you use to verify the board is working?

@Vigeant
Copy link
Author

Vigeant commented Oct 9, 2024

hi @valeros
attached is my current json file.
sparkfun_esp32s3_thing_plus.json

I am using a simple blink demo

/*
 * Blink
 * Turns on an LED on for one second,
 * then off for one second, repeatedly.
 */

#include <Arduino.h>

// Set LED_BUILTIN if it is not defined by Arduino framework
#ifndef LED_BUILTIN
    #define LED_BUILTIN 46
#endif

#define LED_BUILTIN 0

void setup()
{
  // initialize LED digital pin as an output.
  pinMode(LED_BUILTIN, OUTPUT);
  Serial.begin(115200);
}

void loop()
{
  // turn the LED on (HIGH is the voltage level)
  digitalWrite(LED_BUILTIN, HIGH);
  Serial.println("LED on");
  // wait for a second
  delay(1000);
  // turn the LED off by making the voltage LOW
  digitalWrite(LED_BUILTIN, LOW);
  Serial.println("LED off");
   // wait for a second
  delay(1000);
}

the json file refers to the arduino board I wrote. I did a pull request for it but will take a while for it to propagate.

Is there a way to refer to something local instead of the arduino stuff?

@valeros
Copy link
Member

valeros commented Oct 9, 2024

I see you've used sparkfun_esp32s3_thing_plus in the variant field. There is no such variant folder in the Arduino core v2.x which is used by PlatformIO at the moment. This makes me think you're using a custom dev-platform or a fork? Does the board print anything to the console?

@Vigeant
Copy link
Author

Vigeant commented Oct 9, 2024

hi @valeros thats correct, I wrote my own based on the generic esp32-s3 dev board and yes I had the demos working. Yesterday I tried pointing my platformio.ini to the github repo since my pull request was merged in the arduino master recently but still having trouble.

Here is my platformio.ini

[env:sparkfun_esp32s3_thing_plus]
platform = https://github.com/platformio/platform-espressif32.git
;platform = espressif32
board = sparkfun_esp32s3_thing_plus
framework = arduino
;may need to update lib link to latest version https://github.com/espressif/esp32-arduino-lib-builder/releases
; see this for additional details https://github.com/platformio/platform-espressif32/issues/1225
platform_packages = 
    framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32#master
    framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.1/esp32-arduino-libs-idf-release_v5.1-33fbade6.zip
monitor_speed = 115200
board_build.mcu = esp32s3
board_build.f_cpu = 240000000L

I get the following error when trying to compile

Processing sparkfun_esp32s3_thing_plus (platform: https://github.com/platformio/platform-espressif32.git; board: sparkfun_esp32s3_thing_plus; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/sparkfun_esp32s3_thing_plus.html
PLATFORM: Espressif 32 (6.9.0+sha.61e9531) > SPARKFUN_ESP32S3_THING_PLUS
HARDWARE: ESP32S3 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-builtin) On-board (esp-builtin) External (cmsis-dap, esp-bridge, 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-arduinoespressif32 @ 3.0.5+sha.f083e2d
 - framework-arduinoespressif32-libs @ 5.1.0+sha.33fbade6b8
 - tool-esptoolpy @ 1.40501.0 (4.5.1)
 - tool-mkfatfs @ 2.0.1
 - tool-mklittlefs @ 1.203.210628 (2.3)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
 - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 40 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio\build\sparkfun_esp32s3_thing_plus\src\Blink.cpp.o
xtensa-esp32s3-elf-g++: error: unrecognized command line option '-std=gnu++2b'; did you mean '-std=gnu++2a'?
Compiling .pio\build\sparkfun_esp32s3_thing_plus\FrameworkArduino\Esp.cpp.o
*** [.pio\build\sparkfun_esp32s3_thing_plus\src\Blink.cpp.o] Error 1
xtensa-esp32s3-elf-g++: error: unrecognized command line option '-std=gnu++2b'; did you mean '-std=gnu++2a'?
*** [.pio\build\sparkfun_esp32s3_thing_plus\FrameworkArduino\Esp.cpp.o] Error 1
============================================================================== [FAILED] Took 1.95 seconds 

@Vigeant
Copy link
Author

Vigeant commented Oct 9, 2024

not sure how to go about officially adding a board and use platformio. I guess I could fork the last 2.0 build and add my board and point to my fork. Is there a timeline for platformIO to move to core V3.x?

@valeros
Copy link
Member

valeros commented Oct 10, 2024

I'm afraid I cannot help you here with third-party implementations. As for support for v3.x, see #1225.

@Jason2866
Copy link
Contributor

@Vigeant Your platform_packages is wrong use

platform = https://github.com/platformio/platform-espressif32.git
platform_packages = 
  framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.5
  framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.1/esp32-arduino-libs-idf-release_v5.1-33fbade6.zip

to use core 3.0.5

@jeremiahrose
Copy link

What are the blockers for resolving this issue - can I help in any way? I have this board and would love to get it working. Are there any workarounds?

@Vigeant
Copy link
Author

Vigeant commented Dec 20, 2024 via email

@Jason2866
Copy link
Contributor

@jeremiahrose If you look #1225 (comment)
you have a solution.

@kylefmohr
Copy link

@jeremiahrose I don't understand why you can't proceed, just use the pioarduino fork and that's that.

As to the reasons for the falling out between Espressif and PlatformIO, this is extensively discussed in #1225, and nothing any of us say here is likely to change the situation.

In my experience, the new fork is very actively maintained, works well, and it's extremely easy to switch to using it.

@jeremiahrose
Copy link

jeremiahrose commented Dec 22, 2024

@kylemohr thanks for the reply. The pioarduino fork doesn't have a sparkfun_esp32s3_thing_plus board either! So what would it take to solve this issue, either in this repo or the fork? Should we transfer this issue over to the fork? Is it documented somewhere that Espressif board requests should be posted there, and not here?

@kylefmohr
Copy link

kylefmohr commented Dec 22, 2024

@jeremiahrose Right, you have to remember that the people running this fork are volunteers -

I would recommend opening a PR in pioarduino/platform-espressif32, take a look at merged PRs to see how others have been adding boards: https://github.com/pioarduino/platform-espressif32/pulls?q=is%3Apr+is%3Aclosed

@jeremiahrose
Copy link

Roger that, thanks @kylefmohr .

For reference, here is @Vigeant 's PR in the Arduino core: espressif/arduino-esp32#10382

@kylefmohr
Copy link

@jeremiahrose if you'd like to get started immediately, use this as your platformio.ini file

; Flash: 4MB QD, PSRAM: 2MB QD
[env:esp32-s3-devkitc-1]
board = esp32-s3-devkitc-1
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
framework = arduino

board_build.arduino.memory_type = qio_qspi
board_build.flash_mode = qio
board_build.psram_type = qio
board_upload.flash_size = 4MB
board_upload.maximum_size = 4194304
board_build.extra_flags = 
  -DBOARD_HAS_PSRAM

I sourced this from this repo and this hardware description of the board

@jeremiahrose
Copy link

Thanks so much @kylefmohr. The above environment didn't quite work, but by doing a diff between @Vigeant's .json and the esp32-s3-devkitc-1.json, I was able to fill in the missing settings. This environment is working perfectly for me so far:

[env:sparkfun_esp32s3_thing_plus]
board = esp32-s3-devkitc-1
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
framework = arduino
board_build.arduino.memory_type = qio_qspi
board_build.arduino.partitions = default.csv
board_build.flash_mode = qio
board_build.psram_type = qio
board_build.cdc_on_boot = 1
board_upload.flash_size = 4MB
board_upload.maximum_size = 4194304
board_build.extra_flags =
  -DARDUINO_USB_CDC_ON_BOOT=1

@jeremiahrose
Copy link

Have added this workaround to the Sparkfun documentation: sparkfun/SparkFun_Thing_Plus_ESP32-S3#3

@jeremiahrose
Copy link

the json file refers to the arduino board I wrote. I did a pull request for it

@Vigeant I couldn't find the pull request for your board manifest, so I have created a new one over at pioarduino/platform-espressif32: pioarduino#89

@Vigeant
Copy link
Author

Vigeant commented Dec 22, 2024 via email

@jeremiahrose
Copy link

pioarduino#89 has been merged, so we don't need the workardound anymore. Just pull the development version of pioarduino/platform-espressif32 like so:

[env:sparkfun_esp32s3_thing_plus]
framework = arduino
platform = https://github.com/pioarduino/platform-espressif32.git#develop
board = sparkfun_esp32s3_thing_plus

@jeremiahrose
Copy link

I've updated the PR to Sparkfun's documentation to reflect this. I guess we can close this issue now, unless we want to wait for pioarduino/platform-espressif32 to cut a new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants