-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instructions for building OpenOCD on windows are incorrect / incomplete (OCD-545) #221
Comments
@littleboot thank you for your valuable work and helping us to solve this. I will give a try from scratch on my windows machine and let you know how you can fix the |
Perhaps we can update the instructions to reflect the steps we actually use to build Windows versions of OpenOCD? That is, we cross-compile it inside a Debian container, in Docker. That has the benefit that unlike "building on Windows" instructions we have now, we will actually be automatically verifying that the instructions still work. |
The help is much appreciated I'm looking forward to the solution. I'm not familiar with a Debian container in Docker but I will have a look at it tomorrow and report if I'm able to figure it out and get it to work. "Perhaps we can update the instructions to reflect the steps we actually use to build Windows versions of OpenOCD?" yes that would a good solution. Thank you both for the reply |
@littleboot Could you describe what you are trying to achieve in the first place? Do you want to build from source instead of using release binaries for some specific reason? Maybe there's an easier way to solve your problem than having you build OpenOCD from source. |
@igrr I have a peculiar problem when I try to flash my device for a second time it fails. And flash needs to be erased using the serial bootloader (I'm not touching the JTAG GPIO's at all in this firmware, Its the unified provision example + very simple RMT code). I will file a new bug report about later today (Need to clean up my notes and gather the logs). Side question: However my reasoning was as follows, I can't figure out the problem. It might be caused by OpenOcd. Lets build OpenOcd from the latest source. Try if it the problem goes away. |
@littleboot you case erase the flash sectors from the JTAG interface.
|
@littleboot to fix the libusb config issue you need to have To build libusb, you can follow the below instructions that we use in the CI
Or create manually as mentioned here In the end you will have
|
If someone wants to have windows built, can refer here. https://github.com/openocd-org/openocd/blob/master/.github/workflows/snapshot.yml We are also planning to add action script here for each commit. |
Building OpenOcd on windows following the instruction by the letter fails.
Every part of the instruction seems to have a problem, this is really frustrating.
After almost two full days of trying to build openOcd on windows I decided I need some help. I hope someone can assist me to get it working and the instructions can be improved and fixed.
In this issue report below I will describe in detail how I tried building OpenOCD from this github repo, I will also describe the fixes for some of the faulty instructions currently listed on the doc.espressif website.
Download MSYS from:
https://www.msys2.org/
Install:
When the install finished the incorrect shell opens by default, close this shell and open the correct one:
"MSYS2 MinGW X86"
Install Dependencies
Problem 1: "libtool" is missing from the list, I get an error if I don't install this dependency.
Fix: Add "libtool" to the dependencies list.
Problem 2: The download of these tools can timeout
Fix: Added "--disable-download-timeout" to the pacman command.
New cmd with fixes implemented:
Download Sources of OpenOCD
Problem 3: "No such file or directory"
Fix: first create directory called "esp" with mkdir command.
New cmd with fixes implemented:
Downloading libusb
No problems with this command:
Problem 4: The path provided to the "LDFLAGS" variable is not correct when looking at the downloaded libusb directory. The ".libs" folder does not exsis.
Fix: remove ".libs" from the LDFLAGS path.
New cmd with fix implemented:
Build OpenOCD
Not sure, commands seem correct but the build fails at the "./configure" command because it is unable to find libusb1.0
The build configuration fail message
It seems the build can't be configured because libusb
cannot
be found. I'm currently not able to fix this.A full log to get to this point is provided to the end of this issue report.
Other
I'm new to MSYS and had a hard time figuring out were the files were located on my hard disk.
Were can I find the files in the "~" folder on windows?
C:\msys64\home\<username>\
Full log:
Full log when using the fixed commands, (still fails at "./configure" command)
log.txt
The text was updated successfully, but these errors were encountered: