NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
dliviu has quit [Quit: Going away]
dliviu has joined #openocd
tsal has quit [Ping timeout: 248 seconds]
tsal has joined #openocd
Hawk777 has joined #openocd
nerozero has joined #openocd
Hawk777 has quit [Quit: Leaving.]
marcusmae has quit [Remote host closed the connection]
marcusmae has joined #openocd
Guest12 has joined #openocd
Guest12 has quit [Client Quit]
Haohmaru has joined #openocd
tlwoerner has quit [Read error: Connection reset by peer]
shibboleth has joined #openocd
merethan__ has joined #openocd
shibboleth has quit [Quit: shibboleth]
PsySc0rpi0n has quit [Ping timeout: 276 seconds]
PsySc0rpi0n has joined #openocd
tlwoerner has joined #openocd
merethan__ has quit [Remote host closed the connection]
merethan__ has joined #openocd
merethan__ has quit [Remote host closed the connection]
merethan__ has joined #openocd
Haohmaru has quit []
nerozero has quit [Ping timeout: 276 seconds]
marcusmae has quit [Ping timeout: 260 seconds]
marcusmae has joined #openocd
merethan__ has quit [Ping timeout: 248 seconds]
lh has quit [Ping timeout: 240 seconds]
lh has joined #openocd
Guest91 has joined #openocd
<Guest91> Hello
Guest91 has quit [Client Quit]
zjason` has joined #openocd
zjason has quit [Ping timeout: 256 seconds]
greenail has joined #openocd
<greenail> hello
<greenail> i see esp32 is supported, wondering if you are supposed to use program or program_esp for flashing
<greenail> well, program_esp doesn't work, so maybe i'm doing it wrong
<greenail> i'm using the 0.12.0.1 xpack binaries
<PaulFertser> greenail: hi
<greenail> PaulFertser: hello
<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.
<greenail> is it ok if i paste the output?
<PaulFertser> greenail: to some pastebin, yes
<PaulFertser> (the irccloud one was ok)
<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?
<greenail> one sec
<PaulFertser> https://github.com/espressif/openocd-esp32/commits/master looks like it's rebased on quite recent upstream
<greenail> the version is from 3/13 but I can try to grab the newer build
<greenail> is there a better debug probe I can flash to something I have lying around?
<greenail> i have an s3 but i couldn't really figure out how to use it as a hardware probe
<greenail> i also bluepill, blackpill
<greenail> and pi pico
<PaulFertser> greenail: cmsis-dap should be good enough
<greenail> it should be but as I said it doesn't work with the esp32 branch of openocd
<greenail> well you can see the output in the paste above
<greenail> it see's the interfaces, but it skips them
<PaulFertser> greenail: hold on
<PaulFertser> greenail: is this esp32 fork self-compiled?
<PaulFertser> greenail: have you tried interface/cmsis-dap.cfg instead, what does it give?
<greenail> no, it is from the github release
<greenail> yes, i'm using cmsis-dap
<greenail> .cfg
<greenail> tried all soort of options
<PaulFertser> greenail: you're using cmsis-dap2.cfg and it's forcing bulk.
<PaulFertser> I want to see what it gives when it's not forced.
<greenail> one sec
<greenail> PaulFertser: here's the output and config https://gist.github.com/jschoch/a49b7ec8d21027bc4a88b0d2eab971f3
<PaulFertser> greenail: what if you specify "cmsis_dap_backend hid" ?
<greenail> i tried hid and auto
<greenail> i tried everything
<greenail> burnt 3 hours this morning
<PaulFertser> greenail: I'd like to see the error with hid
<greenail> ok, one sec
<PaulFertser> There clearly must be some reason and we're pinpointing it.
<greenail> that seems suspicious Error: 23 53 cmsis_dap.c:2149 cmsis_dap_handle_backend_command(): invalid backend argument to cmsis_dap_backend <backend>
<PaulFertser> Error: 23 53 cmsis_dap.c:2149 cmsis_dap_handle_backend_command(): invalid backend argument to cmsis_dap_backend <backend>
<PaulFertser> Exactly
<PaulFertser> Guess they're compiling it without "hidapi" library.
<PaulFertser> This should be reported to Erhan.
<PaulFertser> greenail: https://github.com/devanlai/dap42 claims it can work on bluepill and supports cmsis-dap bulk.
<PaulFertser> Hm, probably not, sorry.
<PaulFertser> Bulk is in planned features.
<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]
wingsorc has joined #openocd
van has quit [Ping timeout: 268 seconds]
van has joined #openocd