sspaten
February 7, 2022, 8:52am
#1
Running “Hello…” without SPIFFS OK.
Trying to use SPIFFS does not succeed. I use the “Build Filesystem Image” and “Upload Filesysem Image” in the platformIO menus.
This results in “Error: Failed to get flash maps (4294967290)!”
I found a similar link in Espressif:
Programming ESP32-C3-MINI-1 module using JTAG (OCD-390) · Issue #168 · espressif/openocd-esp32 · GitHub
with a similar problem, where they uploaded via the JTAG interface
openocd -f interface\jlink.cfg -f target\esp32c3.cfg -c “program_esp_bins build flasher_args.json verify exit”
However it will not work for me - is there another approach? Help will be greatly appreciated…
That doesn’t look good, please file an issue in Issues · platformio/platform-espressif32 · GitHub .
sspaten
February 7, 2022, 6:46pm
#3
Thanks again Maximilian for your quick response - I have responded in an open incident on Github and hope someone will react.
GitHUb:
Error: Failed to get flash maps (4294967290)!
opened 12:25PM - 11 May 21 UTC
Debugging
esp32s2
**Describe the bug**
I am trying to use eclipse for esp32s2 (but esp32 works we… ll) bugging with default configs from [openocd debugging](https://github.com/espressif/idf-eclipse-plugin/blob/master/docs/OpenOCD%20Debugging.md), which not work both on my Linux and Windows PC, error message like below. Seems flash Info can't be correctly probed from Jtag.
I also find solutions for me (but can't explain why):
For Linux: modify flash size to `4MB` in menuconfig can fix
~~For Windonws: modify flash size not work, add `set ESP_FLASH_SIZE "4M"` in `target\esp32s2.cfg` can fix~~(not work now)
**To Reproduce**
Steps to reproduce the behavior:
1. build and flash hello_world
2. use eclipse for esp32s2 bugging with default configs from [openocd debugging](https://github.com/espressif/idf-eclipse-plugin/blob/master/docs/OpenOCD%20Debugging.md)
**Environment Information:**
Eclipse > About Eclipse > Installation Details > Configuration > Copy to Clipboard
[eclipse install info.txt](https://github.com/espressif/idf-eclipse-plugin/files/6459037/eclipse.install.info.txt)
**ESP-IDF Tools Information:**
```
Executing D:\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe D:\esp\tools\idf_tools.py list
* xtensa-esp32-elf: Toolchain for Xtensa (ESP32) based on GCC
- esp-2020r3-8.4.0 (recommended, installed)
* xtensa-esp32s2-elf: Toolchain for Xtensa (ESP32-S2) based on GCC
- esp-2020r3-8.4.0 (recommended, installed)
* xtensa-esp32s3-elf: Toolchain for Xtensa (ESP32-S3) based on GCC
- esp-2020r3-8.4.0 (recommended, installed)
* riscv32-esp-elf: Toolchain for 32-bit RISC-V based on GCC
- 1.24.0.123_64eb9ff-8.4.0 (recommended, installed)
* esp32ulp-elf: Toolchain for ESP32 ULP coprocessor
- 2.28.51-esp-20191205 (recommended, installed)
* esp32s2ulp-elf: Toolchain for ESP32-S2 ULP coprocessor
- 2.28.51-esp-20191205 (recommended, installed)
* cmake: CMake build system
- 3.16.4 (recommended, installed)
* openocd-esp32: OpenOCD for ESP32
- v0.10.0-esp32-20200709 (recommended, installed)
* ninja: Ninja build system
- 1.10.2 (recommended, installed)
* idf-exe: IDF wrapper tool for Windows
- 1.0.1 (recommended, installed)
* ccache: Ccache (compiler cache)
- 3.7 (recommended, installed)
* dfu-util: dfu-util (Device Firmware Upgrade Utilities)
- 0.9 (recommended, installed)
```
**IDF Eclipse Plugin Version:**
ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD ESP-IDF Eclipse Plugin 2.1.0.202104161244 com.espressif.idf.feature
**Eclipse Error log:**
```
Open On-Chip Debugger v0.10.0-esp32-20200709 (2020-07-09-08:54)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Started by GNU MCU Eclipse
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 10000 kHz
Info : JTAG tap: esp32s2.cpu tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32s2: Debug controller 0 was reset.
Info : esp32s2: Core 0 was reset.
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Error: No symbols for FreeRTOS
Info : esp32s2: Target halted, PC=0x4009264A, debug_reason=00000000
Info : Detected ESP32-S2 chip
Info : esp32s2: Target halted, PC=0x400314A4, debug_reason=00000001
Error: Failed to get flash maps (5)!
Warn : Failed to get flash mappings (-4)!
Info : esp32s2: Target halted, PC=0x400314A4, debug_reason=00000001
Info : esp32s2: Target halted, PC=0x400314A4, debug_reason=00000001
Info : Auto-detected flash bank 'esp32s2.flash' size 0 KB
Info : Using flash bank 'esp32s2.flash' size 0 KB
Info : esp32s2: Target halted, PC=0x400314A4, debug_reason=00000001
Error: Failed to get flash maps (5)!
Warn : Failed to get flash mappings (-4)!
Info : esp32s2: Target halted, PC=0x400314A4, debug_reason=00000001
Info : Using flash bank 'esp32s2.irom' size 0 KB
Info : esp32s2: Target halted, PC=0x400314A4, debug_reason=00000001
Error: Failed to get flash maps (5)!
Warn : Failed to get flash mappings (-4)!
Info : esp32s2: Target halted, PC=0x400314A4, debug_reason=00000001
Info : Using flash bank 'esp32s2.drom' size 0 KB
Info : JTAG tap: esp32s2.cpu tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32s2: Target halted, PC=0x40022403, debug_reason=00000001
Info : esp32s2: Core 0 was reset.
Info : esp32s2: Target halted, PC=0x40000400, debug_reason=00000000
```
sspaten
February 10, 2022, 10:23am
#4
I found the reason - and it had absolutely no relevance to the problem description - neither to platformIO or Espressif. Please accept my deepest appologies - come get your beer…
The real reason was a terrible mess in my setup. I had two versions of python (not really a problem), two Espressif IDF`s on top of VS-code with platformIO, my IDF installation is on E: - with numerous irritating references to my windows userID. I deleted ALL old python references and installed all over.
That worked !!