<DefekC>
5) we could not understand why, but after compilation, executable wanted an extra libgcc_s_sjlj-1.dll to be copied over alongside with openocd.exe and libusb-1.0.dll.
<DefekC>
I could not understand half of what he was doing, but during his attempts he scratched his head more than I've ever seen him doing it! :D
<DefekC>
Now next step - trying to add support for APM32F051 MCUs.
<bencoh>
ah, right, libusb has support for windows
<DefekC>
This where I still don't understand things:
<DefekC>
libusb is a library *originally* intended for USB on Linux, right?
<DefekC>
But from what I see, for a long time it's been supported on all major OS'es... OS's ... OS? Sh**! :D
<DefekC>
People were expecting different library for Windows for USB (something much like special libraries for FTDI support from its vendor)?
<DefekC>
This one threw me off for a very long time...
<bencoh>
that wouldn't be the first or only project to start as linux-only and eventually support most major OSes
<PaulFertser>
DefekC: why do not you compile natively on windows with MSYS2? It's supposed to be much easier.
<PaulFertser>
DefekC: libusb provides userspace with an API to basically implement "USB drivers" in userspace. It probably originated on GNU/Linux platforms, but now has backends to support many OSes.
<PaulFertser>
DefekC: on windows libusb usually communicates with the WinUSB kernel driver to do the job.
<PaulFertser>
DefekC: you've seen README.Windows in the OpenOCD sources haven't you?
<PaulFertser>
DefekC: and btw README mentions cross-build.sh
<PaulFertser>
There's also .github/workflows/snapshot.yml ...
<DefekC>
PaulFertser , I did try to do it on Windows MSYS2 initially. But the problems were exactly the same.
<DefekC>
I switched to Linux only due to fact I knew a guy locally who I could visit for help (beggars aren't choosers).
<DefekC>
At this time I have both setups (Windows MSYS2 & Linux) available, and I could try to replicate what we did yesterday on Windows machine too.
<DefekC>
Yes, I went through README. But I would lie saying that I did it thoroughly...
<PaulFertser>
DefekC: so do you still have any issues/problems?
<PaulFertser>
DefekC: with MSYS2 you build it following MSYS2 manual for building _native_ software.
<PaulFertser>
Should work the same as on GNU/Linux.
<DefekC>
No, not at the moment.
<DefekC>
OpenOCD compiles. Now I have to try to modify the source.
<DefekC>
Thank You, PaulFertser!
<PaulFertser>
DefekC: can't be same issues if you install libusb etc normally with pacman as per MSYS2 manual.
<DefekC>
I'll give it a go after work!
<DefekC>
P.S. - I really want to understand all of this as I really want to start to migrate away from Windows to Linux. This is... a good start I guess! :D
<PaulFertser>
DefekC: good luck :) Please feel free to ask any specific questions.
armit has joined #openocd
<armit>
i have a rpi4 and jlink connected, the connection works, i can run reg, but when i want to dump memory with "dump_image" i get : abort occured - dscr = 0x03047d53