Openocd update issue

OllieK
Posts: 56
Joined: Mon Jan 18, 2016 8:08 am
Location: USA, PA
Contact:

Openocd update issue

Postby OllieK » Sat Feb 13, 2021 4:44 am

I have ESP-IDF v4.2 installed in Windows 10 for Visual Studio Code. Without an obvious reason, I started to get error messages that the openocd version was wrong. The installed version was v0.10.0-esp32-20200709 and I did try to upgrade it to openocd-esp32-win32-0.10.0-esp32-20201202.

It didn't work at all and the VSC became useless for ESP32 development. I did try the normal things, such as deleting .expressif and esp/esp-idf folders and reinstalling everything. This didn't help. Now, when I am trying to build a project, I am getting a useless error message

Something went wrong while trying to build the project

After that, I did use the esp-idf-tools-setup-2.3.exe application to get v4.2 tools installed independently of VSC. Now ESP-IDF works at command line for build, flash, and monitor, but VSC doesn't work at all.

Question1: How the VSC and Expressif IDF Extension can be reset to initial state to complete a fresh install?

Question2: How the openocd-esp32-win32-0.10.0-esp32-20201202 should be installed? The esp-idf-tools-setup-2.3 is still installing v0.10.0-esp32-20200709 for v4.2

Still happy for Espressif Hardware and ESP-IDF bits, but not happy how they are (not) working in VSC and Eclipse.

OllieK
Posts: 56
Joined: Mon Jan 18, 2016 8:08 am
Location: USA, PA
Contact:

Re: Openocd update issue

Postby OllieK » Sun Feb 14, 2021 3:12 am

It seems that the ESP32 debugging is not a common thing. That could be a reason, why there are no answers for my questions. I just need to wait longer.

One additional observations is an additional error message

Code: Select all

[2/13/2021, 10:05:51 PM] Unable to resolve configuration with compilerPath "C:\Users\Olavi\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gdb.exe".  Using "cl.exe" instead.
This is shown in Output when starting vsCode. It is perhaps harmless because I have seen it for long time and still been able to use hardware debugger.

OllieK
Posts: 56
Joined: Mon Jan 18, 2016 8:08 am
Location: USA, PA
Contact:

Re: Openocd update issue

Postby OllieK » Sun Feb 14, 2021 4:27 am

It is sad that there are no answers from the other users for this issue.

I did use the following steps which are prone to errors and mistakes to solve this problem

1. Go to https://github.com/espressif/openocd-esp32/releases

2. Download openocd-esp32-win32-0.10.0-esp32-20201202.zip
- or something similar to match your platform and preferences

3. Extract the zip file into a folder

4. Change the folder name from openocd-esp32-win32-0.10.0-esp32-20201202
to v0.10.0-esp32-20201202

5. Move the folder into C:\Users\Olavi\.espressif\tools\openocd-esp32 where the existing
v0.10.0-esp32-20200709 folder is already located
- or something similar in your system

6. In vsCode, select F1 (or CTRL-SHIFT-P), enter Preferences: Open Settings (JSON)

7. This will open C:\Users\Olavi\AppData\Roaming\Code\User\settings.json file

8. Modify two lines
- on the line "idf.customExtraPaths": change v0.10.0-esp32-20200709 to v0.10.0-esp32-20201202
- on the line "idf.customExtraVars": change v0.10.0-esp32-20200709 to v0.10.0-esp32-20201202

9. Save the settings.json file

In practice, all these steps should be done with the IDF tools without user involvement.

ESP_bignacio
Posts: 68
Joined: Wed May 02, 2018 12:12 pm

Re: Openocd update issue

Postby ESP_bignacio » Mon Feb 22, 2021 6:48 am

HI @OllieK we had replied to this question in the extension GitHub repository:

https://github.com/espressif/vscode-esp ... -758372220

The thing is, each ESP-IDF release version has a set of tools version defined in $IDF_PATH/tools.json which are thoroughly tested for that version. JTAG flash was added in OpenOCD later that v4.2 to allow Visual Studio Code extension for JTAG flashing (you could use UART flashing in any older version of openOCD).

Sorry for late reply, was on holidays those days.

OllieK
Posts: 56
Joined: Mon Jan 18, 2016 8:08 am
Location: USA, PA
Contact:

Re: Openocd update issue

Postby OllieK » Tue Feb 23, 2021 4:52 am

Thanks ESP_bignacio,

I did read the reply in Github, but I didn't get an answer for the essential question if in future releases there would be more automation.

It is tedious and error prone to do editing of the configuration files. All the installation and upgrade steps should have the required scripts to hide the low level details from the main stream users.

Cheers, Ollie

PS. I am detecting a trend how things are moving into right direction. :)

ESP_bignacio
Posts: 68
Joined: Wed May 02, 2018 12:12 pm

Re: Openocd update issue

Postby ESP_bignacio » Wed Mar 03, 2021 10:01 am

Yes @OllieK sorry about that, we have yet to automate many of these things but working on something to achieve, please stay tune on the GitHub repository for this and more features.

espdorian
Posts: 26
Joined: Sat Dec 26, 2020 10:57 am

Re: Openocd update issue

Postby espdorian » Thu Mar 04, 2021 6:19 pm

I have also updated my open OCD and edited the settings.json. I have done it about three times and each time (probably after restart VSCODE) the openocd name in settings.json is chanegd back to the previous value.

And yes, I saved it and even tried it with another editor. Why is my settings.json overwritten ?

Who is online

Users browsing this forum: No registered users and 3 guests