esp32s3内存分配问题
Posted: Tue Nov 09, 2021 9:36 am
我的开发环境是,esp32s3,idf4.4,vscode,ubuntu18.04,我想在DRAM中分配一个128K字节大小的内存用作ringbuffer,但是声明时就编译不通过,根据官网上的数据手册,我的DRAM为512K,DRAM应当是够的,为什么会失败呢?其次当我改变为48k时就可以通过.(64K也不能通过)
编译通过时串口监视到的信息为:
- DRAM_ATTR uint8_t core0_buff[1024*128] = {0};
- DRAM_ATTR uint8_t core0_buff[1024*48] = {0};
编译通过时串口监视到的信息为:
- I (0) cpu_start: App cpu up.
- I (284) cpu_start: Pro cpu start user code
- I (284) cpu_start: cpu freq: 160000000
- I (285) cpu_start: Application information:
- I (287) cpu_start: Project name: main
- I (292) cpu_start: App version: a4f820b-dirty
- I (297) cpu_start: Compile time: Nov 9 2021 17:17:54
- I (303) cpu_start: ELF file SHA256: d431ab68f95c13d1...
- I (309) cpu_start: ESP-IDF: v4.4-dev-3235-g3e370c4296-dirty
- I (317) heap_init: Initializing. RAM available for dynamic allocation:
- I (324) heap_init: At 3FCC8E18 len 000171E8 (92 KiB): D/IRAM
- I (330) heap_init: At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM
- I (337) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
- I (343) spiram: Adding pool of 2048K of external SPI memory to heap allocator
- I (351) spi_flash: detected chip: generic
- I (355) spi_flash: flash io: dio
- I (360) cpu_start: Starting scheduler on PRO CPU.