Error when programming new device over UART0 and JTAG with custom firmware

Ninjabean
Posts: 5
Joined: Tue Sep 07, 2021 5:44 am

Error when programming new device over UART0 and JTAG with custom firmware

Postby Ninjabean » Fri Dec 17, 2021 8:49 am

I started my product development on the ESP32-DEVKITM-1 with Eclipse and ESP_IDF plugin on Windows. I have been using JTAG for debugging and programming successfully. I have since gotten some new custom hardware to test my firmware on and found an issue with not being able to program stock MCU over UART0 or JTAG.

After some trial and error I found that if I flash a working piece of firmware over UART0, like the default "Hello World" example, then I can program my custom firmware over JTAG and perform debugging. I can change the code and program over JTAG as many times as I want without any problems once the MCU has working firmware.

This process is not good for mass production. Ideally I would like to be able to flash the whole firmware over UART0 in the factory.
Also, note that I have reconfigured UART0 for my own application but have left them on the default pins.

I am not sure what is going on here but could it be a configuration error or something? Please help point me to the right direction.

To give a clean platform for analysis I have replicated the exact problem with a brand new ESP32-DEVKITM-1 and these are my findings:

1. Cannot program with default config as bootloader.bin too large
  • “Partition Table Single factory app, no OTA”
  • Partition table offset “0x8000”
  • Bootloader log verbosity “Info”
2. Change Partition table offset to “0x10000” can flash but program crashes

Code: Select all

//============Console output=====================
[1/4] Performing build step for 'bootloader'
ninja: no work to do.
[1/2] cmd.exe /C "cd /D C:\ESP32\ESP-IDF\components\esptool_py && C:\ESP32\esp-tools\.espressif\tools\cmake\3.16.4\bin\cmake.exe -D IDF_PATH="C:/ESP32/ESP-IDF" -D SERIAL_TOOL="python C:/ESP32/ESP-IDF/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="C:/eclipse-workspace/esp32-iot/SV_IoT/build" -P C:/ESP32/ESP-IDF/components/esptool_py/run_serial_tool.cmake"
esptool.py esp32 -p COM14 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x10000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x20000 main.bin
esptool.py v3.1-dev
Serial port COM14
Connecting.....
Chip is ESP32-U4WDH (revision 3)
Features: WiFi, BT, Single Core, Embedded Flash, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: e0:e2:e6:e3:f6:c0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00010000 to 0x00010fff...
Flash will be erased from 0x00001000 to 0x0000afff...
Flash will be erased from 0x00020000 to 0x0004cfff...
Compressed 3072 bytes to 104...
Writing at 0x00010000... (100 %)
Wrote 3072 bytes (104 compressed) at 0x00010000 in 0.1 seconds (effective 390.9 kbit/s)...
Hash of data verified.
Compressed 37616 bytes to 19804...
Writing at 0x00001000... (50 %)
Writing at 0x00008b1c... (100 %)
Wrote 37616 bytes (19804 compressed) at 0x00001000 in 1.0 seconds (effective 295.2 kbit/s)...
Hash of data verified.
Compressed 184032 bytes to 104609...
Writing at 0x00020000... (14 %)
Writing at 0x0002aeaa... (28 %)
Writing at 0x000305b8... (42 %)
Writing at 0x00036434... (57 %)
Writing at 0x0003bee9... (71 %)
Writing at 0x00043209... (85 %)
Writing at 0x0004aa12... (100 %)
Wrote 184032 bytes (104609 compressed) at 0x00020000 in 2.9 seconds (effective 515.3 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Executing action: flash
Running ninja in directory c:\eclipse-workspace\esp32-iot\sv_iot\build
Executing "ninja flash"...
Done

Code: Select all

//================Terminal output==============
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, 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:7280
load:0x40078000,len:24232
load:0x40080400,len:6020
0x40080400: _init at ??:?

entry 0x400806a4
I (30) boot: ESP-IDF v4.3 2nd stage bootloader
I (30) boot: compile time 16:12:51
I (30) boot: chip revision: 3
I (33) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (40) boot.esp32: SPI Speed      : 40MHz
I (45) boot.esp32: SPI Mode       : DIO
I (49) boot.esp32: SPI Flash Size : 4MB
I (54) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (63) boot: ## Label            Usage          Type ST Offset   Length
I (70) boot:  0 nvs              WiFi data        01 02 00011000 00006000
I (77) boot:  1 phy_init         RF data          01 01 00017000 00001000
I (85) boot:  2 factory          factory app      00 00 00020000 00100000
I (92) boot: End of partition table
I (97) boot_comm: chip revision: 3, min. application chip revision: 0
I (104) esp_image: segment 0: paddr=00020020 vaddr=3f400020 size=08218h ( 33304)
 map
I (131) esp_image: segment 1: paddr=00028240 vaddr=3ffb0000 size=0219ch (  8604)
 load
I (137) esp_image: segment 2: paddr=0002a3e4 vaddr=40080000 size=05c34h ( 23604)
 load
I (153) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=17260h ( 94816)
 map
I (208) esp_image: segment 4: paddr=00047288 vaddr=40085c34 size=05c10h ( 23568)
 load
I (223) esp_image: segment 5: paddr=0004cea0 vaddr=50000000 size=00010h (    16)
 load
Fatal exception (0): IllegalInstruction
epc1=0x400813bd, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x0
0000000
0x400813bd: heap_caps_malloc at C:/ESP32/ESP-IDF/components/heap/heap_caps.c:145

ets Jul 29 2019 12:21:46

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, 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:7280
load:0x40078000,len:24232
load:0x40080400,len:6020
0x40080400: _init at ??:?

entry 0x400806a4
I (30) boot: ESP-IDF v4.3 2nd stage bootloader
I (31) boot: compile time 16:12:51
I (31) boot: chip revision: 3
I (33) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (40) boot.esp32: SPI Speed      : 40MHz
I (45) boot.esp32: SPI Mode       : DIO
I (49) boot.esp32: SPI Flash Size : 4MB
I (54) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (63) boot: ## Label            Usage          Type ST Offset   Length
I (70) boot:  0 nvs              WiFi data        01 02 00011000 00006000
I (78) boot:  1 phy_init         RF data          01 01 00017000 00001000
I (85) boot:  2 factory          factory app      00 00 00020000 00100000
I (93) boot: End of partition table
I (97) boot_comm: chip revision: 3, min. application chip revision: 0
I (104) esp_image: segment 0: paddr=00020020 vaddr=3f400020 size=08218h ( 33304)
 map
I (132) esp_image: segment 1: paddr=00028240 vaddr=3ffb0000 size=0219ch (  8604)
 load
I (137) esp_image: segment 2: paddr=0002a3e4 vaddr=40080000 size=05c34h ( 23604)
 load
I (153) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=17260h ( 94816)
 map
I (208) esp_image: segment 4: paddr=00047288 vaddr=40085c34 size=05c10h ( 23568)
 load
I (224) esp_image: segment 5: paddr=0004cea0 vaddr=50000000 size=00010h (    16)
 load
Fatal exception (29): StoreProhibited
epc1=0x400818c7, epc2=0x00000000, epc3=0x00000000, excvaddr=0x8007ac61, depc=0x0
0000000
0x400818c7: esp_cache_err_get_cpuid at C:/ESP32/ESP-IDF/components/esp32/cache_e
rr_int.c:105
Therminal output just show the device resets itself over and over and stopping at a Fatal exception.

3. Erase device through Flash Download Tool then try JTAG debugging: program successful but cannot break and program does not run. Terminal shows same message as straight after erasing.

Code: Select all

//=========== Console==============
Open On-Chip Debugger  v0.10.0-esp32-20210401 (2021-04-01-15:46)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
1
Warn : Interface already configured, ignoring
Started by GNU MCU Eclipse
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 kHz
Info : JTAG tap: esp32.cpu0 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 : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Warn : No symbols for FreeRTOS!
Info : esp32.cpu0: Target halted, PC=0x40009078, debug_reason=00000000
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
Warn : Empty flash mapping!
Warn : Failed to get flash mappings (0)!
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu0.flash' size 4096 KB
Info : Using flash bank 'esp32.cpu0.flash' size 4096 KB
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
Warn : Empty flash mapping!
Warn : Failed to get flash mappings (0)!
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
Info : Using flash bank 'esp32.cpu0.irom' size 0 KB
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
Warn : Empty flash mapping!
Warn : Failed to get flash mappings (0)!
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
Info : Using flash bank 'esp32.cpu0.drom' size 0 KB
Info : JTAG tap: esp32.cpu0 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 : JTAG tap: esp32.cpu0 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 : JTAG tap: esp32.cpu0 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
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
Info : PROF: Data transferred in 690.672 ms @ 260.616 KB/s
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
** Programming Finished **
** Verify Started **
Info : PROF: Data transferred in 1229.1 ms @ 146.22 KB/s
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
** Verified OK **
Info : JTAG tap: esp32.cpu0 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
invalid command name "arm"
Error: Too large number of threads 443356912!
Error: Too large number of threads 443356912!
Info : JTAG tap: esp32.cpu0 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
===== Xtensa registers
(0) pc (/32): 0x40000400
(1) ar0 (/32): 0x00000000
(2) ar1 (/32): 0x00000000
(3) ar2 (/32): 0x00000000
(4) ar3 (/32): 0x00000000
(5) ar4 (/32): 0x00000000
(6) ar5 (/32): 0x00000000
(7) ar6 (/32): 0x00000000
(8) ar7 (/32): 0x00000000
(9) ar8 (/32): 0x00000000
(10) ar9 (/32): 0x00000000
(11) ar10 (/32): 0x00000000
(12) ar11 (/32): 0x00000000
(13) ar12 (/32): 0x00000000
(14) ar13 (/32): 0x00000000
(15) ar14 (/32): 0x00000000
(16) ar15 (/32): 0x00000000
(17) ar16 (/32): 0x00000000
(18) ar17 (/32): 0x00000000
(19) ar18 (/32): 0x00000000
(20) ar19 (/32): 0x00000000
(21) ar20 (/32): 0x00000000
(22) ar21 (/32): 0x00000000
(23) ar22 (/32): 0x00000000
(24) ar23 (/32): 0x00000000
(25) ar24 (/32): 0x00000000
(26) ar25 (/32): 0x00000000
(27) ar26 (/32): 0x00000000
(28) ar27 (/32): 0x00000000
(29) ar28 (/32): 0x00000000
(30) ar29 (/32): 0x00000000
(31) ar30 (/32): 0x00000000
(32) ar31 (/32): 0x00000000
(33) ar32 (/32): 0x00000000
(34) ar33 (/32): 0x00000000
(35) ar34 (/32): 0x00000000
(36) ar35 (/32): 0x00000000
(37) ar36 (/32): 0x00000000
(38) ar37 (/32): 0x00000000
(39) ar38 (/32): 0x00000000
(40) ar39 (/32): 0x00000000
(41) ar40 (/32): 0x00000000
(42) ar41 (/32): 0x00000000
(43) ar42 (/32): 0x00000000
(44) ar43 (/32): 0x00000000
(45) ar44 (/32): 0x00000000
(46) ar45 (/32): 0x00000000
(47) ar46 (/32): 0x00000000
(48) ar47 (/32): 0x00000000
(49) ar48 (/32): 0x00000000
(50) ar49 (/32): 0x00000000
(51) ar50 (/32): 0x00000000
(52) ar51 (/32): 0x00000000
(53) ar52 (/32): 0x00000000
(54) ar53 (/32): 0x00000000
(55) ar54 (/32): 0x00000000
(56) ar55 (/32): 0x00000000
(57) ar56 (/32): 0x00000000
(58) ar57 (/32): 0x00000000
(59) ar58 (/32): 0x00000000
(60) ar59 (/32): 0x00000000
(61) ar60 (/32): 0x00000000
(62) ar61 (/32): 0x00000000
(63) ar62 (/32): 0x00000000
(64) ar63 (/32): 0x00000000
(65) lbeg (/32): 0x00000000
(66) lend (/32): 0x00000000
(67) lcount (/32): 0x00000000
(68) sar (/32): 0x00000000
(69) windowbase (/32): 0x00000000
(70) windowstart (/32): 0x00000001
(71) configid0 (/32): 0x40000400
(72) configid1 (/32): 0x1CC5FE96
(73) ps (/32): 0x0000001F
(74) threadptr (/32): 0x00000000
(75) br (/32): 0x00000000
(76) scompare1 (/32): 0x00000000
(77) acclo (/32): 0x00000000
(78) acchi (/32): 0x00000000
(79) m0 (/32): 0x00000000
(80) m1 (/32): 0x00000000
(81) m2 (/32): 0x00000000
(82) m3 (/32): 0x00000000
(83) f0 (/32): 0x00000000
(84) f1 (/32): 0x00000000
(85) f2 (/32): 0x00000000
(86) f3 (/32): 0x00000000
(87) f4 (/32): 0x00000000
(88) f5 (/32): 0x00000000
(89) f6 (/32): 0x00000000
(90) f7 (/32): 0x00000000
(91) f8 (/32): 0x00000000
(92) f9 (/32): 0x00000000
(93) f10 (/32): 0x00000000
(94) f11 (/32): 0x00000000
(95) f12 (/32): 0x00000000
(96) f13 (/32): 0x00000000
(97) f14 (/32): 0x00000000
(98) f15 (/32): 0x00000000
(99) fcr (/32): 0x00000000
(100) fsr (/32): 0x00000000
(101) mmid (/32)
(102) ibreakenable (/32): 0x00000000
(103) memctl (/32): 0x00000000
(104) atomctl (/32): 0x00000028
(105) ibreaka0 (/32): 0x00000000
(106) ibreaka1 (/32): 0x00000000
(107) dbreaka0 (/32): 0x00000000
(108) dbreaka1 (/32): 0x00000000
(109) dbreakc0 (/32): 0x00000000
(110) dbreakc1 (/32): 0x00000000
(111) epc1 (/32): 0x00000000
(112) epc2 (/32): 0x00000000
(113) epc3 (/32): 0x00000000
(114) epc4 (/32): 0x00000000
(115) epc5 (/32): 0x00000000
(116) epc6 (/32): 0x40000400
(117) epc7 (/32): 0x00000000
(118) depc (/32): 0x00000000
(119) eps2 (/32): 0x00000000
(120) eps3 (/32): 0x00000000
(121) eps4 (/32): 0x00000000
(122) eps5 (/32): 0x00000000
(123) eps6 (/32): 0x0000001F
(124) eps7 (/32): 0x00000000
(125) excsave1 (/32): 0x00000000
(126) excsave2 (/32): 0x00000000
(127) excsave3 (/32): 0x00000000
(128) excsave4 (/32): 0x00000000
(129) excsave5 (/32): 0x00000000
(130) excsave6 (/32): 0x00000000
(131) excsave7 (/32): 0x00000000
(132) cpenable (/32): 0x000000FF
(133) interrupt (/32): 0x00018040
(134) intset (/32)
(135) intclear (/32)
(136) intenable (/32): 0x00000000
(137) vecbase (/32): 0x40000000
(138) exccause (/32): 0x00000000
(139) debugcause (/32): 0x00000020
(140) ccount (/32): 0x00000004
(141) prid (/32): 0x0000CDCD
(142) icount (/32): 0x00000000
(143) icountlevel (/32): 0x00000000
(144) excvaddr (/32): 0x00000000
(145) ccompare0 (/32): 0x00000000
(146) ccompare1 (/32): 0x00000000
(147) ccompare2 (/32): 0x00000000
(148) misc0 (/32): 0x00000000
(149) misc1 (/32): 0x00000000
(150) misc2 (/32): 0x00000000
(151) misc3 (/32): 0x00000000
(163) a0 (/32): 0x00000000
(164) a1 (/32): 0x00000000
(165) a2 (/32): 0x00000000
(166) a3 (/32): 0x00000000 (dirty)
(167) a4 (/32): 0x00000000
(168) a5 (/32): 0x00000000
(169) a6 (/32): 0x00000000
(170) a7 (/32): 0x00000000
(171) a8 (/32): 0x00000000
(172) a9 (/32): 0x00000000
(173) a10 (/32): 0x00000000
(174) a11 (/32): 0x00000000
(175) a12 (/32): 0x00000000
(176) a13 (/32): 0x00000000
(177) a14 (/32): 0x00000000
(178) a15 (/32): 0x00000000
(179) pwrctl (/32)
(180) pwrstat (/32)
(181) eristat (/32)
(182) cs_itctrl (/32)
(183) cs_claimset (/32)
(184) cs_claimclr (/32)
(185) cs_lockaccess (/32)
(186) cs_lockstatus (/32)
(187) cs_authstatus (/32)
(188) fault_info (/32)
(189) trax_id (/32)
(190) trax_ctrl (/32)
(191) trax_stat (/32)
(192) trax_data (/32)
(193) trax_addr (/32)
(194) trax_pctrigger (/32)
(195) trax_pcmatch (/32)
(196) trax_delay (/32)
(197) trax_memstart (/32)
(198) trax_memend (/32)
(199) pmg (/32)
(200) pmoc (/32)
(201) pm0 (/32)
(202) pm1 (/32)
(203) pmctrl0 (/32)
(204) pmctrl1 (/32)
(205) pmstat0 (/32)
(206) pmstat1 (/32)
(207) ocd_id (/32)
(208) ocd_dcrclr (/32)
(209) ocd_dcrset (/32)
(210) ocd_dsr (/32)
(211) ddr (/32)
(212) expstate (/32): 0x00000000
(213) f64r_lo (/32): 0x00000000
(214) f64r_hi (/32): 0x00000000
(215) f64s (/32): 0x00000000

Warn : address 0x400d7163 not writable
Error: esp32.cpu0: Failed to write breakpoint instruction (-4)!
Error: esp32.cpu0: Failed to add SW breakpoint!
Error: can't add breakpoint: unknown reason
Warn : address 0x400d7187 not writable
Error: esp32.cpu0: Failed to write breakpoint instruction (-4)!
Error: esp32.cpu0: Failed to add SW breakpoint!
Error: can't add breakpoint: unknown reason

Code: Select all

//==========Terminal =======
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
ets Jul 29 2019 12:21:46

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
4. Flash default project “Hello World” over UART0: success and working as expected
5. With the working Hello World code running I program and debug the custom project over JTAG: success, program runs and can break , working as expected.

Code: Select all

//=============Console===============
Open On-Chip Debugger  v0.10.0-esp32-20210401 (2021-04-01-15:46)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
1
Warn : Interface already configured, ignoring
Started by GNU MCU Eclipse
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 kHz
Info : JTAG tap: esp32.cpu0 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 : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Warn : No symbols for FreeRTOS!
Info : esp32.cpu0: Target halted, PC=0x400DF946, debug_reason=00000000
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 23 KB
Info : Flash mapping 1: 0x20020 -> 0x400d0020, 63 KB
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu0.flash' size 4096 KB
Info : Using flash bank 'esp32.cpu0.flash' size 4096 KB
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 23 KB
Info : Flash mapping 1: 0x20020 -> 0x400d0020, 63 KB
Info : Using flash bank 'esp32.cpu0.irom' size 64 KB
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 23 KB
Info : Flash mapping 1: 0x20020 -> 0x400d0020, 63 KB
Info : Using flash bank 'esp32.cpu0.drom' size 24 KB
Info : JTAG tap: esp32.cpu0 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 : JTAG tap: esp32.cpu0 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 : JTAG tap: esp32.cpu0 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
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
Info : PROF: Data transferred in 803.134 ms @ 224.122 KB/s
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
** Programming Finished **
** Verify Started **
Info : PROF: Data transferred in 1402.56 ms @ 128.136 KB/s
Info : esp32.cpu0: Target halted, PC=0x40091C2A, debug_reason=00000001
** Verified OK **
Info : JTAG tap: esp32.cpu0 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
invalid command name "arm"
Error: Too large number of threads 1073423256!
Error: Too large number of threads 1073423256!
Info : JTAG tap: esp32.cpu0 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
===== Xtensa registers
(0) pc (/32): 0x40000400
(1) ar0 (/32): 0x00000000
(2) ar1 (/32): 0x00000000
(3) ar2 (/32): 0x00000000
(4) ar3 (/32): 0x00000000
(5) ar4 (/32): 0x00000000
(6) ar5 (/32): 0x00000000
(7) ar6 (/32): 0x00000000
(8) ar7 (/32): 0x00000000
(9) ar8 (/32): 0x00000000
(10) ar9 (/32): 0x00000000
(11) ar10 (/32): 0x00000000
(12) ar11 (/32): 0x00000000
(13) ar12 (/32): 0x00000000
(14) ar13 (/32): 0x00000000
(15) ar14 (/32): 0x00000000
(16) ar15 (/32): 0x00000000
(17) ar16 (/32): 0x00000000
(18) ar17 (/32): 0x00000000
(19) ar18 (/32): 0x00000000
(20) ar19 (/32): 0x00000000
(21) ar20 (/32): 0x00000000
(22) ar21 (/32): 0x00000000
(23) ar22 (/32): 0x00000000
(24) ar23 (/32): 0x00000000
(25) ar24 (/32): 0x00000000
(26) ar25 (/32): 0x00000000
(27) ar26 (/32): 0x00000000
(28) ar27 (/32): 0x00000000
(29) ar28 (/32): 0x00000000
(30) ar29 (/32): 0x00000000
(31) ar30 (/32): 0x00000000
(32) ar31 (/32): 0x00000000
(33) ar32 (/32): 0x00000000
(34) ar33 (/32): 0x00000000
(35) ar34 (/32): 0x00000000
(36) ar35 (/32): 0x00000000
(37) ar36 (/32): 0x00000000
(38) ar37 (/32): 0x00000000
(39) ar38 (/32): 0x00000000
(40) ar39 (/32): 0x00000000
(41) ar40 (/32): 0x00000000
(42) ar41 (/32): 0x00000000
(43) ar42 (/32): 0x00000000
(44) ar43 (/32): 0x00000000
(45) ar44 (/32): 0x00000000
(46) ar45 (/32): 0x00000000
(47) ar46 (/32): 0x00000000
(48) ar47 (/32): 0x00000000
(49) ar48 (/32): 0x00000000
(50) ar49 (/32): 0x00000000
(51) ar50 (/32): 0x00000000
(52) ar51 (/32): 0x00000000
(53) ar52 (/32): 0x00000000
(54) ar53 (/32): 0x00000000
(55) ar54 (/32): 0x00000000
(56) ar55 (/32): 0x00000000
(57) ar56 (/32): 0x00000000
(58) ar57 (/32): 0x00000000
(59) ar58 (/32): 0x00000000
(60) ar59 (/32): 0x00000000
(61) ar60 (/32): 0x00000000
(62) ar61 (/32): 0x00000000
(63) ar62 (/32): 0x00000000
(64) ar63 (/32): 0x00000000
(65) lbeg (/32): 0x00000000
(66) lend (/32): 0x00000000
(67) lcount (/32): 0x00000000
(68) sar (/32): 0x00000000
(69) windowbase (/32): 0x00000000
(70) windowstart (/32): 0x00000001
(71) configid0 (/32): 0x40000400
(72) configid1 (/32): 0x1CC5FE96
(73) ps (/32): 0x0000001F
(74) threadptr (/32): 0x00000000
(75) br (/32): 0x00000000
(76) scompare1 (/32): 0x00000000
(77) acclo (/32): 0x00000000
(78) acchi (/32): 0x00000000
(79) m0 (/32): 0x00000000
(80) m1 (/32): 0x00000000
(81) m2 (/32): 0x00000000
(82) m3 (/32): 0x00000000
(83) f0 (/32): 0x00000000
(84) f1 (/32): 0x00000000
(85) f2 (/32): 0x00000000
(86) f3 (/32): 0x00000000
(87) f4 (/32): 0x00000000
(88) f5 (/32): 0x00000000
(89) f6 (/32): 0x00000000
(90) f7 (/32): 0x00000000
(91) f8 (/32): 0x00000000
(92) f9 (/32): 0x00000000
(93) f10 (/32): 0x00000000
(94) f11 (/32): 0x00000000
(95) f12 (/32): 0x00000000
(96) f13 (/32): 0x00000000
(97) f14 (/32): 0x00000000
(98) f15 (/32): 0x00000000
(99) fcr (/32): 0x00000000
(100) fsr (/32): 0x00000000
(101) mmid (/32)
(102) ibreakenable (/32): 0x00000000
(103) memctl (/32): 0x00000000
(104) atomctl (/32): 0x00000028
(105) ibreaka0 (/32): 0x00000000
(106) ibreaka1 (/32): 0x00000000
(107) dbreaka0 (/32): 0x00000000
(108) dbreaka1 (/32): 0x00000000
(109) dbreakc0 (/32): 0x00000000
(110) dbreakc1 (/32): 0x00000000
(111) epc1 (/32): 0x00000000
(112) epc2 (/32): 0x00000000
(113) epc3 (/32): 0x00000000
(114) epc4 (/32): 0x00000000
(115) epc5 (/32): 0x00000000
(116) epc6 (/32): 0x40000400
(117) epc7 (/32): 0x00000000
(118) depc (/32): 0x00000000
(119) eps2 (/32): 0x00000000
(120) eps3 (/32): 0x00000000
(121) eps4 (/32): 0x00000000
(122) eps5 (/32): 0x00000000
(123) eps6 (/32): 0x0000001F
(124) eps7 (/32): 0x00000000
(125) excsave1 (/32): 0x00000000
(126) excsave2 (/32): 0x00000000
(127) excsave3 (/32): 0x00000000
(128) excsave4 (/32): 0x00000000
(129) excsave5 (/32): 0x00000000
(130) excsave6 (/32): 0x00000000
(131) excsave7 (/32): 0x00000000
(132) cpenable (/32): 0x000000FF
(133) interrupt (/32): 0x00018040
(134) intset (/32)
(135) intclear (/32)
(136) intenable (/32): 0x00000000
(137) vecbase (/32): 0x40000000
(138) exccause (/32): 0x00000000
(139) debugcause (/32): 0x00000020
(140) ccount (/32): 0x00000004
(141) prid (/32): 0x0000CDCD
(142) icount (/32): 0x00000000
(143) icountlevel (/32): 0x00000000
(144) excvaddr (/32): 0x00000000
(145) ccompare0 (/32): 0x00000000
(146) ccompare1 (/32): 0x00000000
(147) ccompare2 (/32): 0x00000000
(148) misc0 (/32): 0x00000000
(149) misc1 (/32): 0x00000000
(150) misc2 (/32): 0x00000000
(151) misc3 (/32): 0x00000000
(163) a0 (/32): 0x00000000
(164) a1 (/32): 0x00000000
(165) a2 (/32): 0x00000000
(166) a3 (/32): 0x00000000 (dirty)
(167) a4 (/32): 0x00000000
(168) a5 (/32): 0x00000000
(169) a6 (/32): 0x00000000
(170) a7 (/32): 0x00000000
(171) a8 (/32): 0x00000000
(172) a9 (/32): 0x00000000
(173) a10 (/32): 0x00000000
(174) a11 (/32): 0x00000000
(175) a12 (/32): 0x00000000
(176) a13 (/32): 0x00000000
(177) a14 (/32): 0x00000000
(178) a15 (/32): 0x00000000
(179) pwrctl (/32)
(180) pwrstat (/32)
(181) eristat (/32)
(182) cs_itctrl (/32)
(183) cs_claimset (/32)
(184) cs_claimclr (/32)
(185) cs_lockaccess (/32)
(186) cs_lockstatus (/32)
(187) cs_authstatus (/32)
(188) fault_info (/32)
(189) trax_id (/32)
(190) trax_ctrl (/32)
(191) trax_stat (/32)
(192) trax_data (/32)
(193) trax_addr (/32)
(194) trax_pctrigger (/32)
(195) trax_pcmatch (/32)
(196) trax_delay (/32)
(197) trax_memstart (/32)
(198) trax_memend (/32)
(199) pmg (/32)
(200) pmoc (/32)
(201) pm0 (/32)
(202) pm1 (/32)
(203) pmctrl0 (/32)
(204) pmctrl1 (/32)
(205) pmstat0 (/32)
(206) pmstat1 (/32)
(207) ocd_id (/32)
(208) ocd_dcrclr (/32)
(209) ocd_dcrset (/32)
(210) ocd_dsr (/32)
(211) ddr (/32)
(212) expstate (/32): 0x00000000
(213) f64r_lo (/32): 0x00000000
(214) f64r_hi (/32): 0x00000000
(215) f64s (/32): 0x00000000

Info : esp32.cpu0: Target halted, PC=0x400D7163, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x400D7187, debug_reason=00000001

Code: Select all

//=======================Terminal==========================
rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, 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:7388
ho 0 tail 12 room 4
load:0x40078000,len:14508
load:0x40080400,len:4476
0x40080400: _init at ??:?

entry 0x400806d4
I (29) boot: ESP-IDF v4.3 2nd stage bootloader
I (29) boot: compile time 14:31:53
I (29) boot: chip revision: 3
I (32) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (39) boot.esp32: SPI Speed      : 40MHz
I (44) boot.esp32: SPI Mode       : DIO
I (48) boot.esp32: SPI Flash Size : 2MB
I (53) boot: Enabling RNG early entropy source...
I (58) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (84) boot:  2 factory          factory app      00 00 00010000 00100000
I (92) boot: End of partition table
I (96) boot_comm: chip revision: 3, min. application chip revision: 0
I (103) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=08218h ( 33304)
 map
I (124) esp_image: segment 1: paddr=00018240 vaddr=3ffb0000 size=0219ch (  8604)
 load
I (128) esp_image: segment 2: paddr=0001a3e4 vaddr=40080000 size=05c34h ( 23604)
 load
I (141) esp_image: segment 3: paddr=00020020 vaddr=400d0020 size=17260h ( 94816)
 map
I (177) esp_image: segment 4: paddr=00037288 vaddr=40085c34 size=05c10h ( 23568)
 load
I (187) esp_image: segment 5: paddr=0003cea0 vaddr=50000000 size=00010h (    16)
 load
I (193) boot: Loaded app from partition at offset 0x10000
I (194) boot: Disabling RNG early entropy source...
I (207) cpu_start: Pro cpu up.
I (207) cpu_start: Single core mode
I (216) cpu_start: Pro cpu start user code
I (216) cpu_start: cpu freq: 160000000
I (216) cpu_start: Application information:
I (220) cpu_start: Project name:     main
I (225) cpu_start: App version:      1
I (230) cpu_start: Compile time:     Dec 17 2021 16:12:33
I (236) cpu_start: ELF file SHA256:  2583e606002822cf...
I (242) cpu_start: ESP-IDF:          v4.3
I (247) heap_init: Initializing. RAM available for dynamic allocation:
I (254) heap_init: At 3FF80000 len 00002000 (8 KiB): RTCRAM
I (260) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (266) heap_init: At 3FFB3E60 len 0002C1A0 (176 KiB): DRAM
I (272) heap_init: At 3FFE0440 len 0001FBC0 (126 KiB): D/IRAM
I (279) heap_init: At 40078000 len 00008000 (32 KiB): IRAM
I (285) heap_init: At 4008B844 len 000147BC (81 KiB): IRAM
I (292) spi_flash: detected chip: generic
I (296) spi_flash: flash io: dio
W (300) spi_flash: Detected size(4096k) larger than the size in the binary image
 header(2048k). Using the size in the binary image header.
I (313) cpu_start: Starting scheduler on PRO CPU.
I (319) gpio: GPIO[33]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldo
wn: 0| Intr:0
I (319) gpio: GPIO[5]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldow
n: 0| Intr:0
I (319) gpio: GPIO[9]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldow
n: 0| Intr:0
I (329) gpio: GPIO[10]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldo
wn: 0| Intr:0
I (339) gpio: GPIO[18]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldo
wn: 0| Intr:0
I (349) gpio: GPIO[19]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldo
wn: 0| Intr:0
I (359) gpio: GPIO[23]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldo
wn: 0| Intr:0
I (369) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup:

Who is online

Users browsing this forum: No registered users and 99 guests