Setting custom package fails

Hi,

I created a custom framework-ardunioespressif32 with some tweaked settings to be able to put some big buffers into PSRAM, following recommendations from other posts, e.g. Custom ESP32 Arduino libraries build and Correct settings to enable external RAM on ESP32.

Now that I have successfully built the libraries, I created a repository so I can reference it in my platformio.ini. Unfortunately I get the following error:

Resolving trainboard dependencies…
Error! Failed to extract upstream toolchainconfigurations:
Extra data: line 1 column 4 (char 3)

Here is my platformio.ini

[env:my_project]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino

extra_scripts = build/prebuild.py # Just modifying some text files here

monitor_speed = 115200
monitor_filters = esp32_exception_decoder
monitor_rts = 0
monitor_dtr = 0

build_flags = 
    -D ARDUINO_USB_CDC_ON_BOOT
    -DCORE_DEBUG_LEVEL=4
    -std=gnu++17
    -Wl,-Map,output.map
    -DBOARD_HAS_PSRAM
    -mfix-esp32-psram-cache-issue
    -DCONFIG_SPIRAM_CACHE_WORKAROUND=1
    -Ibuild/
    -Isrc/
    -Isrc/Database
    -Isrc/Interfaces
    -Isrc/Led
    -Isrc/StateMachine
    -Isrc/Util
    -Ivendor/etl/include

build_unflags = 
    -std=gnu++11

lib_deps =
    fastled/FastLED@^3.5.0
    https://github.com/tzapu/WiFiManager/archive/refs/tags/v2.0.17.zip

platform_packages =
    framework-arduinoespressif32 @ https://github.com/edautomation/framework-arduinoespressif32.git

Did I make some mistake? What did I miss?

Any help would be greatly appreciated :slight_smile:

But every memory allocation above 4kB will be placed automatically into PSRAM.

Creating a complete framework for this seems to be a bit overdone!?

That error comes from

I don’t think you need the upstream toolchain packages, the built ins are fine, so you can add

board_build.arduino.upstream_packages = no

to your platformio.ini.

I have only static objects in my code, they are put in .dram0.bss.

To do that I need to set CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y in the sdkconfig. For this I need to recompile the arduino libraries.

In addition to that there are other settings I will need to adapt for my project, like enabling image verification on boot, disable BT, etc. So I need a custom framework build anyways :wink:

Ah, ok. Thanks for clearification! :+1: