On 5/19/19 4:46 AM, [email protected] wrote:
Hi Bob,

Thank you for your reply.
This approach you describe in 
https://mindchasers.com/dev/openocd-darsena-windows creates a Windows 
executable to be run in Cygwin.

For software experts, that is certainly good. Most software experts don't 
bother installing Cygwin, or they just switch entirely to Linux to do the 
development.

The people I'm trying to give a voice are pure hardware experts with limited software 
exposure. Some of them are even still developing in assembly (not joking) and learning C 
today. They are comfortable in Windows, on which they use a PCB drawing tool like Eagle. 
These people need a "standalone" Windows executable, one that runs natively on 
Windows (no need for Cygwin).

To build a standalone executable for such people, I found the following source:

https://www.playembedded.org/blog/building-openocd-under-windows-using-msys2/

With that step-by-step guide, I was able to successfully build a standalone executable 
that simply runs on Windows. Unfortunately, the build relies on a repository from a guy 
named "Alex Pux". It is not the official Gerrit repository, so the result of 
the build is not really up-to-date.
It would be awesome to have a similar step-by-step guide to build OpenOCD into 
a standalone Windows executable, pulling in the latest Gerrit repository to get 
the most up-to-date version.


Thanks everyone for the feedback.  I always launch Cygwin when Windows 10 boots .  For me, it's something I have done for years.

The instructions provided does walk through someone building on Windows 10 from scratch using the  OpenOCD master branch and includes installing Cygwin & package selection: https://mindchasers.com/dev/openocd-darsena-windows

Are you saying that you want an executable that runs on Windows 10 without installing anything but the openocd executable?   I think Liviu says he has a path for this.

For use with Cygwin, I suppose you'll need to at least install the Cygwin dll(s).  Someone who is using our project has asked about this, too.  We'll take a look at this in the coming days and respond later.

I personally think Cygwin is very good.  The mailing list is fairly active, good documentation, and I believe the project leads are from Red Hat, which I think is good.   However, the bottom line here is that I and others have been using it virtually forever to network with Linux/macOS boxes.

I'll reply again soon...

Bob





Kind greetings,

Kristof Mulier



----- Oorspronkelijk bericht -----
Van: "Bob Cochran" <[email protected]>
Aan: "Liviu Ionescu" <[email protected]>, "openocd-devel" 
<[email protected]>
Cc: "info" <[email protected]>
Verzonden: Zondag 19 mei 2019 04:42:56
Onderwerp: Re: [OpenOCD-devel] Building OpenOCD for Windows

On 5/8/19 3:44 PM, Liviu Ionescu wrote:
(I created a separate thread, since this is not related to the original 
message, and I would like the question related to the new release to be debated)

On 8 May 2019, at 21:44, <[email protected]> 
<[email protected]> wrote:

Hi Mr. Liviu,

Compiling OpenOCD from the source code into a working executable on Windows
is quite difficult. I noticed you're one of the few people able to do that
(for which I thank you).

Hi,

FYI - we documented how we build OpenOCD on Windows 10 using Cygwin
here:  https://mindchasers.com/dev/openocd-darsena-windows

So far, we have only used it to work with FTDI FT2232H, but we're going
to test it soon with CMSIS-DAP.

Bob




you're welcome

I've tried doing this myself as well, and the best guide I've found so far
is this one:
https://www.playembedded.org/blog/building-openocd-under-windows-using-msys2
/
It works. Unfortunately, it's not the latest version. It uses a repository
from a guy named "Alex Pux" (see chapter 4.2 in the guide). It's not using
the actual OpenOCD gerrit repository.

How do you compile OpenOCD for Windows?
well, you should differentiate compiling OpenOCD intended to run on your 
specific machine, from creating production grade distributions which include 
standalone binaries intended to run on any machine, which is a more difficult 
undertaking.

my build scripts address only the later case, and are available from a separate 
git project:

        https://github.com/gnu-mcu-eclipse/openocd-build

the scripts run on CentOS 6 Docker containers, to create the Linux and Windows 
binaries, and on macOS 10.10 to create the macOS binaries.

the Windows binaries are cross compiled with mingw-w64 gcc-7.4. separate 32 and 
64-bit binaries are provided.


according to GitHub analytics, since 2015, there were 143 K downloads, which I 
guess is an important figure.


compiling OpenOCD for development purposes or for local use is currently not 
supported very well by the current scripts; it is possible, but it is tedious, 
since the scripts will always run the steps to validate the binaries and pack 
the result in an archive.


FYI, I had a similar problem with QEMU, and for it I added a separate script, 
to build the native binaries. on windows it requires the new Microsoft WSL 
(Windows System for Linux), which allows to run an Ubuntu inside Windows, so 
the script takes the same approach, cross compiling with mingw-w64 gcc-7.4.

Do you have a guide on how to do
that?
the README in the above link provides some info.

however the full details are in the scripts themselves.


regards,

Liviu



_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel



_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel




_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to