ESP32-PICO-V3-02
Posted: Sun Jun 26, 2022 2:02 pm
Hello!
I'm new to ESP32 chips and I have some problems with flashing project to it. I successfully build and flashed 'hello world' test project to ESP32-DevKit-V4 based on ESP-WROOM-32D chip by using Espressif-IDE. And got nice prints.
But now I can't make any project work on ESP32-PICO-V3-02 chip on my own board. If I flash the same project to PICO via serial port, I got those logs:
I seems to have no errors during flash:
If I flash it using J-LINK + OpenOCD, I get this:
OpenOCD flash log:
Project build result:
Before that I tried to build and flash "esp-at" project to PICO, but got about the same result. I looked in menuconfig and tried to switch on/off JTAG support in "security" settings. Don't know if it caused this behaviour.
What am I doing wrong? Is it PICO not compatible with IDF?
I'm new to ESP32 chips and I have some problems with flashing project to it. I successfully build and flashed 'hello world' test project to ESP32-DevKit-V4 based on ESP-WROOM-32D chip by using Espressif-IDE. And got nice prints.
But now I can't make any project work on ESP32-PICO-V3-02 chip on my own board. If I flash the same project to PICO via serial port, I got those logs:
Code: Select all
...
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0x7663fd75
invalid header: 0x7663fd75
invalid header: 0x7663fd75
invalid header: 0x7663fd75
invalid header: 0x7663fd75
invalid header: 0x7663fd75
invalid header: 0x7663fd75
ets Jul 29 2019 12:21:46
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0x7663fd75
invalid header: 0x7663fd75
invalid header: 0x7663fd75
invalid header: 0x7663fd75
invalid header: 0x7663fd75
invalid header: 0x7663fd75
invalid header: 0x7663fd75
...
Code: Select all
[1/5] cmd.exe /C "cd /D E:\development\esp-idf-hello-world\build\esp-idf\esptool_py && python F:/Tools/Espressif/ESPIdfTools/frameworks/esp-idf-v4.4/components/partition_table/check_sizes.py --offset 0x8000 partition --type app E:/development/esp-idf-hello-world/build/partition_table/partition-table.bin E:/development/esp-idf-hello-world/build/hello-world.bin"
hello-world.bin binary size 0x29730 bytes. Smallest app partition is 0x100000 bytes. 0xd68d0 bytes (84%) free.
[2/5] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D E:\development\esp-idf-hello-world\build\bootloader\esp-idf\esptool_py && python F:/Tools/Espressif/ESPIdfTools/frameworks/esp-idf-v4.4/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 E:/development/esp-idf-hello-world/build/bootloader/bootloader.bin"
Bootloader binary size 0x62b0 bytes. 0xd50 bytes (12%) free.
[2/3] cmd.exe /C "cd /D F:\Tools\Espressif\ESPIdfTools\frameworks\esp-idf-v4.4\components\esptool_py && F:\Tools\Espressif\ESPIdfTools\tools\cmake\3.20.3\bin\cmake.exe -D IDF_PATH="F:/Tools/Espressif/ESPIdfTools/frameworks/esp-idf-v4.4" -D SERIAL_TOOL="python F:/Tools/Espressif/ESPIdfTools/frameworks/esp-idf-v4.4/components/esptool_py/esptool/esptool.py --chip esp32" -D SERIAL_TOOL_ARGS="--before=default_reset --after=hard_reset write_flash @flash_args" -D WORKING_DIRECTORY="E:/development/esp-idf-hello-world/build" -P F:/Tools/Espressif/ESPIdfTools/frameworks/esp-idf-v4.4/components/esptool_py/run_serial_tool.cmake"
esptool.py esp32 -p COM23 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x1000 bootloader/bootloader.bin 0x10000 hello-world.bin 0x8000 partition_table/partition-table.bin
esptool.py v3.2-dev
Serial port COM23
Connecting.....
Chip is ESP32-PICO-V3-02 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, Embedded PSRAM, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 30:83:98:d5:51:54
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00010000 to 0x00039fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 25264 bytes to 15785...
Writing at 0x00001000... (100 %)
Wrote 25264 bytes (15785 compressed) at 0x00001000 in 0.9 seconds (effective 226.3 kbit/s)...
Hash of data verified.
Compressed 169776 bytes to 89627...
Writing at 0x00010000... (16 %)
Writing at 0x0001afdd... (33 %)
Writing at 0x00020754... (50 %)
Writing at 0x00025f9a... (66 %)
Writing at 0x0002e5b0... (83 %)
Writing at 0x00036948... (100 %)
Wrote 169776 bytes (89627 compressed) at 0x00010000 in 2.6 seconds (effective 526.5 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 103...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.1 seconds (effective 225.4 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Executing action: flash
Running ninja in directory e:\development\esp-idf-hello-world\build
Executing "ninja flash"...
Done
If I flash it using J-LINK + OpenOCD, I get this:
Code: Select all
...
ets Jul 29 2019 12:21:46
rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 271414342, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:6604
ho 0 tail 12 room 4
load:0x40078000,len:14780
load:0x40080400,len:3792
entry 0x40080694
I (57) boot: ESP-IDF v4.4 2nd stage bootloader
I (58) boot: compile time 16:47:21
I (58) boot: chip revision: 3
I (61) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (68) boot.esp32: SPI Speed : 40MHz
I (73) boot.esp32: SPI Mode : DIO
I (77) boot.esp32: SPI Flash Size : 2MB
I (82) boot: Enabling RNG early entropy source...
E (87) flash_parts: partition 0 invalid magic number 0x4b3b
E (93) boot: Failed to verify partition table
E (98) boot: load partition table error!
ets Jul 29 2019 12:21:46
rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 271414342, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:6604
ho 0 tail 12 room 4
load:0x40078000,len:14780
load:0x40080400,len:3792
entry 0x40080694
I (57) boot: ESP-IDF v4.4 2nd stage bootloader
I (58) boot: compile time 16:47:21
I (58) boot: chip revision: 3
I (61) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (68) boot.esp32: SPI Speed : 40MHz
I (73) boot.esp32: SPI Mode : DIO
I (77) boot.esp32: SPI Flash Size : 2MB
I (82) boot: Enabling RNG early entropy source...
E (87) flash_parts: partition 0 invalid magic number 0x4b3b
E (93) boot: Failed to verify partition table
E (98) boot: load partition table error!
...
Code: Select all
Open On-Chip Debugger v0.11.0-esp32-20211220 (2021-12-20-15:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz
Flashing E:/development/esp-idf-hello-world/build/partition_table/partition-table.bin at 0x8000
Info : J-Link V11 compiled Sep 7 2121 11:22:27
Info : Hardware version: 11.00
Info : VTarget = 3.284 V
Info : clock speed 1000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Warn : target esp32.cpu1 examination failed
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : starting gdb server for esp32.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Target halted, PC=0x4000F979, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu0.flash' size 8192 KB
Info : Using flash bank 'esp32.cpu0.flash' size 8192 KB
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu1.flash' size 8192 KB
Info : Using flash bank 'esp32.cpu1.flash' size 8192 KB
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
Info : PROF: Data transferred in 106.501 ms @ 37.5583 KB/s
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
** Programming Finished **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
** Verified OK **
** Flashing done for partition_table/partition-table.bin **
Flashing E:/development/esp-idf-hello-world/build/bootloader/bootloader.bin at 0x1000
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
Info : PROF: Data transferred in 614.384 ms @ 45.5741 KB/s
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
** Programming Finished **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
** Verified OK **
** Flashing done for bootloader/bootloader.bin **
Flashing E:/development/esp-idf-hello-world/build/hello-world.bin at 0x10000
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
Info : PROF: Data transferred in 3636.82 ms @ 46.1942 KB/s
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
** Programming Finished **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x40092AEE, debug_reason=00000001
** Verified OK **
** Flashing done for hello-world.bin **
** Resetting Target **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
shutdown command invoked
Code: Select all
...
esptool.py v3.2-dev
Merged 2 ELF sections
Generated E:/development/esp-idf-hello-world/build/hello-world.bin
[1011/1011] cmd.exe /C "cd /D E:\development\esp-idf-hello-world\build\esp-idf\esptool_py && python F:/Tools/Espressif/ESPIdfTools/frameworks/esp-idf-v4.4/components/partition_table/check_sizes.py --offset 0x8000 partition --type app E:/development/esp-idf-hello-world/build/partition_table/partition-table.bin E:/development/esp-idf-hello-world/build/hello-world.bin"
hello-world.bin binary size 0x29730 bytes. Smallest app partition is 0x100000 bytes. 0xd68d0 bytes (84%) free.
Build complete (0 errors, 0 warnings): E:\development\esp-idf-hello-world\build
F:\Tools\Espressif\ESPIdfTools\python_env\idf4.4_py3.8_env\Scripts\python.exe F:\Tools\Espressif\ESPIdfTools\frameworks\esp-idf-v4.4\tools\idf_size.py E:/development/esp-idf-hello-world/build/hello-world.map
Total sizes:
Used static DRAM: 11304 bytes ( 169432 remain, 6.3% used)
.data size: 9024 bytes
.bss size: 2280 bytes
Used static IRAM: 45479 bytes ( 85593 remain, 34.7% used)
.text size: 44452 bytes
.vectors size: 1027 bytes
Used stat D/IRAM: 56783 bytes ( 255025 remain, 18.2% used)
.data size: 9024 bytes
.bss size: 2280 bytes
.text size: 44452 bytes
.vectors size: 1027 bytes
Used Flash size : 115147 bytes
.text : 84543 bytes
.rodata : 30348 bytes
Total image size: 224153 bytes (.bin may be padded larger)
F:\Tools\Espressif\ESPIdfTools\python_env\idf4.4_py3.8_env\Scripts\python.exe F:/Tools/Espressif/ESPIdfTools/frameworks/esp-idf-v4.4/\components\partition_table\gen_esp32part.py E:\development\esp-idf-hello-world\build\partition_table\partition-table.bin
Total time taken to build the project: 109 297 msBuilding in: E:\development\esp-idf-hello-world\build
cmake --build . -- -v
[1/4] cmd.exe /C "cd /D E:\development\esp-idf-hello-world\build\esp-idf\esptool_py && python F:/Tools/Espressif/ESPIdfTools/frameworks/esp-idf-v4.4/components/partition_table/check_sizes.py --offset 0x8000 partition --type app E:/development/esp-idf-hello-world/build/partition_table/partition-table.bin E:/development/esp-idf-hello-world/build/hello-world.bin"
hello-world.bin binary size 0x29730 bytes. Smallest app partition is 0x100000 bytes. 0xd68d0 bytes (84%) free.
[2/4] cmd.exe /C "cd /D E:\development\esp-idf-hello-world\build\bootloader && F:\Tools\Espressif\ESPIdfTools\tools\cmake\3.20.3\bin\cmake.exe --build ."
[1/1] cmd.exe /C "cd /D E:\development\esp-idf-hello-world\build\bootloader\esp-idf\esptool_py && python F:/Tools/Espressif/ESPIdfTools/frameworks/esp-idf-v4.4/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 E:/development/esp-idf-hello-world/build/bootloader/bootloader.bin"
Bootloader binary size 0x62b0 bytes. 0xd50 bytes (12%) free.
Build complete (0 errors, 0 warnings): E:\development\esp-idf-hello-world\build
F:\Tools\Espressif\ESPIdfTools\python_env\idf4.4_py3.8_env\Scripts\python.exe F:\Tools\Espressif\ESPIdfTools\frameworks\esp-idf-v4.4\tools\idf_size.py E:/development/esp-idf-hello-world/build/hello-world.map
Total sizes:
Used static DRAM: 11304 bytes ( 169432 remain, 6.3% used)
.data size: 9024 bytes
.bss size: 2280 bytes
Used static IRAM: 45479 bytes ( 85593 remain, 34.7% used)
.text size: 44452 bytes
.vectors size: 1027 bytes
Used stat D/IRAM: 56783 bytes ( 255025 remain, 18.2% used)
.data size: 9024 bytes
.bss size: 2280 bytes
.text size: 44452 bytes
.vectors size: 1027 bytes
Used Flash size : 115147 bytes
.text : 84543 bytes
.rodata : 30348 bytes
Total image size: 224153 bytes (.bin may be padded larger)
F:\Tools\Espressif\ESPIdfTools\python_env\idf4.4_py3.8_env\Scripts\python.exe F:/Tools/Espressif/ESPIdfTools/frameworks/esp-idf-v4.4/\components\partition_table\gen_esp32part.py E:\development\esp-idf-hello-world\build\partition_table\partition-table.bin
Total time taken to build the project: 809 ms
What am I doing wrong? Is it PICO not compatible with IDF?