ESP32-WROVER-KIT Eclipse JTAG programming
Posted: Sat Mar 09, 2019 11:09 pm
I am having a problem programming and debugging the ESP32 over JTAG with Eclipse. When I try programming over JTAG, I get verify errors in openocd and debugging fails. If I program using the Build Target and the flash tool, programming succeeds and I can connect to openocd and debug normally. This would be fine (although inconvenient) for developing on the dev board, but the target hardware will only have JTAG.
Here is the openocd output:
Here is the openocd output:
- nick@Alienware MINGW32 ~
- $ openocd -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover.cfg
- Open On-Chip Debugger 0.10.0-dev (2019-02-12-02:52)
- Licensed under GNU GPL v2
- For bug reports, read
- http://openocd.org/doc/doxygen/bugs.html
- none separate
- adapter speed: 20000 kHz
- Info : Configured 1 cores
- esp32 interrupt mask on
- 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 : JTAG tap: auto0.tap tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
- Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 5 -expected-id 0x120034e5"
- Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
- Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
- cpu0: Current bits set: BreakIn BreakOut RunStallIn
- Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
- Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
- Info : accepting 'gdb' connection on tcp/3333
- Info : Target halted. PRO_CPU: PC=0x40006875
- Info : Target halted. PRO_CPU: PC=0x4009171A
- Info : Flash mapping 0: 0x10020 -> 0x3f400020, 29 KB
- Info : Flash mapping 1: 0x20018 -> 0x400d0018, 73 KB
- Info : Target halted. PRO_CPU: PC=0x4009171A
- Info : Auto-detected flash size 4096 KB
- Info : Using flash size 4096 KB
- Info : Target halted. PRO_CPU: PC=0x4009171A
- Info : Flash mapping 0: 0x10020 -> 0x3f400020, 29 KB
- Info : Flash mapping 1: 0x20018 -> 0x400d0018, 73 KB
- Info : Using flash size 76 KB
- Info : Target halted. PRO_CPU: PC=0x4009171A
- Info : Flash mapping 0: 0x10020 -> 0x3f400020, 29 KB
- Info : Flash mapping 1: 0x20018 -> 0x400d0018, 73 KB
- Info : Using flash size 32 KB
- Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
- Info : JTAG tap: auto0.tap tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
- cpu0: Current bits set: BreakIn BreakOut RunStallIn
- Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
- Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
- Info : Target halted. PRO_CPU: PC=0x5000004B
- Info : esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
- Info : Target halted. PRO_CPU: PC=0x40000400
- Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
- Info : JTAG tap: auto0.tap tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
- cpu0: Current bits set: BreakIn BreakOut RunStallIn
- Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
- Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
- Info : Target halted. PRO_CPU: PC=0x5000004B
- Info : esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
- Info : Target halted. PRO_CPU: PC=0x40000400
- ** Programming Started **
- auto erase enabled
- Warn : no flash bank found for address 3f40ff40
- Warn : no flash bank found for address 3ffc0000
- Warn : no flash bank found for address 40090000
- Warn : no flash bank found for address 40090400
- Warn : Adding extra erase range, 0x00010000 to 0x00010017
- Info : Target halted. PRO_CPU: PC=0x4009171A
- Info : Target halted. PRO_CPU: PC=0x4009171A
- Warn : no flash bank found for address 400e3000
- wrote 12264 bytes from file d:/work/dropbox/projects/sandclockfirmware/build/sandclock.elf in 0.817655s (14.647 KiB/s)
- ** Programming Finished **
- ** Verify Started **
- Info : Target halted. PRO_CPU: PC=0x4009171A
- read 1355116 bytes from file d:/work/dropbox/projects/sandclockfirmware/build/sandclock.elf and flash bank 0 at offset 0x00010000 in 5.191485s (254.909 KiB/s)
- contents differ
- diff 0 address 0x00010000. Was 0xe9 instead of 0x7f
- diff 1 address 0x00010001. Was 0x06 instead of 0x45
- diff 2 address 0x00010002. Was 0x02 instead of 0x4c
- diff 3 address 0x00010003. Was 0x10 instead of 0x46
- diff 4 address 0x00010004. Was 0xac instead of 0x01
- diff 5 address 0x00010005. Was 0x0e instead of 0x01
- diff 6 address 0x00010006. Was 0x08 instead of 0x01
- diff 7 address 0x00010007. Was 0x40 instead of 0x00
- diff 8 address 0x00010008. Was 0xee instead of 0x00
- diff 9 address 0x00010010. Was 0x00 instead of 0x02
- diff 10 address 0x00010012. Was 0x00 instead of 0x5e
- diff 11 address 0x00010014. Was 0x00 instead of 0x01
- diff 12 address 0x00010017. Was 0x01 instead of 0x00
- diff 13 address 0x00010018. Was 0x20 instead of 0xac
- diff 14 address 0x00010019. Was 0x00 instead of 0x0e
- diff 15 address 0x0001001a. Was 0x40 instead of 0x08
- diff 16 address 0x0001001b. Was 0x3f instead of 0x40
- diff 17 address 0x0001001c. Was 0x3c instead of 0x34
- diff 18 address 0x0001001d. Was 0x77 instead of 0x00
- diff 19 address 0x00010020. Was 0x32 instead of 0x5c
- diff 20 address 0x00010021. Was 0x54 instead of 0xa9
- diff 21 address 0x00010022. Was 0xcd instead of 0x14
- diff 22 address 0x00010023. Was 0xab instead of 0x00
- diff 23 address 0x00010025. Was 0x00 instead of 0x03
- diff 24 address 0x00010028. Was 0x00 instead of 0x34
- diff 25 address 0x0001002a. Was 0x00 instead of 0x20
- diff 26 address 0x0001002c. Was 0x00 instead of 0x05
- diff 27 address 0x0001002e. Was 0x00 instead of 0x28
- diff 28 address 0x00010030. Was 0x31 instead of 0x1a
- diff 29 address 0x00010032. Was 0x00 instead of 0x17
- diff 30 address 0x00010034. Was 0x00 instead of 0x01
- diff 31 address 0x0001003c. Was 0x00 instead of 0x40
- diff 32 address 0x0001003d. Was 0x00 instead of 0xff
- diff 33 address 0x0001003e. Was 0x00 instead of 0x3f
- diff 34 address 0x0001003f. Was 0x00 instead of 0x3f
- diff 35 address 0x00010040. Was 0x00 instead of 0x40
- diff 36 address 0x00010041. Was 0x00 instead of 0xff
- diff 37 address 0x00010042. Was 0x00 instead of 0x3f
- diff 38 address 0x00010043. Was 0x00 instead of 0x3f
- diff 39 address 0x00010044. Was 0x00 instead of 0x1c
- diff 40 address 0x00010045. Was 0x00 instead of 0x78
- diff 41 address 0x00010048. Was 0x00 instead of 0x1c
- diff 42 address 0x00010049. Was 0x00 instead of 0x78
- diff 43 address 0x0001004c. Was 0x00 instead of 0x06
- diff 44 address 0x00010050. Was 0x53 instead of 0x01
- diff 45 address 0x00010051. Was 0x61 instead of 0x00
- diff 46 address 0x00010052. Was 0x6e instead of 0x00
- diff 47 address 0x00010053. Was 0x64 instead of 0x00
- diff 48 address 0x00010054. Was 0x43 instead of 0x01
- diff 49 address 0x00010055. Was 0x6c instead of 0x00
- diff 50 address 0x00010056. Was 0x6f instead of 0x00
- diff 51 address 0x00010057. Was 0x63 instead of 0x00
- diff 52 address 0x00010058. Was 0x6b instead of 0x20
- diff 53 address 0x00010059. Was 0x00 instead of 0x78
- diff 54 address 0x0001005e. Was 0x00 instead of 0xfb
- diff 55 address 0x0001005f. Was 0x00 instead of 0x3f
- diff 56 address 0x00010062. Was 0x00 instead of 0xfb
- diff 57 address 0x00010063. Was 0x00 instead of 0x3f
- diff 58 address 0x00010064. Was 0x00 instead of 0xa8
- diff 59 address 0x00010065. Was 0x00 instead of 0x1e
- diff 60 address 0x00010068. Was 0x00 instead of 0xe8
- diff 61 address 0x00010069. Was 0x00 instead of 0x2e
- diff 62 address 0x0001006c. Was 0x00 instead of 0x06
- diff 63 address 0x00010070. Was 0x31 instead of 0x01
- diff 64 address 0x00010071. Was 0x33 instead of 0x00
- diff 65 address 0x00010072. Was 0x3a instead of 0x00
- diff 66 address 0x00010073. Was 0x30 instead of 0x00
- diff 67 address 0x00010074. Was 0x31 instead of 0x01
- diff 68 address 0x00010075. Was 0x3a instead of 0x00
- diff 69 address 0x00010076. Was 0x32 instead of 0x00
- diff 70 address 0x00010077. Was 0x39 instead of 0x00
- diff 71 address 0x00010078. Was 0x00 instead of 0xc8
- diff 72 address 0x00010079. Was 0x00 instead of 0x96
- diff 73 address 0x0001007e. Was 0x00 instead of 0x08
- diff 74 address 0x0001007f. Was 0x00 instead of 0x40
- diff 75 address 0x00010080. Was 0x4d instead of 0x00
- diff 76 address 0x00010081. Was 0x61 instead of 0x00
- diff 77 address 0x00010082. Was 0x72 instead of 0x08
- diff 78 address 0x00010083. Was 0x20 instead of 0x40
- diff 79 address 0x00010084. Was 0x20 instead of 0x00
- diff 80 address 0x00010085. Was 0x39 instead of 0x04
- diff 81 address 0x00010086. Was 0x20 instead of 0x00
- diff 82 address 0x00010087. Was 0x32 instead of 0x00
- diff 83 address 0x00010088. Was 0x30 instead of 0x00
- diff 84 address 0x00010089. Was 0x31 instead of 0x04
- diff 85 address 0x0001008a. Was 0x39 instead of 0x00
- diff 86 address 0x0001008c. Was 0x00 instead of 0x05
- diff 87 address 0x00010090. Was 0x76 instead of 0x01
- diff 88 address 0x00010091. Was 0x33 instead of 0x00
- diff 89 address 0x00010092. Was 0x2e instead of 0x00
- diff 90 address 0x00010093. Was 0x33 instead of 0x00
- diff 91 address 0x00010094. Was 0x2d instead of 0x01
- diff 92 address 0x00010095. Was 0x62 instead of 0x00
- diff 93 address 0x00010096. Was 0x65 instead of 0x00
- diff 94 address 0x00010097. Was 0x74 instead of 0x00
- diff 95 address 0x00010098. Was 0x61 instead of 0xc8
- diff 96 address 0x00010099. Was 0x32 instead of 0x9a
- diff 97 address 0x0001009a. Was 0x2d instead of 0x00
- diff 98 address 0x0001009b. Was 0x33 instead of 0x00
- diff 99 address 0x0001009c. Was 0x38 instead of 0x00
- diff 100 address 0x0001009d. Was 0x2d instead of 0x04
- diff 101 address 0x0001009e. Was 0x67 instead of 0x08
- diff 102 address 0x0001009f. Was 0x62 instead of 0x40
- diff 103 address 0x000100a0. Was 0x62 instead of 0x00
- diff 104 address 0x000100a1. Was 0x61 instead of 0x04
- diff 105 address 0x000100a2. Was 0x38 instead of 0x08
- diff 106 address 0x000100a3. Was 0x39 instead of 0x40
- diff 107 address 0x000100a4. Was 0x65 instead of 0x53
- diff 108 address 0x000100a5. Was 0x31 instead of 0x7c
- diff 109 address 0x000100a6. Was 0x35 instead of 0x00
- diff 110 address 0x000100a7. Was 0x31 instead of 0x00
- diff 111 address 0x000100a8. Was 0x00 instead of 0x53
- diff 112 address 0x000100a9. Was 0x00 instead of 0x7c
- diff 113 address 0x000100ac. Was 0x00 instead of 0x07
- diff 114 address 0x000100b0. Was 0xa5 instead of 0x01
- diff 115 address 0x000100b1. Was 0x6c instead of 0x00
- diff 116 address 0x000100b2. Was 0xbc instead of 0x00
- diff 117 address 0x000100b3. Was 0x04 instead of 0x00
- diff 118 address 0x000100b4. Was 0xd5 instead of 0x01
- diff 119 address 0x000100b5. Was 0x2e instead of 0x00
- diff 120 address 0x000100b6. Was 0x61 instead of 0x00
- diff 121 address 0x000100b7. Was 0x77 instead of 0x00
- diff 122 address 0x000100b8. Was 0x54 instead of 0x1c
- diff 123 address 0x000100b9. Was 0xea instead of 0x17
- diff 124 address 0x000100ba. Was 0x3b instead of 0x01
- diff 125 address 0x000100bb. Was 0x49 instead of 0x00
- diff 126 address 0x000100bc. Was 0x2e instead of 0x18
- diff 127 address 0x000100bd. Was 0x0b instead of 0x00
- More than 128 errors, the rest are not printed.
- embedded:startup.tcl:454: Error: ** Verify Failed **
- in procedure 'program_esp32'
- in procedure 'program_error' called at file "C:\Program Files\Espressif\ESP-IDF Tools\tools\share\openocd\scripts/target/esp32.cfg", line 144
- at file "embedded:startup.tcl", line 454
- Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
- Info : JTAG tap: auto0.tap tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
- cpu0: Current bits set: BreakIn BreakOut RunStallIn
- Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
- Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
- Info : Target halted. PRO_CPU: PC=0x5000004B
- Info : esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
- Info : Target halted. PRO_CPU: PC=0x40000400
- Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
- Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
- Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
- Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).