<PaulFertser>
greenail: generic "program" should work with all targets with NOR flash
<greenail>
i just noticed it is printing the args for program
<greenail>
is it possible it doesn't like the windows path?
<PaulFertser>
greenail: quite possible, it's hard to get right with all the quoting for backslashes etc.
<PaulFertser>
greenail: just start openocd from the same directory where you have the binary.
<PaulFertser>
It also has issues with pathes containing spaces.
<PaulFertser>
Easier to simply "cd" to the right place before running OpenOCD.
<PaulFertser>
Probably for windows using \\ for backslashes separating directories might work, not sure, and not much interested in trying to find out.
<PaulFertser>
greenail: with -d3 you'd see enough debug log to get more clues about what's really happening.
<PaulFertser>
btw, you should be able to install native OpenOCD on windows the regular way with MSYS2.
<PaulFertser>
greenail: .\ you do not need, just omit them if the binary is in the current directory.
<greenail>
i tried ./firmware.bin .\firmware.bin and just firmware.bin
<greenail>
all the same output
<PaulFertser>
greenail: hm, I do not see flash defined at all in upstream config. hold on.
<greenail>
maybe use board/esp32-wrover-kit-3.3v.cfg?
<PaulFertser>
greenail: oh, I'm afraid flash is just not yet ported to mainline according to 77287b8d47
<greenail>
that seems like a big omission lol
<greenail>
shame, my stupid cmsis-dap isn't recognized by the openocd-esp32 branch
<PaulFertser>
greenail: Erhan from Espressif is doing great job mainlining but probably flash loader isn't in the right shape for upstream yet. You have to try using their fork instead.
<greenail>
pyocd recoginizes it as does xpack's builds 11 and 12
<PaulFertser>
greenail: isn't recognised how? Is it missing the driver altogether or are you just compiling without hidapi?
<PaulFertser>
greenail: hm, do you probably have just raspberry pi?
<PaulFertser>
It can be used as a JTAG probe. And it's easy to compile OpenOCD on it with any options you need, so you should be able to build esp32 fork right there.
<PaulFertser>
Just clone the esp32 fork and ./configure --enable-bcm2835gpio
<PaulFertser>
(you can use some other single board computer too, there it'll be a bit slower and would need --enable-sysfsgpio or --enable-libgpiod )
<PaulFertser>
greenail: oh btw, do you really insist on not running a standard OS (such as GNU/Linux)? Because if you can run some common GNU/Linux distro you'd be able to self-build esp32 fork easily with hidapi enabled.
<greenail>
i run wsl when I can
<PaulFertser>
And then it'd work with your existing hidapi adapter.
<PaulFertser>
Well, wsl still doesn't support USB pass through in any sane way or does it?
<greenail>
wsl1 had something but I think they took it out in wsl2
<PaulFertser>
(last time I checked it was via usbip driver, not so easy to get working)
<PaulFertser>
greenail: I'm not sure how fast Espressif devs will answer but you can just create a ticket there on https://github.com/espressif/openocd-esp32/issues/ and tell them that for full cmsis-dap support HIDAPI library is needed too and ask to rebuild with it available so that "cmsis_dap_backend hid" would work.
<PaulFertser>
greenail: or you can self-build esp32 fork natively for Windows using MSYS2.
<PaulFertser>
It has all the deps already, so you first install hidapi, then clone the esp32 fork then build like any other software under msys2.
<PaulFertser>
It's just silly it suggests self-building libusb since it's already nicely packaged in msys2.
<PaulFertser>
Instead of manually compiling libusb you'd need simply installing mingw-w64-i686-hidapi with pacman.
<PaulFertser>
(and mingw-w64-i686-libusb for other adapters)
<PaulFertser>
greenail: that should be easy enough ^^^
<PaulFertser>
greenail: are you still there? Please ask additional questions now as I'm heading to sleep soon.
<greenail>
i'm trying pico-debug i have a pi pico flashed with it and it is working with the esp32 branch
<greenail>
hilariously i can' tfigure out what the JtAG pins are for it though
<greenail>
but thanks for the help PaulFertser
<PaulFertser>
greenail: are you going to report lack of hidapi there for esp32 fork releases though?
<greenail>
sure
<PaulFertser>
Cool. Hope you'll figure it out soon one way or the other. See you later, and happy hacking :)
<PaulFertser>
greenail: pico-debug is using one rp2040 core to debug _the other_
<greenail>
oh.... snap
<PaulFertser>
So there's no JTAG exposed really, it's all virtual inside the chip.
<greenail>
i really don't feel like fighting compilers
Guest78 has joined #openocd
<greenail>
i'm not really a c++ guy
<PaulFertser>
greenail: seriously, msys2 should be easy enough.
<greenail>
it would be nice to have this just work with platformio
<PaulFertser>
Just follow https://github.com/espressif/openocd-esp32/issues/221 , add mingw-w64-i686-hidapi to the pacman command, and prior to building pay attention to ./configure output, it should report hidapi as available, that's it.
<PaulFertser>
greenail: not a single line of C++ code involved btw, it's all C.
<greenail>
same mystery to me ;)
<PaulFertser>
autotools is fighting compilers for you. Not everybody agrees it's a good thing though :)
<PaulFertser>
greenail: I can help you if you get any errors building with msys2 but most probably in 8+ hours.
<Guest78>
Can anyone tell me if a picoprobe works with the apt version of openocd? I plan on using openocd on
<Guest78>
more than just a pico.
<PaulFertser>
Guest78: hm, btw, that picoprobe, does it support JTAG?
<PaulFertser>
Guest78: if it exposes CMSIS-DAP then yes, it should just work with any recent OpenOCd version.
<Guest78>
Ok great! Thanks for your help.
<PaulFertser>
Eh, just SWD right? Then it's not so useful as it could have been.
<Guest78>
Yeah it just uses SWD.
Guest78 has quit [Quit: Client closed]
<greenail>
1 hour laster and it's still not building
<greenail>
total day wasted
<greenail>
great it built but it also fails
<greenail>
ok it seems to be flashing something
<greenail>
it also seems to be flashing over and over again
wingsorc has joined #openocd
wingsorc has quit [Remote host closed the connection]