Hi Mr. Ionescu,

Thank you very much for your reply.
I am (unfortunately) not so familiar with Linux. I know, I often feel ashamed 
that I'm still a Windows user because most software experts around me are Linux 
users. Anyhow, I'm a hardware expert finding my way in the software world. 
Getting familiar with Linux is on my TODO list.

I have forwarded your mail to Mr. Rocco Marco Guglielmi. He wrote the tutorial:
https://www.playembedded.org/blog/building-openocd-under-windows-using-msys2/

In his tutorial, the OpenOCD compilation into a standalone Windows executable 
happens in Msys2 on Windows. So no need to install Linux or a virtual Linux 
machine on your computer. Do you think your scripts would run in Msys2 - 
perhaps with some tweaks?

The reason I'm interested in building OpenOCD has everything to do with the 
startup I'm working in:
https://embedoffice.com/
If you have time to check out our website, please let us know what you think 
about our initiative 😊

Kind greetings,
Kristof Mulier

-----Original Message-----
From: Liviu Ionescu <i...@livius.net> 
Sent: Wednesday, May 8, 2019 9:45 PM
To: openocd-devel <openocd-devel@lists.sourceforge.net>
Cc: i...@sikando.com; kristof.mul...@telenet.be
Subject: Re: [OpenOCD-devel] Building OpenOCD for Windows

(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, <kristof.mul...@telenet.be> 
> <kristof.mul...@telenet.be> 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).

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
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to