Page 1 of 1

ESP 32 segments

Posted: Tue Apr 26, 2022 7:34 am
by oedipus
When my project is small I get one DRAM segment in output of esptool.py (segment 2)
  1. esptool.py --chip esp32 image_info hello_world.bin
  2. esptool.py v2.9-dev
  3. Image version: 1
  4. Entry point: 40081094
  5. 6 segments
  6.  
  7. Segment 1: len 0x0775c load 0x3f400020 file_offs 0x00000018 [DROM]
  8. Segment 2: len 0x02340 load 0x3ffb0000 file_offs 0x0000777c [BYTE_ACCESSIBLE, DRAM, DMA]
  9. Segment 3: len 0x0654c load 0x40080000 file_offs 0x00009ac4 [IRAM]
  10. Segment 4: len 0x14a40 load 0x400d0020 file_offs 0x00010018 [IROM]
  11. Segment 5: len 0x04c5c load 0x4008654c file_offs 0x00024a60 [IRAM]
  12. Segment 6: len 0x00010 load 0x50000000 file_offs 0x000296c4 [RTC_DATA]
  13. Checksum: 70 (valid)
  14. Validation Hash: d8b3e027f6daad64f2b87de237a6c4223260cbc65f2093b2ef071bcfbd5a705a (valid)
But when I run esptool.py on a large project I get two DRAM segments(segment 2 and segment 4).
  1. esptool.py --chip esp32 image_info http_server_demo.bin
  2. esptool.py v2.9-dev
  3. Image version: 1
  4. Entry point: 400814f0
  5. 6 segments
  6.  
  7. Segment 1: len 0x1e3b0 load 0x3f400020 file_offs 0x00000018 [DROM]
  8. Segment 2: len 0x01c40 load 0x3ffb0000 file_offs 0x0001e3d0 [BYTE_ACCESSIBLE, DRAM, DMA]
  9. Segment 3: len 0x99f14 load 0x400d0020 file_offs 0x00020018 [IROM]
  10. Segment 4: len 0x027f4 load 0x3ffb1c40 file_offs 0x000b9f34 [BYTE_ACCESSIBLE, DRAM, DMA]
  11. Segment 5: len 0x00404 load 0x40080000 file_offs 0x000bc730 [IRAM]
  12. Segment 6: len 0x16ffc load 0x40080404 file_offs 0x000bcb3c [IRAM]
  13. Checksum: f0 (valid)
  14. Validation Hash: b8fcd400f9a5e812ed271d18247ba8885570d373a692bfd80e3b11c00be44a8e (valid)
Why does it happen?
How can I control it?
When my project gets even bigger, can I expect 3 DRAM segments?
Ideally I would like to have one DRAM segment.
Thank you.