ESP32-WROVER-KIT Eclipse JTAG programming

nickhaman
Posts: 6
Joined: Sat Mar 09, 2019 10:57 pm

ESP32-WROVER-KIT Eclipse JTAG programming

Postby nickhaman » 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:

  1. nick@Alienware MINGW32 ~
  2. $ openocd -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover.cfg
  3. Open On-Chip Debugger 0.10.0-dev (2019-02-12-02:52)
  4. Licensed under GNU GPL v2
  5. For bug reports, read
  6.         http://openocd.org/doc/doxygen/bugs.html
  7. none separate
  8. adapter speed: 20000 kHz
  9. Info : Configured 1 cores
  10. esp32 interrupt mask on
  11. Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
  12. Info : clock speed 20000 kHz
  13. Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
  14. Info : JTAG tap: auto0.tap tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
  15. Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 5 -expected-id 0x120034e5"
  16. Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
  17. Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
  18. cpu0: Current bits set: BreakIn BreakOut RunStallIn
  19. Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
  20. Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
  21. Info : accepting 'gdb' connection on tcp/3333
  22. Info : Target halted. PRO_CPU: PC=0x40006875
  23. Info : Target halted. PRO_CPU: PC=0x4009171A
  24. Info : Flash mapping 0: 0x10020 -> 0x3f400020, 29 KB
  25. Info : Flash mapping 1: 0x20018 -> 0x400d0018, 73 KB
  26. Info : Target halted. PRO_CPU: PC=0x4009171A
  27. Info : Auto-detected flash size 4096 KB
  28. Info : Using flash size 4096 KB
  29. Info : Target halted. PRO_CPU: PC=0x4009171A
  30. Info : Flash mapping 0: 0x10020 -> 0x3f400020, 29 KB
  31. Info : Flash mapping 1: 0x20018 -> 0x400d0018, 73 KB
  32. Info : Using flash size 76 KB
  33. Info : Target halted. PRO_CPU: PC=0x4009171A
  34. Info : Flash mapping 0: 0x10020 -> 0x3f400020, 29 KB
  35. Info : Flash mapping 1: 0x20018 -> 0x400d0018, 73 KB
  36. Info : Using flash size 32 KB
  37. Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
  38. Info : JTAG tap: auto0.tap tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
  39. cpu0: Current bits set: BreakIn BreakOut RunStallIn
  40. Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
  41. Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
  42. Info : Target halted. PRO_CPU: PC=0x5000004B
  43. Info : esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
  44. Info : Target halted. PRO_CPU: PC=0x40000400
  45. Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
  46. Info : JTAG tap: auto0.tap tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
  47. cpu0: Current bits set: BreakIn BreakOut RunStallIn
  48. Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
  49. Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
  50. Info : Target halted. PRO_CPU: PC=0x5000004B
  51. Info : esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
  52. Info : Target halted. PRO_CPU: PC=0x40000400
  53. ** Programming Started **
  54. auto erase enabled
  55. Warn : no flash bank found for address 3f40ff40
  56. Warn : no flash bank found for address 3ffc0000
  57. Warn : no flash bank found for address 40090000
  58. Warn : no flash bank found for address 40090400
  59. Warn : Adding extra erase range, 0x00010000 to 0x00010017
  60. Info : Target halted. PRO_CPU: PC=0x4009171A
  61. Info : Target halted. PRO_CPU: PC=0x4009171A
  62. Warn : no flash bank found for address 400e3000
  63. wrote 12264 bytes from file d:/work/dropbox/projects/sandclockfirmware/build/sandclock.elf in 0.817655s (14.647 KiB/s)
  64. ** Programming Finished **
  65. ** Verify Started **
  66. Info : Target halted. PRO_CPU: PC=0x4009171A
  67. 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)
  68. contents differ
  69. diff 0 address 0x00010000. Was 0xe9 instead of 0x7f
  70. diff 1 address 0x00010001. Was 0x06 instead of 0x45
  71. diff 2 address 0x00010002. Was 0x02 instead of 0x4c
  72. diff 3 address 0x00010003. Was 0x10 instead of 0x46
  73. diff 4 address 0x00010004. Was 0xac instead of 0x01
  74. diff 5 address 0x00010005. Was 0x0e instead of 0x01
  75. diff 6 address 0x00010006. Was 0x08 instead of 0x01
  76. diff 7 address 0x00010007. Was 0x40 instead of 0x00
  77. diff 8 address 0x00010008. Was 0xee instead of 0x00
  78. diff 9 address 0x00010010. Was 0x00 instead of 0x02
  79. diff 10 address 0x00010012. Was 0x00 instead of 0x5e
  80. diff 11 address 0x00010014. Was 0x00 instead of 0x01
  81. diff 12 address 0x00010017. Was 0x01 instead of 0x00
  82. diff 13 address 0x00010018. Was 0x20 instead of 0xac
  83. diff 14 address 0x00010019. Was 0x00 instead of 0x0e
  84. diff 15 address 0x0001001a. Was 0x40 instead of 0x08
  85. diff 16 address 0x0001001b. Was 0x3f instead of 0x40
  86. diff 17 address 0x0001001c. Was 0x3c instead of 0x34
  87. diff 18 address 0x0001001d. Was 0x77 instead of 0x00
  88. diff 19 address 0x00010020. Was 0x32 instead of 0x5c
  89. diff 20 address 0x00010021. Was 0x54 instead of 0xa9
  90. diff 21 address 0x00010022. Was 0xcd instead of 0x14
  91. diff 22 address 0x00010023. Was 0xab instead of 0x00
  92. diff 23 address 0x00010025. Was 0x00 instead of 0x03
  93. diff 24 address 0x00010028. Was 0x00 instead of 0x34
  94. diff 25 address 0x0001002a. Was 0x00 instead of 0x20
  95. diff 26 address 0x0001002c. Was 0x00 instead of 0x05
  96. diff 27 address 0x0001002e. Was 0x00 instead of 0x28
  97. diff 28 address 0x00010030. Was 0x31 instead of 0x1a
  98. diff 29 address 0x00010032. Was 0x00 instead of 0x17
  99. diff 30 address 0x00010034. Was 0x00 instead of 0x01
  100. diff 31 address 0x0001003c. Was 0x00 instead of 0x40
  101. diff 32 address 0x0001003d. Was 0x00 instead of 0xff
  102. diff 33 address 0x0001003e. Was 0x00 instead of 0x3f
  103. diff 34 address 0x0001003f. Was 0x00 instead of 0x3f
  104. diff 35 address 0x00010040. Was 0x00 instead of 0x40
  105. diff 36 address 0x00010041. Was 0x00 instead of 0xff
  106. diff 37 address 0x00010042. Was 0x00 instead of 0x3f
  107. diff 38 address 0x00010043. Was 0x00 instead of 0x3f
  108. diff 39 address 0x00010044. Was 0x00 instead of 0x1c
  109. diff 40 address 0x00010045. Was 0x00 instead of 0x78
  110. diff 41 address 0x00010048. Was 0x00 instead of 0x1c
  111. diff 42 address 0x00010049. Was 0x00 instead of 0x78
  112. diff 43 address 0x0001004c. Was 0x00 instead of 0x06
  113. diff 44 address 0x00010050. Was 0x53 instead of 0x01
  114. diff 45 address 0x00010051. Was 0x61 instead of 0x00
  115. diff 46 address 0x00010052. Was 0x6e instead of 0x00
  116. diff 47 address 0x00010053. Was 0x64 instead of 0x00
  117. diff 48 address 0x00010054. Was 0x43 instead of 0x01
  118. diff 49 address 0x00010055. Was 0x6c instead of 0x00
  119. diff 50 address 0x00010056. Was 0x6f instead of 0x00
  120. diff 51 address 0x00010057. Was 0x63 instead of 0x00
  121. diff 52 address 0x00010058. Was 0x6b instead of 0x20
  122. diff 53 address 0x00010059. Was 0x00 instead of 0x78
  123. diff 54 address 0x0001005e. Was 0x00 instead of 0xfb
  124. diff 55 address 0x0001005f. Was 0x00 instead of 0x3f
  125. diff 56 address 0x00010062. Was 0x00 instead of 0xfb
  126. diff 57 address 0x00010063. Was 0x00 instead of 0x3f
  127. diff 58 address 0x00010064. Was 0x00 instead of 0xa8
  128. diff 59 address 0x00010065. Was 0x00 instead of 0x1e
  129. diff 60 address 0x00010068. Was 0x00 instead of 0xe8
  130. diff 61 address 0x00010069. Was 0x00 instead of 0x2e
  131. diff 62 address 0x0001006c. Was 0x00 instead of 0x06
  132. diff 63 address 0x00010070. Was 0x31 instead of 0x01
  133. diff 64 address 0x00010071. Was 0x33 instead of 0x00
  134. diff 65 address 0x00010072. Was 0x3a instead of 0x00
  135. diff 66 address 0x00010073. Was 0x30 instead of 0x00
  136. diff 67 address 0x00010074. Was 0x31 instead of 0x01
  137. diff 68 address 0x00010075. Was 0x3a instead of 0x00
  138. diff 69 address 0x00010076. Was 0x32 instead of 0x00
  139. diff 70 address 0x00010077. Was 0x39 instead of 0x00
  140. diff 71 address 0x00010078. Was 0x00 instead of 0xc8
  141. diff 72 address 0x00010079. Was 0x00 instead of 0x96
  142. diff 73 address 0x0001007e. Was 0x00 instead of 0x08
  143. diff 74 address 0x0001007f. Was 0x00 instead of 0x40
  144. diff 75 address 0x00010080. Was 0x4d instead of 0x00
  145. diff 76 address 0x00010081. Was 0x61 instead of 0x00
  146. diff 77 address 0x00010082. Was 0x72 instead of 0x08
  147. diff 78 address 0x00010083. Was 0x20 instead of 0x40
  148. diff 79 address 0x00010084. Was 0x20 instead of 0x00
  149. diff 80 address 0x00010085. Was 0x39 instead of 0x04
  150. diff 81 address 0x00010086. Was 0x20 instead of 0x00
  151. diff 82 address 0x00010087. Was 0x32 instead of 0x00
  152. diff 83 address 0x00010088. Was 0x30 instead of 0x00
  153. diff 84 address 0x00010089. Was 0x31 instead of 0x04
  154. diff 85 address 0x0001008a. Was 0x39 instead of 0x00
  155. diff 86 address 0x0001008c. Was 0x00 instead of 0x05
  156. diff 87 address 0x00010090. Was 0x76 instead of 0x01
  157. diff 88 address 0x00010091. Was 0x33 instead of 0x00
  158. diff 89 address 0x00010092. Was 0x2e instead of 0x00
  159. diff 90 address 0x00010093. Was 0x33 instead of 0x00
  160. diff 91 address 0x00010094. Was 0x2d instead of 0x01
  161. diff 92 address 0x00010095. Was 0x62 instead of 0x00
  162. diff 93 address 0x00010096. Was 0x65 instead of 0x00
  163. diff 94 address 0x00010097. Was 0x74 instead of 0x00
  164. diff 95 address 0x00010098. Was 0x61 instead of 0xc8
  165. diff 96 address 0x00010099. Was 0x32 instead of 0x9a
  166. diff 97 address 0x0001009a. Was 0x2d instead of 0x00
  167. diff 98 address 0x0001009b. Was 0x33 instead of 0x00
  168. diff 99 address 0x0001009c. Was 0x38 instead of 0x00
  169. diff 100 address 0x0001009d. Was 0x2d instead of 0x04
  170. diff 101 address 0x0001009e. Was 0x67 instead of 0x08
  171. diff 102 address 0x0001009f. Was 0x62 instead of 0x40
  172. diff 103 address 0x000100a0. Was 0x62 instead of 0x00
  173. diff 104 address 0x000100a1. Was 0x61 instead of 0x04
  174. diff 105 address 0x000100a2. Was 0x38 instead of 0x08
  175. diff 106 address 0x000100a3. Was 0x39 instead of 0x40
  176. diff 107 address 0x000100a4. Was 0x65 instead of 0x53
  177. diff 108 address 0x000100a5. Was 0x31 instead of 0x7c
  178. diff 109 address 0x000100a6. Was 0x35 instead of 0x00
  179. diff 110 address 0x000100a7. Was 0x31 instead of 0x00
  180. diff 111 address 0x000100a8. Was 0x00 instead of 0x53
  181. diff 112 address 0x000100a9. Was 0x00 instead of 0x7c
  182. diff 113 address 0x000100ac. Was 0x00 instead of 0x07
  183. diff 114 address 0x000100b0. Was 0xa5 instead of 0x01
  184. diff 115 address 0x000100b1. Was 0x6c instead of 0x00
  185. diff 116 address 0x000100b2. Was 0xbc instead of 0x00
  186. diff 117 address 0x000100b3. Was 0x04 instead of 0x00
  187. diff 118 address 0x000100b4. Was 0xd5 instead of 0x01
  188. diff 119 address 0x000100b5. Was 0x2e instead of 0x00
  189. diff 120 address 0x000100b6. Was 0x61 instead of 0x00
  190. diff 121 address 0x000100b7. Was 0x77 instead of 0x00
  191. diff 122 address 0x000100b8. Was 0x54 instead of 0x1c
  192. diff 123 address 0x000100b9. Was 0xea instead of 0x17
  193. diff 124 address 0x000100ba. Was 0x3b instead of 0x01
  194. diff 125 address 0x000100bb. Was 0x49 instead of 0x00
  195. diff 126 address 0x000100bc. Was 0x2e instead of 0x18
  196. diff 127 address 0x000100bd. Was 0x0b instead of 0x00
  197. More than 128 errors, the rest are not printed.
  198. embedded:startup.tcl:454: Error: ** Verify Failed **
  199. in procedure 'program_esp32'
  200. in procedure 'program_error' called at file "C:\Program Files\Espressif\ESP-IDF Tools\tools\share\openocd\scripts/target/esp32.cfg", line 144
  201. at file "embedded:startup.tcl", line 454
  202. Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
  203. Info : JTAG tap: auto0.tap tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
  204. cpu0: Current bits set: BreakIn BreakOut RunStallIn
  205. Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
  206. Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
  207. Info : Target halted. PRO_CPU: PC=0x5000004B
  208. Info : esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
  209. Info : Target halted. PRO_CPU: PC=0x40000400
  210. Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
  211. Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
  212. Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
  213. Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
  214.  

ESP_Alexey
Posts: 24
Joined: Fri Dec 02, 2016 8:55 pm

Re: ESP32-WROVER-KIT Eclipse JTAG programming

Postby ESP_Alexey » Sun Mar 10, 2019 9:13 am

wrote 12264 bytes from file d:/work/dropbox/projects/sandclockfirmware/build/sandclock.elf in 0.817655s (14.647 KiB/s)
You need yo use binary image instead of ELF file for programing. See note in step 8 here

nickhaman
Posts: 6
Joined: Sat Mar 09, 2019 10:57 pm

Re: ESP32-WROVER-KIT Eclipse JTAG programming

Postby nickhaman » Thu Apr 18, 2019 10:11 pm

That did the trick, thank you!

Atul_90
Posts: 9
Joined: Sun Jul 14, 2019 3:33 pm

Re: ESP32-WROVER-KIT Eclipse JTAG programming

Postby Atul_90 » Sun Aug 18, 2019 9:09 pm

I am uing wrover kit with JTAG inerface ,as mentiond in step 8 in using debugugger page need to add program_esp32 in textbox,
i am adding same line $(workspace_loc:blink/build/blink.bin) 0x10000 verify
but it is failing to program as well as it says sometimes cannot find workspace_loc user defined command.

where do i need to define the path for workspace_loc or what needs to be done so that it will get programmed and i will able to debug it..?

Regards
Atul

Who is online

Users browsing this forum: No registered users and 65 guests