ESP-IDF:配置SPIRAM为扩展RAM的方法

ESP-IDF:Support for external, SPI-connected RAM

ESP32配置SPIRAM为扩展RAM的方法:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

fail log:

PS D:\Espressif\esp-idf-5.0\MyCode\simple> set IDF_PATH=d:\Espressif\esp-idf-5.0
PS D:\Espressif\esp-idf-5.0\MyCode\simple> d:\vscode-espressif\python_env\idf5.0_py3.8_env\Scripts\python.exe d:\Espressif\esp-idf-5.0\tools\idf_monitor.py -p COM10 -b 115200 --toolchain-prefix xtensa-esp32-elf- --target esp32 d:\Espressif\esp-idf-5.0\MyCode\simple\build\simple.elf
— WARNING: GDB cannot open serial ports accessed as COMx
— Using \.\COM10 instead…
— idf_monitor on \.\COM10 115200 —
— Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H —
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (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:2
load:0x3fff0030,len:6844
ho 0 tail 12 room 4
load:0x40078000,len:14836
load:0x40080400,len:3792
0x40080400: _init at ??:?

entry 0x40080694
I (29) boot: ESP-IDF v5.0-dev-75-g1561fbd2c5-dirty 2nd stage bootloader
I (29) boot: compile time 09:57:52
I (30) boot: chip revision: 3
I (34) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (41) boot.esp32: SPI Speed : 40MHz
I (46) boot.esp32: SPI Mode : DIO
I (50) boot.esp32: SPI Flash Size : 4MB
I (55) boot: Enabling RNG early entropy source…
I (60) boot: Partition Table:
I (64) boot: ## Label Usage Type ST Offset Length
I (71) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (78) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (86) boot: 2 factory factory app 00 00 00010000 00177000
I (93) boot: End of partition table
I (98) boot_comm: chip revision: 3, min. application chip revision: 0
I (105) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=11354h ( 70484) map
I (139) esp_image: segment 1: paddr=0002137c vaddr=3ffb0000 size=026d0h ( 9936) load
I (143) esp_image: segment 2: paddr=00023a54 vaddr=40080000 size=0c5c4h ( 50628) load
I (165) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=399a8h (235944) map
I (251) esp_image: segment 4: paddr=000699d0 vaddr=4008c5c4 size=01c50h ( 7248) load
I (254) esp_image: segment 5: paddr=0006b628 vaddr=50000000 size=00010h ( 16) load
I (264) boot: Loaded app from partition at offset 0x10000
I (264) boot: Disabling RNG early entropy source…
I (280) cpu_start: Pro cpu up.
I (280) cpu_start: Starting app cpu, entry point is 0x40081298
0x40081298: call_start_cpu1 at D:/Espressif/esp-idf-5.0/components/esp_system/port/cpu_start.c:156

I (0) cpu_start: App cpu up.
I (294) cpu_start: Pro cpu start user code
I (294) cpu_start: cpu freq: 160000000
I (294) cpu_start: Application information:
I (299) cpu_start: Project name: simple
I (303) cpu_start: App version: v5.0-dev-75-g1561fbd2c5-dirty
I (310) cpu_start: Compile time: Feb 7 2023 11:29:01
I (316) cpu_start: ELF file SHA256: e53317d5106018d7…
I (322) cpu_start: ESP-IDF: v5.0-dev-75-g1561fbd2c5-dirty
I (330) heap_init: Initializing. RAM available for dynamic allocation:
I (337) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (343) heap_init: At 3FFB3F30 len 0002C0D0 (176 KiB): DRAM
I (349) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (355) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (362) heap_init: At 4008E214 len 00011DEC (71 KiB): IRAM
I (369) spi_flash: detected chip: generic
I (373) spi_flash: flash io: dio
I (378) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (483) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (483) gpio: GPIO[18]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (493) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (503) gpio: GPIO[21]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (503) gpio: GPIO[22]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (513) gpio: GPIO[23]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (523) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (533) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (543) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (553) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (563) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
in heap_caps.c heap_caps_calloc() michael addI (573) sccb: pin_sda 26 pin_scl 27

I (583) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (723) camera: Detected OV2640 camera
I (723) camera: Allocating 2 frame buffers (750 KB total)
I (723) camera: Allocating 375 KB frame buffer in PSRAM
in heap_caps.c heap_caps_calloc() michael addE (733) camera: Allocating 375 KB frame buffer Failed
E (733) camera: Failed to allocate frame buffer
E (743) gpio: gpio_isr_handler_remove(480): GPIO isr service is not installed, call gpio_install_isr_service() first
E (753) camera: Camera init failed with error 0x101
E (763) app_camera: Camera init failed with error 0x101
I (763) example: Starting server on port: ‘80’
I (773) example: Registering URI handlers

Good log:

PS D:\Espressif\esp-idf-5.0\MyCode\simple> set IDF_PATH=d:\Espressif\esp-idf-5.0
PS D:\Espressif\esp-idf-5.0\MyCode\simple> d:\vscode-espressif\python_env\idf5.0_py3.8_env\Scripts\python.exe d:\Espressif\esp-idf-5.0\tools\idf_monitor.py -p COM10 -b 115200 --toolchain-prefix xtensa-esp32-elf- --target esp32 d:\Espressif\esp-idf-5.0\MyCode\simple\build\simple.elf
— WARNING: GDB cannot open serial ports accessed as COMx
— Using \.\COM10 instead…
— idf_monitor on \.\COM10 115200 —
— Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H —
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (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:2
load:0x3fff0030,len:6844
ho 0 tail 12 room 4
load:0x40078000,len:14836
load:0x40080400,len:3792
0x40080400: _init at ??:?

entry 0x40080694
I (29) boot: ESP-IDF v5.0-dev-75-g1561fbd2c5-dirty 2nd stage bootloader
I (29) boot: compile time 13:48:22
I (30) boot: chip revision: 3
I (34) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (41) boot.esp32: SPI Speed : 40MHz
I (46) boot.esp32: SPI Mode : DIO
I (50) boot.esp32: SPI Flash Size : 4MB
I (55) boot: Enabling RNG early entropy source…
I (60) boot: Partition Table:
I (64) boot: ## Label Usage Type ST Offset Length
I (71) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (78) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (86) boot: 2 factory factory app 00 00 00010000 00177000
I (93) boot: End of partition table
I (98) boot_comm: chip revision: 3, min. application chip revision: 0
I (105) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=1562ch ( 87596) map
I (145) esp_image: segment 1: paddr=00025654 vaddr=3ffb0000 size=0275ch ( 10076) load
I (149) esp_image: segment 2: paddr=00027db8 vaddr=40080000 size=08260h ( 33376) load
I (165) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=41480h (267392) map
I (262) esp_image: segment 4: paddr=000714a8 vaddr=40088260 size=0a4c0h ( 42176) load
I (279) esp_image: segment 5: paddr=0007b970 vaddr=50000000 size=00010h ( 16) load
I (288) boot: Loaded app from partition at offset 0x10000
I (288) boot: Disabling RNG early entropy source…
I (302) psram: This chip is ESP32-D0WD
I (304) spiram: Found 16MBit SPI RAM device
I (304) spiram: SPI RAM mode: flash 40m sram 40m
I (307) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (314) cpu_start: Pro cpu up.
I (318) cpu_start: Starting app cpu, entry point is 0x400814f8
0x400814f8: call_start_cpu1 at D:/Espressif/esp-idf-5.0/components/esp_system/port/cpu_start.c:156

I (0) cpu_start: App cpu up.
I (776) spiram: SPI SRAM memory test OK
I (785) cpu_start: Pro cpu start user code
I (785) cpu_start: cpu freq: 160000000
I (785) cpu_start: Application information:
I (788) cpu_start: Project name: simple
I (793) cpu_start: App version: v5.0-dev-75-g1561fbd2c5-dirty
I (800) cpu_start: Compile time: Feb 7 2023 13:49:32
I (806) cpu_start: ELF file SHA256: 9126e190a5095bca…
I (812) cpu_start: ESP-IDF: v5.0-dev-75-g1561fbd2c5-dirty
I (819) heap_init: Initializing. RAM available for dynamic allocation:
I (826) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (832) heap_init: At 3FFB4008 len 0002BFF8 (175 KiB): DRAM
I (838) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (844) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (851) heap_init: At 40092720 len 0000D8E0 (54 KiB): IRAM
I (857) spiram: Adding pool of 2047K of external SPI memory to heap allocator
I (866) spi_flash: detected chip: generic
I (870) spi_flash: flash io: dio
I (875) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (884) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (954) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (954) gpio: GPIO[18]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (964) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (974) gpio: GPIO[21]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (984) gpio: GPIO[22]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (984) gpio: GPIO[23]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (994) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1004) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1014) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1024) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1034) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1044) sccb: pin_sda 26 pin_scl 27

I (1054) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1184) camera: Detected OV2640 camera
I (1184) camera: Allocating 2 frame buffers (750 KB total)
I (1234) camera: Allocating 375 KB frame buffer in OnBoard RAM
I (1334) camera: Allocating 375 KB frame buffer in OnBoard RAM
I (1714) example: Starting server on port: ‘80’
I (1714) example: Registering URI handlers

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值