Re: [OpenOCD-devel] Compliance with OpenOCD license

2020-01-20 Thread Tommy Murphy
The instructions definitely work on Ubuntu.
I've been using Ubuntu 18 lately.
Other distros probably work as well.
Don't forget to read the "prerequisite" instructions for installing docker.
Once that's done it should be trivial to pull and run the build process.
As I mentioned earlier if you want to build from the upstream master openocd 
repo rather than Liviu's snapshots then you may need to pass additional options 
to build.sh or maybe edit even edit the scripts.
I can't remember offhand but I could check later if necessary.
Best to pipeclean the build process as is first before changing anything in any 
case.

From: kristof.mul...@telenet.be 
Sent: Monday, January 20, 2020 7:58:25 PM
To: Liviu Ionescu 
Cc: Tommy Murphy ; openocd-devel 

Subject: Re: [OpenOCD-devel] Compliance with OpenOCD license

Hi @Liviu Ionescu,

> The scripts have lots of configuration environment
> variables, if you want to build a more recent version,
> you need to tweak them.
> [..]

Uh oh...
I have not even the foggiest idea how to "tweak" your
build scripts.
To be honest, I was hoping to simply run the build script
and watch the OpenOCD Windows binaries showing up magically :-)
Unfortunately it doesn't seem to be that simple.



> However please note that the scripts are not specific
> for generating production binaries, which have certain
> requirements, and are less suitable for experimenting
> with builds.

When I'm "experimenting with a build" this is what I do:
I connect the microcontroller and the probe. Then I start
OpenOCD and feed it with the right config files. If OpenOCD
connects to the chip and is able to flash a firmware, I
consider the experiment to be successful.
So for this kind of "experiments", a "production binary" is
perfectly fine. I don't need a "debug binary".

Many thanks for your help :-)



- Oorspronkelijk bericht -
Van: "Liviu Ionescu" 
Aan: "kristof mulier" 
Cc: "Tommy Murphy" , "openocd-devel" 

Verzonden: Maandag 20 januari 2020 20:46:23
Onderwerp: Re: [OpenOCD-devel] Compliance with OpenOCD license

> On 20 Jan 2020, at 21:36, kristof.mul...@telenet.be wrote:
>
> ... I conclude this particular OpenOCD executable was built last summer.

That's correct.

Since OpenOCD has no release schedule, I have no idea when to make xPack 
releases.

> .. I suppose your
> instructions to build the OpenOCD xPack will run smoothly in Ubuntu?

Yes.

The scripts have lots of configuration environment variables, if you want to 
build a more recent version, you need to tweak them.

There is also a script to build native binaries, intended for debug sessions, 
but I'm not sure you can generate Windows binaries.


However please note that the scripts are not specific for generating production 
binaries, which have certain requirements, and are less suitable for 
experimenting with builds.

After playing with the scripts you'll probably prefer to use the already made 
binaries.

FYI, I plan for a new release shortly.

Regards,

Liviu
___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] Compliance with OpenOCD license

2020-01-20 Thread kristof . mulier
Hi @Liviu Ionescu,

> The scripts have lots of configuration environment
> variables, if you want to build a more recent version,
> you need to tweak them.
> [..]

Uh oh...
I have not even the foggiest idea how to "tweak" your
build scripts.
To be honest, I was hoping to simply run the build script
and watch the OpenOCD Windows binaries showing up magically :-)
Unfortunately it doesn't seem to be that simple.



> However please note that the scripts are not specific
> for generating production binaries, which have certain
> requirements, and are less suitable for experimenting
> with builds.

When I'm "experimenting with a build" this is what I do:
I connect the microcontroller and the probe. Then I start
OpenOCD and feed it with the right config files. If OpenOCD
connects to the chip and is able to flash a firmware, I
consider the experiment to be successful. 
So for this kind of "experiments", a "production binary" is
perfectly fine. I don't need a "debug binary".

Many thanks for your help :-)



- Oorspronkelijk bericht -
Van: "Liviu Ionescu" 
Aan: "kristof mulier" 
Cc: "Tommy Murphy" , "openocd-devel" 

Verzonden: Maandag 20 januari 2020 20:46:23
Onderwerp: Re: [OpenOCD-devel] Compliance with OpenOCD license

> On 20 Jan 2020, at 21:36, kristof.mul...@telenet.be wrote:
> 
> ... I conclude this particular OpenOCD executable was built last summer.

That's correct. 

Since OpenOCD has no release schedule, I have no idea when to make xPack 
releases.

> .. I suppose your
> instructions to build the OpenOCD xPack will run smoothly in Ubuntu?

Yes.

The scripts have lots of configuration environment variables, if you want to 
build a more recent version, you need to tweak them. 

There is also a script to build native binaries, intended for debug sessions, 
but I'm not sure you can generate Windows binaries.


However please note that the scripts are not specific for generating production 
binaries, which have certain requirements, and are less suitable for 
experimenting with builds.

After playing with the scripts you'll probably prefer to use the already made 
binaries. 

FYI, I plan for a new release shortly.

Regards,

Liviu


___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] Compliance with OpenOCD license

2020-01-20 Thread Liviu Ionescu



> On 20 Jan 2020, at 21:36, kristof.mul...@telenet.be wrote:
> 
> ... I conclude this particular OpenOCD executable was built last summer.

That's correct. 

Since OpenOCD has no release schedule, I have no idea when to make xPack 
releases.

> .. I suppose your
> instructions to build the OpenOCD xPack will run smoothly in Ubuntu?

Yes.

The scripts have lots of configuration environment variables, if you want to 
build a more recent version, you need to tweak them. 

There is also a script to build native binaries, intended for debug sessions, 
but I'm not sure you can generate Windows binaries.


However please note that the scripts are not specific for generating production 
binaries, which have certain requirements, and are less suitable for 
experimenting with builds.

After playing with the scripts you'll probably prefer to use the already made 
binaries. 

FYI, I plan for a new release shortly.

Regards,

Liviu



___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] Compliance with OpenOCD license

2020-01-20 Thread kristof . mulier
Thank you @Liviu Ionescu,

I just downloaded an xPack from 
https://github.com/xpack-dev-tools/openocd-xpack/releases
and behold, there are Windows binaries inside! I run the OpenOCD executable and 
it prints:

   $ xPack OpenOCD, 64-bit Open On-Chip Debugger 0.10.0+dev (2019-07-17-11:28)
   $ Licensed under GNU GPL v2

So I conclude this particular OpenOCD executable was built last summer.
Thank you @Liviu Ionescu :-)


> "Well if you insist, you can do it, but the purpose of
> the xPack OpenOCD project is exactly to avoid users having
> to run any build scripts and instead use the provided 
> binaries."

I'm grateful for the xPacks you provide. I'm happy to have them discovered 
today. However,
sometimes I'm trying a new microcontroller and need the latest bleeding-edge 
OpenOCD build.
Therefore, I will try to follow your guide to build the OpenOCD xPack. I'm 
currently instal-
ling Virtual Box on my Windows 10 computer to run an Ubuntu virtual machine. I 
suppose your
instructions to build the OpenOCD xPack will run smoothly in Ubuntu?



- Oorspronkelijk bericht -
Van: "Liviu Ionescu" 
Aan: "kristof mulier" 
Cc: "Tommy Murphy" , "openocd-devel" 

Verzonden: Maandag 20 januari 2020 20:18:11
Onderwerp: Re: [OpenOCD-devel] Compliance with OpenOCD license

> On 20 Jan 2020, at 21:09, kristof.mul...@telenet.be wrote:
> 
> Waw, that is marvellous.
> Thank you very much @Liviu Ionescu

You're welcome!


> I will try to run the build scripts.

Well if you insist, you can do it, but the purpose of the xPack OpenOCD project 
is exactly to avoid users having to run any build scripts and instead use the 
provided binaries.

> The result will be an xPack, right?

Not exactly, if you run it on Windows the result will be an error :-(

> I've got no idea what an xPack actually is,

https://xpack.github.io

> but I suppose the Windows binaries for OpenOCD will be somewhere inside the 
> xPack ;-)

The windows binaries, together with all other binaries (linux, mac) are 
available from:

https://github.com/xpack-dev-tools/openocd-xpack/releases

Arm binaries are available from

https://github.com/xpack-dev-tools/pre-releases/releases/tag/v1.0


If you are using the arm-none-eabi-gcc, you might also be interested of

https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases


Enjoy,

Liviu


___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] Compliance with OpenOCD license

2020-01-20 Thread Liviu Ionescu


Re: [OpenOCD-devel] Compliance with OpenOCD license

2020-01-20 Thread Liviu Ionescu



> On 20 Jan 2020, at 20:43, Tommy Murphy  wrote:
> 
> Over the years Liviu's approach is by far the simplest that I have come 
> across for cross compiling for Windows and for compiling for Linux.

The build scripts are quite complex, but the point is to generate standalone 
binaries the run effortlessly on all supported platforms, in other words 
without unusual and possibly incompatible dependencies.

The supported platforms are: 

- Windows 32
- Windows 64
- Linux x86_64
- Linux i686
- macOS x86_64

Experimental support was recently added for:

- Linux armhf
- Linux aarch64

(yes, you can run OpenOCD on Raspberry Pi class systems!)


Regards,

Liviu



___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] Compliance with OpenOCD license

2020-01-20 Thread kristof . mulier
Waw, that is marvellous.
Thank you very much @Liviu Ionescu

I will try to run the build scripts. The result will be an xPack, right? I've 
got no idea what an xPack actually is, but I suppose the Windows binaries for 
OpenOCD will be somewhere inside the xPack ;-)

- Oorspronkelijk bericht -
Van: "Liviu Ionescu" 
Aan: "Tommy Murphy" 
Cc: "kristof mulier" , "openocd-devel" 

Verzonden: Maandag 20 januari 2020 19:52:45
Onderwerp: Re: [OpenOCD-devel] Compliance with OpenOCD license

> On 20 Jan 2020, at 20:43, Tommy Murphy  wrote:
> 
> Over the years Liviu's approach is by far the simplest that I have come 
> across for cross compiling for Windows and for compiling for Linux.

The build scripts are quite complex, but the point is to generate standalone 
binaries the run effortlessly on all supported platforms, in other words 
without unusual and possibly incompatible dependencies.

The supported platforms are: 

- Windows 32
- Windows 64
- Linux x86_64
- Linux i686
- macOS x86_64

Experimental support was recently added for:

- Linux armhf
- Linux aarch64

(yes, you can run OpenOCD on Raspberry Pi class systems!)


Regards,

Liviu


___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] Compliance with OpenOCD license

2020-01-20 Thread Liviu Ionescu



> On 20 Jan 2020, at 20:26, kristof.mul...@telenet.be wrote:
> 
> Thank you @Tommy Murphy,
> 
> I noticed that docker is being used. Does this mean that the resulting 
> binaries cannot run natively on Windows? Do they need a docker layer to run 
> on?

The Windows binaries run natively on Windows.

Docker is only a fancy chroot technology, used in this case to isolate the 
build environment in order to control the versions of the tools used. Thus the 
Linux binaries also run natively on most recent distributions.


Regards,

Liviu




___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] Compliance with OpenOCD license

2020-01-20 Thread Tommy Murphy
And before anybody asks - no, they don't need Cygwin or any other "subsystem" 
either. 🙂
They are completely native Windows binaries cross compiled from Linux using the 
Windows/MinGW gcc toolchain.
Over the years Liviu's approach is by far the simplest that I have come across 
for cross compiling for Windows and for compiling for Linux.


From: Liviu Ionescu 
Sent: Monday 20 January 2020 18:39
To: kristof.mul...@telenet.be 
Cc: Tommy Murphy ; openocd-devel 

Subject: Re: [OpenOCD-devel] Compliance with OpenOCD license



> On 20 Jan 2020, at 20:26, kristof.mul...@telenet.be wrote:
>
> Thank you @Tommy Murphy,
>
> I noticed that docker is being used. Does this mean that the resulting 
> binaries cannot run natively on Windows? Do they need a docker layer to run 
> on?

The Windows binaries run natively on Windows.

Docker is only a fancy chroot technology, used in this case to isolate the 
build environment in order to control the versions of the tools used. Thus the 
Linux binaries also run natively on most recent distributions.


Regards,

Liviu


___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] Compliance with OpenOCD license

2020-01-20 Thread kristof . mulier
Thank you @Tommy Murphy, 

I searched on the xpack website and discovered some build instructions here: 

https://github.com/xpack-dev-tools/openocd-xpack/blob/xpack/README-BUILD.md 

I noticed that docker is being used. Does this mean that the resulting binaries 
cannot run natively on Windows? Do they need a docker layer to run on? 


Van: "Tommy Murphy"  
Aan: "kristof mulier" , "openocd-devel" 
 
Verzonden: Maandag 20 januari 2020 19:12:36 
Onderwerp: Re: Compliance with OpenOCD license 

> please help us to find a better way to build OpenOCD for Windows. 

On this specific issue I would recommend that you (and anybody else having 
issues with building OpenOCD) have a look at Liviu Ionescu's xPack OpenOCD 
project and the docker based build scripts that he provides for (cross) 
building OpenOCD for Linux/Windows/32/64 bit. By default they build using his 
own repos/tarballs but with a small tweak (or maybe it can already be 
parameterised) you can build from any other repo including the master OpenOCD 
ones. 

[ https://xpack.github.io/ | https://xpack.github.io/ ] 
[ https://xpack.github.io/openocd/ | https://xpack.github.io/openocd/ ] 

Hope this helps. 




From: kristof.mul...@telenet.be  
Sent: Monday 20 January 2020 17:41 
To: openocd-devel  
Subject: [OpenOCD-devel] Compliance with OpenOCD license 
Dear OpenOCD developers, 

We're building a new IDE for microcontrollers (see https://embeetle.com). 
Our IDE uses OpenOCD to flash the microcontroller. I compile OpenOCD 
for Windows using the guide from Rocco Marco: 
https://www.playembedded.org/blog/building-openocd-under-windows-using-msys2/ 

To comply with the OpenOCD license, we will: 
1. Mention on our website that we use OpenOCD as a third-party tool in our 
IDE. 

2. Show the OpenOCD license on our website (along with licenses of other 
third-party tools we're using). 

3. Show the OpenOCD license in the license agreement the user has 
to accept when first opening our IDE. 

However, the OpenOCD license also states that we must provide the OpenOCD 
source code to our users. But we have a few questions related to this 
requirement: 
1. Do we have to host the OpenOCD source code on our server? Or is linking 
to the OpenOCD GitHub enough? 

2. If we must host the OpenOCD source code on our server, then please help 
us to find a better way to build OpenOCD for Windows. The guide from 
Rocco Marco (see link above) is a sequence of commands to create (build?) 
the OpenOCD binary. To be honest, I simply follow the procedure blindly, 
and I'm happy to get the binaries in the end. 
The sequence of commands should be altered somehow such that the source 
code is pulled in and zipped to some location. But I don't have a clue how. If 
you have another guide on how to build OpenOCD (and pull in the source code 
simultaneously), please let me know. 

___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] Compliance with OpenOCD license

2020-01-20 Thread Tommy Murphy
> please help us to find a better way to build OpenOCD for Windows.

On this specific issue I would recommend that you (and anybody else having 
issues with building OpenOCD) have a look at Liviu Ionescu's xPack OpenOCD 
project and the docker based build scripts that he provides for (cross) 
building OpenOCD for Linux/Windows/32/64 bit. By default they build using his 
own repos/tarballs but with a small tweak (or maybe it can already be 
parameterised) you can build from any other repo including the master OpenOCD 
ones.

https://xpack.github.io/
https://xpack.github.io/openocd/

Hope this helps.




From: kristof.mul...@telenet.be 
Sent: Monday 20 January 2020 17:41
To: openocd-devel 
Subject: [OpenOCD-devel] Compliance with OpenOCD license

Dear OpenOCD developers,

We're building a new IDE for microcontrollers (see https://embeetle.com).
Our IDE uses OpenOCD to flash the microcontroller. I compile OpenOCD
for Windows using the guide from Rocco Marco:
https://www.playembedded.org/blog/building-openocd-under-windows-using-msys2/

To comply with the OpenOCD license, we will:
1. Mention on our website that we use OpenOCD as a third-party tool in our
IDE.

2. Show the OpenOCD license on our website (along with licenses of other
third-party tools we're using).

3. Show the OpenOCD license in the license agreement the user has
to accept when first opening our IDE.

However, the OpenOCD license also states that we must provide the OpenOCD
source code to our users. But we have a few questions related to this
requirement:
1. Do we have to host the OpenOCD source code on our server? Or is linking
to the OpenOCD GitHub enough?

2. If we must host the OpenOCD source code on our server, then please help
us to find a better way to build OpenOCD for Windows. The guide from
Rocco Marco (see link above) is a sequence of commands to create 
(build?)
the OpenOCD binary. To be honest, I simply follow the procedure blindly,
and I'm happy to get the binaries in the end.
The sequence of commands should be altered somehow such that the source
code is pulled in and zipped to some location. But I don't have a clue 
how. If
you have another guide on how to build OpenOCD (and pull in the source 
code
simultaneously), please let me know.
___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


[OpenOCD-devel] Compliance with OpenOCD license

2020-01-20 Thread kristof . mulier
Dear OpenOCD developers, 

We're building a new IDE for microcontrollers (see https://embeetle.com). 
Our IDE uses OpenOCD to flash the microcontroller. I compile OpenOCD 
for Windows using the guide from Rocco Marco: 
https://www.playembedded.org/blog/building-openocd-under-windows-using-msys2/ 

To comply with the OpenOCD license, we will: 
1. Mention on our website that we use OpenOCD as a third-party tool in our 
IDE. 

2. Show the OpenOCD license on our website (along with licenses of other 
third-party tools we're using). 

3. Show the OpenOCD license in the license agreement the user has 
to accept when first opening our IDE. 

However, the OpenOCD license also states that we must provide the OpenOCD 
source code to our users. But we have a few questions related to this 
requirement: 
1. Do we have to host the OpenOCD source code on our server? Or is linking 
to the OpenOCD GitHub enough? 

2. If we must host the OpenOCD source code on our server, then please help 
us to find a better way to build OpenOCD for Windows. The guide from 
Rocco Marco (see link above) is a sequence of commands to create (build?) 
the OpenOCD binary. To be honest, I simply follow the procedure blindly, 
and I'm happy to get the binaries in the end. 
The sequence of commands should be altered somehow such that the source 
code is pulled in and zipped to some location. But I don't have a clue how. If 
you have another guide on how to build OpenOCD (and pull in the source code 
simultaneously), please let me know. 
___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel