esp32s3内存分配问题

heipppppp
Posts: 10
Joined: Thu Sep 23, 2021 9:52 am

esp32s3内存分配问题

Postby heipppppp » Tue Nov 09, 2021 9:36 am

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

Who is online

Users browsing this forum: No registered users and 123 guests