0x0000_0000 - 0x3F3F_FFFF address space

michprev
Posts: 92
Joined: Fri Aug 04, 2017 8:57 pm

0x0000_0000 - 0x3F3F_FFFF address space

Postby michprev » Sat Apr 07, 2018 9:36 am

Hi,
in ESP32 technical docs is this memory area marked as reserved but ESP IDF flashes binary image into this area and then copies it in 2nd stage bootloader to other memory ranges. Are there any docs about how 0x0000_0000 - 0x3F3F_FFFF memory works so that I could leave data / instructions code here instead of copying it?

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: 0x0000_0000 - 0x3F3F_FFFF address space

Postby kolban » Sat Apr 07, 2018 2:38 pm

When I first started studying the ESP32 I got confused (and still do (all the time)) on esptool which seemed to flash to addresses 0x1000, 0x8000 and 0x10000. They didn't seem to map to the address space of the processor. The answer is .. they don't. Those are offsets from 0 into flash address space. I have seen many a user confuse the notion of the processors address space and flash address space. If we think of flash memory as being 4 mbytes then it must have a 1st byte - offset 0, a 2nd byte - offset 1 etc etc. The esptool is writing into flash memory starting the supplied offsets. At execution time, the flash memory is then mapped (dynamically) into the address space of the CPU.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

michprev
Posts: 92
Joined: Fri Aug 04, 2017 8:57 pm

Re: 0x0000_0000 - 0x3F3F_FFFF address space

Postby michprev » Sun Apr 08, 2018 10:08 am

It is clearer to me now. Thank you!

Who is online

Users browsing this forum: lucacusso and 28 guests