Fixed storing of a vaddr as a paddr for DROM flash bank (OCD-910) #318
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Hi there, while experimenting with openocd-esp32 and my ESP32-S2-Saola-1 board I've noticed that during flashing an ELF image using the 'program_esp' command the program is failing at the erase stage at stub code as follows:
It turns out that is all because during the execution of the 'probe' command on esp32 DROM flash bank, after retrieving bank mapping from the stub, the virtual address of the bank is mistakenly stored as a physical address. What's more, after digging a little deeper I've been able to find the commit that introduced the bug - 6b6b7f3ec214664862dfd220e45ee1f39ec4f9ef.
Type of change
User Impact
This PR fixes part of the code responsible for flashing ESP32 devices.
Performance Impact
No impact
How Has This Been Tested?
Before logs:
After logs:
Hardware Configuration:
Software Configuration:
ONE LAST NOTE: I'm flashing this image on top of correctly flashed ELF (in my case by espflash), so I could rely on partition table and mappings generated previously. Also since the 'erase' option in the 'program_esp' removes the necessary headers and as of now openocd has been unable to recreate it - I have tested flashing with this option removed and everything works fine then.
Checklist: