Page 1 of 1

How can I install the new version of openocd in the ESP-idf?

Posted: Mon Jan 18, 2021 3:05 pm
by BergLoewe
Hello,


Maybe anyone can help.

The VSCode brings on flash the Error
Minimum OpenOCD version v0.10.0-esp32-20201125 is required while you have v0.10.0-esp32-20191114 version installed
.

How can I install the new version of openocd in the ESP-idf?

Re: How can I install the new version of openocd in the ESP-idf?

Posted: Thu Jan 21, 2021 9:00 am
by ESP_bignacio
The thing is, some changes were implemented on openOCD to allow Visual Studio Code to perform JTAG flashing from this version.

If you want to replace openOCD, just get one of the latest openOCD releases and replace

Code: Select all

c:\\esp\\tools\\.espressif\\tools\\openocd-esp32\\v0.10.0-esp32-20200709\\openocd-esp32\\bin
in your idf.customExtraPaths for the bin directory of your chosen release version, for example

Code: Select all

c:\\esp\\tools\\.espressif\\tools\\openocd-esp32\\v0.10.0-esp32-20201202\\openocd-esp32\\bin
if you extract this version on your $HOME/.espressif/tools directory.
Also update idf.customExtraVars OPENOCD_SCRIPTS to new OpenOCD Scripts folder path.

Re: How can I install the new version of openocd in the ESP-idf?

Posted: Thu Jan 21, 2021 3:36 pm
by ehagerty
ESP_bignacio wrote:
Thu Jan 21, 2021 9:00 am
The thing is, some changes were implemented on openOCD to allow Visual Studio Code to perform JTAG flashing from this version.

If you want to replace openOCD, just get one of the latest openOCD releases and replace

Code: Select all

c:\\esp\\tools\\.espressif\\tools\\openocd-esp32\\v0.10.0-esp32-20200709\\openocd-esp32\\bin
in your idf.customExtraPaths for the bin directory of your chosen release version, for example

Code: Select all

c:\\esp\\tools\\.espressif\\tools\\openocd-esp32\\v0.10.0-esp32-20201202\\openocd-esp32\\bin
if you extract this version on your $HOME/.espressif/tools directory.
Also update idf.customExtraVars OPENOCD_SCRIPTS to new OpenOCD Scripts folder path.
@ESP_bignacio you are awesome, this worked when tweaked for a mac too, thank you!

Re: How can I install the new version of openocd in the ESP-idf?

Posted: Tue Jan 26, 2021 8:35 pm
by ihouses
Sorry for probably dumb question, but:

Where can I find the files where I can modify the required paths:?
idf.customExtraPaths
idf.customExtraVars

Re: How can I install the new version of openocd in the ESP-idf?

Posted: Sat Jan 30, 2021 11:02 pm
by ihouses
The required changes are in settings.json

You can access to settings.json by pressing control+shift+P and typing: preferences: open settings (JSON).
There you can find idf.customExtraPaths and the other things.

Thanks to me! :!

Re: How can I install the new version of openocd in the ESP-idf?

Posted: Fri Mar 05, 2021 12:15 pm
by Souhail
Hi,

I want to flash my ESP32 with the JTAG. Could you tell me how exactly do I update the openOCD in the .espressif folder?

I tried re-installing esp-idf but I'm always getting the same openOCD version (v0.10.0-esp32-20191114).

Thank you,
Souhail

Re: How can I install the new version of openocd in the ESP-idf?

Posted: Fri Mar 05, 2021 1:12 pm
by Souhail
Hi,

I got an error indicating that "program_esp_bins" was not recognized so I thought I wasn't updating the openOCD tool correctly but I just had to start the openOCD server before flashing.. (thought it would start automatically)

Now flashing is successful with JTAG but the ESP32 doesn't seem to be running the program..
When I flash it with UART everything works fine, program running.

Any idea why?

Thanks for your help,
Souhail

Re: How can I install the new version of openocd in the ESP-idf?

Posted: Mon Mar 08, 2021 12:45 pm
by espdorian
I have updated the settings.json up to 3 times with the new open OCD version. It seems after a restart it gets overwritten again with the 'old' version. Why (and by what) is settings.json overwritten ?

Re: How can I install the new version of openocd in the ESP-idf?

Posted: Tue Mar 09, 2021 2:28 am
by ESP_bignacio
@espdorian In vscode, there is a settings system that project's .vscode/settings.json overwrite the workspace settings.json which override the user settings.json as explained in Visual Studio Code settings precedence

@Souhail Have you check the value of `idf.openOcdConfigs` also called `List of configuration files inside OpenOCD Scripts directory` in `Preferences: Open Settings (UI)` ? This are the files used by openOCD server in the extension.

To update openOCD to latest version, download the latest release from openOCD Releases and extract anywhere you want, then replace in the extension settings as explained before.

Re: How can I install the new version of openocd in the ESP-idf?

Posted: Thu Apr 29, 2021 9:14 pm
by nouwon
I am not sure but if somebody configures the tool.json file to point the latest version of open ocd the problem will be solved after
running the install.bat in esp-idf directory.
Am I right?