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

BergLoewe
Posts: 17
Joined: Wed Mar 18, 2020 10:34 am

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

Postby BergLoewe » Mon Jan 18, 2021 3:05 pm

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?

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

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

Postby ESP_bignacio » 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.

ehagerty
Posts: 5
Joined: Mon Jan 11, 2021 12:54 pm

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

Postby ehagerty » Thu Jan 21, 2021 3:36 pm

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!

ihouses
Posts: 19
Joined: Sun Jul 09, 2017 1:41 pm

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

Postby ihouses » Tue Jan 26, 2021 8:35 pm

Sorry for probably dumb question, but:

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

ihouses
Posts: 19
Joined: Sun Jul 09, 2017 1:41 pm

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

Postby ihouses » Sat Jan 30, 2021 11:02 pm

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! :!

Souhail
Posts: 2
Joined: Fri Mar 05, 2021 12:09 pm

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

Postby Souhail » Fri Mar 05, 2021 12:15 pm

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

Souhail
Posts: 2
Joined: Fri Mar 05, 2021 12:09 pm

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

Postby Souhail » Fri Mar 05, 2021 1:12 pm

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

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

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

Postby espdorian » Mon Mar 08, 2021 12:45 pm

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 ?

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

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

Postby ESP_bignacio » Tue Mar 09, 2021 2:28 am

@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.

nouwon
Posts: 7
Joined: Sat Mar 27, 2021 9:23 am

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

Postby nouwon » Thu Apr 29, 2021 9:14 pm

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?

Who is online

Users browsing this forum: No registered users and 12 guests