OK, so weâre getting somewhere here now.
When I ran out of flash space on my 4MB WROOM module, I moved up to the 16M WROVER module. I had no experience with board files and I tried to put a custom file in the boards folder under the espressif32 platform in my .platformio folder. The PlatformIO system didnât find it there. So, I decided to modify an existing board file to get the WROVER module going. I eventually got that working and, of course, never got back to figuring out how to get my custom board file recognized by PlatformIO. Just today I came across your answer to mitchdetailed on the forum so I know where to put it now.
What must have happened was my custom board got overwritten on an update and that caused all of the trouble. I knew better than to modify that board file and expect it to be permanent, but when youâre desperate to get new hardware going, you sometimes cut corners. As good as the PlatformIO documentation is, I did not find what I needed there regarding custom board files.
After building a custom board file in a new boards folder in c:\Users\marc\Documents\PlatformIO, I am past the SW_RESET boot loop. This is with my original 16MB partition file. However, I have not rediscovered the magic to getting the external SPI PSRAM working. My call to psramInit() returns false.
My board file looks like this:
{
"build": {
"arduino":{
"ldscript": "esp32_out.ld"
},
"core": "esp32",
"extra_flags": [
"-DARDUINO_ESP32_DEV",
"-DBOARD_HAS_PSRAM",
"-mfix-esp32-psram-cache-issue"
],
"f_cpu": "240000000L",
"f_flash": "80000000L",
"flash_mode": "qio",
"hwids": [
[
"0x0403",
"0x6010"
]
],
"mcu": "esp32",
"variant": "esp32"
},
"connectivity": [
"wifi",
"bluetooth",
"ethernet",
"can"
],
"debug": {
"default_tool": "ftdi",
"onboard_tools": [
"ftdi"
],
"openocd_board": "esp32-wrover.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "Espressif ESP32-WROVER-E 16MB",
"upload": {
"flash_size": "16MB",
"maximum_ram_size": 327680,
"maximum_size": 16777216,
"protocols": [
"esptool",
"espota",
"ftdi"
],
"require_upload_port": true,
"speed": 460800
},
"url": "https://espressif.com/en/products/hardware/esp-wrover-kit/overview",
"vendor": "Espressif"
}
Do I need to modify the âuploadâ sectionâs maximum_ram_size attribute to something more than 327680?
I think it would be nice if PlatformIO had a tool in the build process that would sanity-check the board file against the partition file and catch mistakes like the one I made.