NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
boru` has joined #openocd
boru has quit [Killed (NickServ (GHOST command used by boru`))]
boru` is now known as boru
tsal has joined #openocd
tsal_ has quit [Ping timeout: 245 seconds]
gnom has quit [Ping timeout: 256 seconds]
gnom has joined #openocd
thinkfat has joined #openocd
nerozero has joined #openocd
gnom has quit [Read error: Connection reset by peer]
gnom has joined #openocd
Guest38 has joined #openocd
Guest38 has quit [Client Quit]
Guest39 has joined #openocd
<Guest39> Hi, I am working with adsp 21469 processor. It has SHARC architecture. I explored openocd, I didn't find any support for SHARC architecture. Any suggestions, if I want to access theis processor, via openocd? Any help would be appreciated. Thanks!!
<PaulFertser> Guest39: hi. You can JTAG it for boundary scan purposes.
Guest39 has quit [Quit: Client closed]
Guest39 has joined #openocd
<Guest39> So, I have the access to the JTAG pins on the device and interfacing it via um232. When I access it via openocd, I need to provide config files i.e. one for the interface (that the openocd has for um232) and the other for the target, I am unable to get what to provide as the config file for the target i.e adsp 21469 - SHARC processor
<olerem> Guest39: if target architecture is not supported, then you do not need target in your config file
<Guest39> ALright, so is it like I only need to provide interface config file, and I should be able to get access to internal vai sending openocd jtag commands via Telnet?
<olerem> ack
<olerem> (yes)
<Guest39> Thanks, I'll try that way
<olerem> normally, if jtag is properly implemented on this chip, openocd will be able to detect it without config
<Guest39> Cool. And in case of debugging via GDB, I might not be able to do so as GDB doesn't support SHARC architecture, right?
<Guest39> *debugging via GDB via openocd
<PaulFertser> Guest39: no chance of getting debug, no. You can use OpenOCD for boundary scan.
<olerem> PaulFertser: but "some one"^tm can implement it. Or?
<PaulFertser> olerem: of course :)
<olerem> Guest39: can be, implemented. patches are wellcome :)
<Guest39> Sure, thanks
Guest39 is now known as tinker
tinker is now known as tinker00
<tinker00> As of now, I am trying connecting jtag by only passing config file of interface, not the target. I am unable to send standard commands via telnet like "halt", it says its "invalid".. Is there a way I can insert its screenshot in this forum?
<olerem> tinker00: halt is target specific comand, you have no target support
<tinker00> Any suggestions for the commands that would be useful here when we don't pass the target config file?
<tinker00> This is the doc I found w.r.t JTAG emulator that's in adsp - https://www.analog.com/media/en/technical-documentation/application-notes/ee-68.pdf
<tinker00> I see this has doesn't has JTAG boundary scan, but JTAG emulation (ICE).. I am wondering in that case will it work with openocd? I am noob in this domain, any guidance would be of great help
<PaulFertser> tinker00: you're not listening :(
<PaulFertser> tinker00: you currently can't use openocd for debug of sharc targets.
<PaulFertser> Only for boundary scan of them.
<tinker00> OOps, my bad.. I was thinking if I can do boundary scan on this chip..but ya, as that is not supported on this chip, I won't be able to do that
<tinker00> Any suggestions on where should I look if I want to contribute to openocd in supporting this target?
<tinker00> Any doc/reading material? - https://github.com/openocd-org/openocd
<PaulFertser> tinker00: it would be a big reverse-engineering tas
<tinker00> I am ready too put in efforts, need some guidance
tarekb has joined #openocd
Thomas3 has joined #openocd
tinker00 has quit [Quit: Client closed]
<Thomas3> Hello everyone. Anyone here who can give me a hint regarding STM32G0 support? Docs say supported, I can find my specific family (G0B) in the code, openOCD connects - but actual debugging fails with "Warn : Cannot identify target as an STM32G0/G4/L4/L4+/L5/WB/WL family device."
<karlp> what id code does it have?
<karlp> it might be a new family that isn't in the list yet: https://github.com/openocd-org/openocd/blob/master/src/flash/nor/stm32l4x.c#L385
<karlp> of course, the numbers recently got pulled out of that file, for "reasons" so ti's harder to dig now
<Thomas3> stm32cubeprogrammer says Device ID : 0x467
<Thomas3> 0.11
<karlp> yeah, you need to be on master I think
<karlp> that would have come in past 0.11
<karlp> there's separte docs for master andf or 0.11
<Thomas3> not sure its 0.11 release or later,m didnt build myself. guess I will do that.
<Thomas3> or are there (automatic) windows builds of master? saw a refence to that somewhere, but didnt find any
<PaulFertser> Thomas3: is it problematic to build yourself?
<karlp> no clue on that sorry.
<PaulFertser> Thomas3: 0.11 is a bit too old by now.
<PaulFertser> Thomas3: yes, there're automatic windows builds for master, it's mentioned on the official site.
<PaulFertser> Is the wording unclear? I can fix it.
<Thomas3> never done it, just would need to see about the toolchain.
<Thomas3> I saw the commit for G0B, 11 days ago :)
<Thomas3> I cant figure out how to download the automatic builds, I only see the build logs. what am i missing?
<PaulFertser> Thomas3: github produces build artifacts automatically for every commit.
<PaulFertser> Let me try... myself.
<karlp> PaulFertser: the master link goes to t ayaml file
<karlp> the line "The official Github mirror automatically generates Windows binary archives for releases and all master commits."
<karlp> if that's the expected path, to then randomly pick the top line, that looks _very_ unlike a "get your latest download here"
<karlp> the you're meant to click the "artifact" of that test build and open up inside it, then yeah, ~no-one's going to be doing that.
<karlp> not anyone looking for a "here's latest binary.zip" link
<karlp> htat's probablyu enough as it includes "latest" though,
<karlp> but I would never have looked there for the latest, onyl for "releases"
<Thomas3> I did find the artifact and looked everywhere, but there was no file, no download. I did say log in to see logs
<Thomas3> logged in: now the artifact is a download link
<Thomas3> without login it does nothing.
<Thomas3> so for me, I absolutely clicked the first line and went to the artifact - but I would have needed a note "you need to be logged in to download"
<Thomas3> debugging works with the autobuild of latest, I can now see an unhandled exception instead of *nothing works* :)
<Thomas3> thank you very much for your help.
<PaulFertser> Thomas3: thank you for bringing the problem to our attention.
<PaulFertser> tarekb: hey :) is that github policy to not allow downloading build artifacts anonymously?
<Thomas3> super useful to have those automatic build btw. compiling yourself isnt really a problem but a bit of a turnoff if you are not even sure it will fix the problem.
<PaulFertser> Thomas3: thank tarekb :)
Thomas3 has quit [Quit: Ping timeout (120 seconds)]
<tarekb> hey PaulFertser:
<tarekb> lemme check what the policy says
<tarekb> release artifacts are OK (without logging in), but actions' artifacts are not
<tarekb> and here come the latest release, where you can get the master HEAD binaries
dekenevs is now known as kitzman
<PaulFertser> tarekb: so I should add to the blog info that one needs to be logged in to download for HEAD?
<karlp> the "releases" page is probably enough, as it's always the latest.
<karlp> there's very few people who really need "the latest from 3 commits ago" artifacts
<tarekb> nah the latest release (aka head) is accessible without logging
<tarekb> this is always updated to point to head
<tarekb> and accessible without logging
<karlp> yeah, that's a good one.
<karlp> but "releases" doesn't imply "also latest head" to me,
<tarekb> correct
<karlp> and there's a second link on the "getting openocd" page that talks about "also every commit" and that's the one that goes to the list of all artifacts that needs logging in
<tarekb> we can add this clearly in the website
<karlp> I suggest rewording that line.
<karlp> "The official Github mirror automatically generates Windows binary archives for (releases)[https://github.com/openocd-org/openocd/releases/latest] as well as (latest development)[https://github.com/openocd-org/openocd/releases/tag/latest]"
<tarekb> maybe sthg like:
<tarekb> The official Github mirror automatically generates Windows binary archives for releases<https://github.com/openocd-org/openocd/releases> and all master commits<https://github.com/openocd-org/openocd/actions/workflows/snapshot.yml> (requires logging).
<tarekb> note: the head of master branch is build and saved in <https://github.com/openocd-org/openocd/releases/tag/latest>
<tarekb> we sent it out in the same time hehe
<tarekb> both work for me
<tarekb> ;)
<karlp> "Builds from (all development commits)[https://github.com/openocd-org/openocd/actions/workflows/snapshot.yml], not just most recent, are also available, but you will need to be logged into github to access the artifacts."
<karlp> I'd really downplay or even remove the workflow actyions links, it's pretty niche to want them.
<tarekb> it was meant for windows users who wants the functionally bisect openocd
<karlp> sure, but I'd play that lower down the list
<tarekb> also could be interesting to have it if we have a broken "head"
<tarekb> agree, that works too
Guest39 has joined #openocd
Guest39 is now known as tinker00
<tarekb> kalp: est ce que tu peux commiter ça dans gerrit
<tarekb> karlp: oops sorry, I have switched to french unconsciously
<tarekb> do you want to push this to gerrit ?
<PaulFertser> fwiw you can clone from ssh://YOURUSER@openocd.zylin.com:29418/openocd-org.git
<karlp> nope, not dealing with gerrit today :)
<PaulFertser> Then make a commit, push to refs/for/master
<karlp> fuckin I guess i went and wrote it all
<PaulFertser> No need to deal with gerrit for this task actually.
<PaulFertser> :)
<karlp> that's a different damn repo
<tarekb> PaulFertser: your comment on the segfault with STM32WL was gold
<tarekb> I finally opted to the check you proposed ;)
<karlp> fucking git authorshop bullshit
<karlp> git commit --amend --author <what gerrit knows about> and repush -> still complains about the old one
<karlp> so thats it. lunch, window's ove
<karlp> somene lse can apply it if they want: https://paste.jvnv.net/view/b3MTj
<tarekb> I will do and keep you as author :D
tinker00 has quit [Quit: Client closed]
<karlp> thanks!
<PaulFertser> tarekb: haha, thank you :)
Guest39 has joined #openocd
emeb has joined #openocd
nerozero has quit [Ping timeout: 252 seconds]
bruno20 has joined #openocd
<bruno20> hello everyone, I trying to flash a board which has at32f403 chip, but got an error/info
<PaulFertser> bruno20: hi
<PaulFertser> bruno20: please use some pastebin to show the log
<bruno20> Open On-Chip Debugger 0.9.0 (2015-07-26-16:02)
<bruno20> Licensed under GNU GPL v2
<bruno20> For bug reports, read
<bruno20> Info : auto-selecting first available session transport "hla_swd". To
<bruno20> override use 'transport select <transport>'.
<bruno20> Info : The selected transport took over low-level target control. The
<bruno20> results might differ compared to plain JTAG/SWD
<bruno20> Info : clock speed 1000 kHz
<bruno20> I got the following error
<PaulFertser> bruno20: please do not paste to public channel more than 3 lines ever, use some pastebin service.
<bruno20> oh ok, sorry
<PaulFertser> bruno20: 0.9.0 is super-old, you should try the latest 0.11.0 release for starters.
<bruno20> sorry
<bruno20> it's 0.11.0
<PaulFertser> But it says "Open On-Chip Debugger 0.9.0 (2015-07-26-16:02)"
<bruno20> I paste it using other version, I updated to 0.11.0 and got the same error
<bruno20> now it's Open On-Chip Debugger 0.11.0
<bruno20> it has the same error message
<bruno20> any insight?
<PaulFertser> bruno20: I see no message, please use some pastebin to show the log.
<PaulFertser> bruno20: along with the full invocation command line and config file if you use one.
<bruno20> oh ok
<bruno20> well, I'm trying to flash my board
<bruno20> using the command:
<bruno20> openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -c init -c "reset halt" -c "stm32f1x unlock 0"
<bruno20> but as I mentioned got the error open failed in the end
<PaulFertser> OK, now I need the log.
<PaulFertser> Full log please :)
gnom has quit [Read error: Connection reset by peer]
gnom has joined #openocd
<bruno20> Open On-Chip Debugger 0.11.0
<bruno20> Licensed under GNU GPL v2
<bruno20> For bug reports, read
<bruno20> Info : auto-selecting first available session transport "hla_swd". To
<bruno20> override use 'transport select <transport>'.
<bruno20> Info : The selected transport took over low-level target control. The
<bruno20> results might differ compared to plain JTAG/SWD
<bruno20> Info : clock speed 1000 kHz
<bruno20> Error: open failed
<bruno20> you mean that one?
<PaulFertser> bruno20: do not paste logs here PLEASE
<bruno20> oh sorry
<PaulFertser> bruno20: rerun the same command with -d3 and show me full log. This one with "open failed" doesn't show enough info, so we need more debugging. Also, please show "lsusb" output from that machine.
<bruno20> ok
<PaulFertser> bruno20: do you have stlink? What version? Original/clone?
<bruno20> well, my board is from a hoverboard and it has at32f403 chip I think it's a clone of stm32...
<PaulFertser> bruno20: yes, but what debug adapter are you using?
<bruno20> st-link v2
<PaulFertser> bruno20: ok now show me the log please
<bruno20> lsusb:
<bruno20> bus 001 device 002: ID80EE:0021 VirtualBox USB Tablet
<bruno20> bus 001 device 001: ID1d6b:0001 Linux foundation 1.1 root hub
<PaulFertser> bruno20: use some pastebin to show FULL OUTPUT
<PaulFertser> bruno20: are you running OpenOCD inside virtualbox? How did you make stlink available inside of it?
<bruno20> yes
<bruno20> I'm using the openocd on vm
<bruno20> no idea it's recognizing the st link
<bruno20> if*
<PaulFertser> bruno20: your stlink is connected to your real computer, why would it be available in the vm?
<bruno20> because seems that it's the simplest way to reprogram the board I have
<bruno20> I searched for how to flash and reprogram the board which has at32f403 and there's info only using linux
<bruno20> so I installed vm with ubuntu
<PaulFertser> bruno20: that's not my question
<PaulFertser> bruno20: OpenOCD runs about the same on all common operating systems.
<bruno20> oh sorry, I'll search for how to make it available in the vm then
<PaulFertser> So I can't see why you need a VM really.
<bruno20> linux with openocd seems to be easier to perform commands
<PaulFertser> Why do not you always use GNU/Linux then if it's easier for you?..
<PaulFertser> bruno20: in any case, if stlink is not present in lsusb then obviously OpenOCD can do nothing with it.
<bruno20> oh ok
<bruno20> I'll search for how to make it available then
sbach has quit [Read error: Connection reset by peer]
sbach has joined #openocd
Guest39 has quit [Quit: Client closed]
<tarekb> PaulFertser: Why do not you always use GNU/Linux then if it's easier for you?..
<tarekb> I feel you, but I'm still on windows but doing development on VM
<tarekb> because simply I do have other tasks on windows :'(
<nohit> i just started using WSL2 last week, it seems pretty good
<nohit> well openocd didnt work with WSL2 but luckily it works with WSL1 and its easy and fast switching between them
<PaulFertser> tarekb: I'm always using only GNU/Linux
<bruno20> hey paul, now I know that ubuntu is reading st link
<bruno20> lsusb is showing st link
<bruno20> when I tried to execute the command openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -c init -c "reset halt" -c "stm32f1x unlock 0"
<bruno20> now is appearing another error
<bruno20> libusb_open() failed with libusb_error_access
<bruno20> any insight
<tarekb> bruno20: are you compiling your own openocd, if so please update the udev rules
<bruno20> I just added a condition to recognize the at32f403 chip
<bruno20> in the file src/flash/nor/stm32f1x.c
<bruno20> I added case 0x242: /* AT32F403 */
<bruno20> page_size = 2048;
<bruno20> stm32x_info->ppage_size = 2;
<bruno20> max_flash_size_in_kb = 512;
<bruno20> break;
<bruno20> only that
<tarekb> don't care about the device yet
<tarekb> there is an error before that, and you have no access to the stlink
<bruno20> yes
<tarekb> therefore you need to ensure the connection with stlink
<bruno20> well, I think it's connected because lsusb is showing st link
<tarekb> you said lsusb listed the stlink, so the issue could be an access issue as the error indicates
<bruno20> yes
<tarekb> one common problem is that you need to copy the "contrib/60-openocd.rules" to "/etc/udev/rules.d/" and reload the rules
<tarekb> you can reload the rules using "udevadm control --reload"
<bruno20> let me try to do that
<bruno20> well
<bruno20> the error disappeared
<bruno20> but still got error: open failed
<bruno20> well
<bruno20> the error has changed
<bruno20> lol
<PaulFertser> tarekb: thank you so much with helping with clone stlink to access a clone ST chip :)
<bruno20> thank you very much
<PaulFertser> bruno20: when you say "the error" also show a link to some pastebin so that all the errors are seen in context
<PaulFertser> bruno20: it's a bin unusual as Tarek works for ST.
<bruno20> oh let me send it
<bruno20> error: expected 1 of 1: 0x1ba01477
<bruno20> warn: UNEXPECTED idcode: 0x2ba01477
<PaulFertser> bruno20: change the target config then, as original stm32f1x is cortex-m3 and your clone is cortex-m3+ or something?
<PaulFertser> bruno20: you can just add -c "set CPUTAPID 0x2ba01477" before -s target/stm32f1x.cfg
<PaulFertser> (instead of changing the target config)
<bruno20> oh let me try
<tarekb> PaulFertser: that's me on my spare time :D
<bruno20> you mean add in the command line?
<bruno20> just to summarize I execute the command
<bruno20> openocd -f interface/stlink.cfg -f target/stm32f1x.cfg -c init -c "reset halt" -c "stm32f1x unlock 0"
<bruno20> you are saying to add -c "set CPUTAPID 0x2ba01477"?
<PaulFertser> tarekb: really grateful for that
<PaulFertser> bruno20: yes, before -f target config.
<bruno20> oh
<bruno20> right now is listening
<bruno20> on port 666 for tcl and 4444 for telnet
<PaulFertser> bruno20: probably it's time to read the OpenOCD user's manual then ;)
<bruno20> uau
<bruno20> omg!
<PaulFertser> bruno20: good luck, I'm going to sleep now, see you later.
<bruno20> thank you paul
<PaulFertser> Enjoy your hover board hack :)
<bruno20> really appreciate it!
bruno20 has quit [Quit: Client closed]
loki_val has joined #openocd
crabbedhaloablut has quit [Ping timeout: 276 seconds]
tarekb has quit [Read error: Connection reset by peer]
marex has quit [Ping timeout: 245 seconds]
Guest39 has joined #openocd