Hello everyone!
I have an ESP32-CAM(esp32-s) AI Thinker board which I want to flash with some firmware using CJMCU-232H programmer.
When I start Upload, large led stops flashing and some seconds later I get an error.
I think it’s linked with programmer, because minimodule described in docs differs from CJMCU-232H because its single channel.
Wired with 4 jtag pins and board is connected to programmer’s 5V
Traceback
Processing esp32cam (platform: link removed /platformio/platform-espressif32.git; board: esp32cam; framework: arduino) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Verbose mode can be enabled via
-v, --verbose` option
CONFIGURATION: link removed /page/boards/espressif32/esp32cam.html
PLATFORM: Espressif 32 (3.1.0+sha.34b55a4) > AI Thinker ESP32-CAM
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 3.10005.210308 (1.0.5)
- tool-esptoolpy 1.30000.201119 (3.0.0)
- tool-mkspiffs 2.230.0 (2.30)
- tool-openocd-esp32 2.1000.20201202 (10.0)
- toolchain-xtensa32 2.50200.97 (5.2.0)
LDF: Library Dependency Finder → link removed /configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 28 compatible libraries
Scanning dependencies…
No dependencies
Building in release mode
Retrieving maximum program size .pio/build/esp32cam/firmware.elf
Checking size .pio/build/esp32cam/firmware.elf
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [ ] 4.1% (used 13588 bytes from 327680 bytes)
Flash: [= ] 8.5% (used 266054 bytes from 3145728 bytes)
Configuring upload protocol…
AVAILABLE: esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = minimodule
Uploading .pio/build/esp32cam/firmware.bin
Open On-Chip Debugger v0.10.0-esp32-20201202 (2020-12-02-17:38)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 1
none separate
WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
adapter speed: 5000 kHz
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'
** Programming Started **
Error: timed out while waiting for target halted / 4 - 2
Error: xtensa_wait_algorithm: not halted 0, pc 0x40090060, ps 0x60025
Error: Failed to wait algorithm (-302)!
Error: Algorithm run failed (-302)!
Warn : Empty flash mapping!
Warn : Failed to get flash mappings (0)!
Error: Target is already running an algorithm
Error: Failed to start algorithm (-4)!
Error: Algorithm run failed (-4)!
Error: Failed to get flash size!
Error: Target is already running an algorithm
Error: Failed to start algorithm (-4)!
Error: Algorithm run failed (-4)!
Error: Failed to get flash size!
Error: Failed to probe flash, size 0 KB
Error: auto_probe failed
embedded:startup.tcl:449: Error: ** Programming Failed **
in procedure 'program_esp'
in procedure 'program_error' called at file "/Users/turbokach/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp_common.cfg", line 102
at file "embedded:startup.tcl", line 449
*** [upload] Error 1
================================================================================ [FAILED] Took 41.79 seconds ================================================================================
The terminal process "platformio 'run', '--target', 'upload'" terminated with exit code: 1.`
platformio.ini
[env:esp32cam]
# platform = espressif32
platform = https://github.com/platformio/platform-espressif32.git
board = esp32cam
framework = arduino
upload_protocol = minimodule
I have also changed ftdi config file minimodule.cfg
#
# FTDI MiniModule
#
#
interface ftdi
# ftdi_device_desc "Single RS232-HS"
ftdi_vid_pid 0x0403 0x6010 0x0403 0x6014
ftdi_channel 0
# Every pin set as high impedance except TCK, TDI, TDO and TMS
ftdi_layout_init 0x0008 0x000b
reset_config none
# nSRST defined on pin CN2-13 of the MiniModule (pin ADBUS5 [AD5] on the FT2232H chip)
# This choice is arbitrary. Use other GPIO pin if desired.
# ftdi_layout_signal nSRST -data 0x0020 -oe 0x0020
Board: ESP32-CAM(esp32-s) AI Thinker
Programmer: CJMCU-232H (FT232HQ chip)
OS: macOS
IDE: VSCode + PlatformIO plugin