espruino / Espruino

The Espruino JavaScript interpreter - Official Repo
http://www.espruino.com/
Other
2.76k stars 741 forks source link

ESP32 with spiram larger than 4MB fails #2302

Closed MaBecker closed 1 year ago

MaBecker commented 1 year ago

E (552) spiram: Expected 4096KiB chip but found 8192KiB chip. Bailing out..

looks like the size is fixed in sdkconfig

#
# SPI RAM config
#
CONFIG_SPIRAM_BOOT_INIT=y
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
CONFIG_SPIRAM_USE_MEMMAP=
CONFIG_SPIRAM_USE_CAPS_ALLOC=
CONFIG_SPIRAM_USE_MALLOC=y
CONFIG_SPIRAM_TYPE_ESPPSRAM32=y
CONFIG_SPIRAM_SIZE=4194304                     <---
CONFIG_SPIRAM_SPEED_40M=y
CONFIG_SPIRAM_MEMTEST=y
CONFIG_SPIRAM_CACHE_WORKAROUND=y
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384
jumjum123 commented 1 year ago

ach du dickes .... gibt es Boards mit grösserem PSRAM?

Am Do., 1. Dez. 2022 um 19:06 Uhr schrieb Mark Becker < @.***>:

E (552) spiram: Expected 4096KiB chip but found 8192KiB chip. Bailing out..

— Reply to this email directly, view it on GitHub https://github.com/espruino/Espruino/issues/2302, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPYNHUJ6O25EVA4X64FU2DWLDSI5ANCNFSM6AAAAAASRCDN5M . You are receiving this because you are subscribed to this thread.Message ID: @.***>

gfwilliams commented 1 year ago
gw@sparky:~/workspace/Espruino$ grep "chip but found" -R .
grep: ./app/build/esp32/libesp32.a: binary file matches

Looks like it's internal :( Although am I right in thinking that libesp32.a actually gets built and put in EspruinoBuildTools, so it might be fixable?

gfwilliams commented 1 year ago

Is this helpful? https://esp32.com/viewtopic.php?t=10666

Please try setting PSRAM type to "auto-detect" in menuconfig: https://docs.espressif.com/projects/esp ... piram-type

I don't have a way to test here

MaBecker commented 1 year ago

yes it's possible:

Bildschirm­foto 2022-12-02 um 22 04 13

will build new sdk files and give it a try

MaBecker commented 1 year ago
diff sdkconfig sdkconfig.old
265c265
< CONFIG_SPIRAM_TYPE_AUTO=y              <-------
---
> CONFIG_SPIRAM_TYPE_AUTO=
267c267
< CONFIG_SPIRAM_TYPE_ESPPSRAM32=
---
> CONFIG_SPIRAM_TYPE_ESPPSRAM32=y
269c269
< CONFIG_SPIRAM_SIZE=-1                  <--------
---
> CONFIG_SPIRAM_SIZE=4194304
MaBecker commented 1 year ago

And it works :-)

Bildschirm­foto 2022-12-02 um 23 11 03

gfwilliams commented 1 year ago

Excellent - thanks! Please could you upload the new build to https://github.com/espruino/EspruinoBuildTools ?

You did the build last time so I think you'd be less likely to break things than me ;)

MaBecker commented 1 year ago

Bildschirm­foto 2022-12-06 um 21 17 21

just updated the build tools for esp32.