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

Failed to init external RAM (QEMU-84) #57

Open
0xPIT opened this issue Nov 15, 2022 · 1 comment
Open

Failed to init external RAM (QEMU-84) #57

0xPIT opened this issue Nov 15, 2022 · 1 comment

Comments

@0xPIT
Copy link

0xPIT commented Nov 15, 2022

I try to test my code according to the documentation on this wiki.
The esp-develop branch of today can't seem to allocate PSRAM, see below.

E (2884) quad_psram: PSRAM ID read error: 0x00000000
E (2886) cpu_start: Failed to init external RAM!

Any tips on what I did wrong and how to resolve this?

Thanks

../../qemu/build/qemu-system-xtensa -nographic -machine esp32 -m 4M -drive file=build/flash_image.bin,if=mtd,format=raw
==75211==WARNING: ASan is ignoring requested __asan_handle_no_return: stack type: default top: 0x00016fb0f000; bottom 0x00010affc000; size: 0x000064b13000 (1689333760)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
Adding SPI flash device
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:7032
load:0x40078000,len:15404
ho 0 tail 12 room 4
load:0x40080400,len:3816
entry 0x40080648
I (655) boot: ESP-IDF v5.1-dev-1626-g4b6d9c8ad3-dirty 2nd stage bootloader
I (662) boot: compile time Nov 14 2022 18:14:06
I (678) boot: chip revision: V000
I (689) boot.esp32: SPI Speed      : 80MHz
I (691) boot.esp32: SPI Mode       : DIO
I (693) boot.esp32: SPI Flash Size : 4MB
I (718) boot: Enabling RNG early entropy source...
I (769) boot: Partition Table:
I (771) boot: ## Label            Usage          Type ST Offset   Length
I (773) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (776) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (778) boot:  2 factory          factory app      00 00 00010000 00160000
I (779) boot:  3 diska            unknown          6f 01 00170000 001f4000
I (799) boot: End of partition table
I (816) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=188bch (100540) map
I (1100) esp_image: segment 1: paddr=000288e4 vaddr=3ffb0000 size=035b4h ( 13748) load
I (1170) esp_image: segment 2: paddr=0002bea0 vaddr=40080000 size=04178h ( 16760) load
I (1253) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=67364h (422756) map
I (2552) esp_image: segment 4: paddr=0009738c vaddr=40084178 size=0fd74h ( 64884) load
I (2784) boot: Loaded app from partition at offset 0x10000
I (2786) boot: Disabling RNG early entropy source...
I (2828) quad_psram: This chip is ESP32-D0WD
E (2884) quad_psram: PSRAM ID read error: 0x00000000
E (2886) cpu_start: Failed to init external RAM!

abort() was called at PC 0x40081928 on core 0
@github-actions github-actions bot changed the title Failed to init external RAM Failed to init external RAM (QEMU-84) Nov 15, 2022
@igrr
Copy link
Member

igrr commented Dec 26, 2022

@0xPIT Sorry for the late reply. This seems to be happening with CONFIG_SPIRAM_SPEED_80M=y option set. Please use CONFIG_SPIRAM_SPEED_40M=y in the meantime as a workaround, when running the app in QEMU. I'll investigate how to fix this on QEMU side.

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

3 participants