This was my point whole time. However i would like to avoid using external logic.Vader_Mester wrote:... tricking the ESP when it tries to access flash, but it's actually tries accessing the RAM chip, which has the running app.
So basically what you would do is, boot from Flash, write SD card binary data into the RAM, modify the flash partition table, and reboot.
Here the RAM voltage should be provided externally to keep content.
Then on reboot the second stage bootloader (with the custom additions as well) will load into the ESP internal RAM, find the starting adress of our code (which will be the starting adress when the external logic scwitches to the RAM), then before booting into that adress it activates external logic, to rerout the CS signal to the RAM, and proceeds to boot into the uses app from external RAM.
My second question is about QSPI pinout - if it is possible to change it temporarily, to avoid using external logic (re-route CS pin to PSRAM).
This closest to answer for my first question. Thanks.Vader_Mester wrote:... Although it's worth noting that most basic read and write commands are exactly the same, however flash uses different stuff as well as dummy cycles so it's not so easy
I would rely on read access to be compatible with PSRAM. I know only basics about SPI flash / PSRAM access. And i noticed that read commands are the same. But i do not know anything about dummy cycles. I do not know what commands does ESP32 use to execute from flash, but i would not need to use any write / erase commands.
Maybe best way to do this would be to just try it. I have access to logic analyser too.