NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
jancoow has joined #openocd
c4017w has joined #openocd
c4017w__ has quit [Ping timeout: 240 seconds]
c4017w_ has joined #openocd
c4017w has quit [Ping timeout: 250 seconds]
tsal has quit [Ping timeout: 256 seconds]
c4017w__ has joined #openocd
tsal has joined #openocd
c4017w_ has quit [Ping timeout: 250 seconds]
thinkfat_ has joined #openocd
thinkfat has quit [Ping timeout: 250 seconds]
Bertl_oO is now known as Bertl_zZ
c4017w_ has joined #openocd
c4017w__ has quit [Ping timeout: 256 seconds]
c4017w__ has joined #openocd
c4017w_ has quit [Ping timeout: 250 seconds]
renrelkha_ has quit [Remote host closed the connection]
renrelkha has joined #openocd
c4017w_ has joined #openocd
c4017w__ has quit [Ping timeout: 256 seconds]
<olerem> lol, nowdays i'm busy to fix ancient drivers for old HW. Becouse the industry can get only old/depricated chips :D
nerozero has joined #openocd
<olerem> actually it is not so bad. finally we have resources to make better drivers instead of fighting against windmills
sbach has quit [Read error: Connection reset by peer]
sbach has joined #openocd
c4017w__ has joined #openocd
c4017w_ has quit [Ping timeout: 250 seconds]
c4017w_ has joined #openocd
c4017w__ has quit [Ping timeout: 240 seconds]
<bencoh> yeah it's actually better than racing to new-but-not-better hw every year just because it's hype-new
<jancoow> Hi. So, I didn't have trouble with many boards, but now I've two atsaml21e18b which won't be able to use "flash write_image erase unlock image.hex". I'm receiving this error: Error: SAMD: NVM programming error Error: Failed to erase row containing 0000f200 Error: SAMD: failed to erase sector 242 at 0x0000f200 Error: failed erasing sectors 64 to 848
<jancoow> When I remove the "erase" portion of the flash command, it works fine
<jancoow> I also ran a verify after it and that also confirmed it flashed correctly without the erase option
<jancoow> so.. I'm not sure if I should use that erase option. I'm doing a chip-erase at the start of the programming session anyways
Krazubu has joined #openocd
c4017w__ has joined #openocd
c4017w_ has quit [Ping timeout: 260 seconds]
Haohmaru has joined #openocd
c4017w_ has joined #openocd
c4017w__ has quit [Ping timeout: 240 seconds]
Krazubu has quit [Quit: Textual IRC Client: www.textualapp.com]
c4017w__ has joined #openocd
wingsorc has quit [Quit: Leaving]
c4017w_ has quit [Ping timeout: 250 seconds]
c4017w_ has joined #openocd
c4017w__ has quit [Ping timeout: 250 seconds]
<rkta> So, I can connect with my jlink to the RPi pico using 'openocd -f "interface/jlink.cfg" -c "transport select swd" -c "adapter speed 1000" -f "target/rp2040-core0.cfg". But I cannot connect with gdb. Here is the complete log when running with -d3: http://vs.rkta.de/files/rp2040_d3.log
Bertl_zZ is now known as Bertl
c4017w__ has joined #openocd
c4017w_ has quit [Ping timeout: 250 seconds]
c4017w_ has joined #openocd
c4017w__ has quit [Ping timeout: 240 seconds]
wingsorc has joined #openocd
c4017w__ has joined #openocd
c4017w_ has quit [Ping timeout: 240 seconds]
c4017w_ has joined #openocd
c4017w__ has quit [Ping timeout: 240 seconds]
<PaulFertser> rkta: probably the target is in some weird state during that.
<PaulFertser> rkta: are you sure this OpenOCD version is known to work with rp2040? Probably they have published some patches which are not upstream yet?
Bertl is now known as Bertl_oO
Hawk777 has joined #openocd
c4017w__ has joined #openocd
c4017w_ has quit [Ping timeout: 240 seconds]
Haohmaru has quit []
<rkta> PaulFertser: no, I don't know if this OpenOCD version (which is the current master) is known to work with rp2040. That's why I asked yesterday if someone managed to do this.
<borneoa_> rkta: if I remember correctly, rp2040 requires swd multidrop, that is already merged. But Tomas validated the patches against another pair of devices, not rp2040
c4017w_ has joined #openocd
c4017w__ has quit [Ping timeout: 250 seconds]
tchebb_ has joined #openocd
tchebb has quit [Ping timeout: 240 seconds]
<rkta> borneoa_: I read something about multidrop, I guess you remember correctly. I don't understand much (if any) about this topic, though. Can I provide more info or test something to help getting this working?
<borneoa_> rkta: there was an initial patch from RPi https://review.openocd.org/c/openocd/+/4935
<borneoa_> rkta: but was not ready for merge. Then Tomas made his own version, but testes on other devices
<borneoa_> rkta: rp2040 has 2 cortex-m on the same swd port but instead of using 2 access ports it uses 2 swd dap in multidrop configuration
nerozero has quit [Ping timeout: 240 seconds]
<borneoa_> rkta: I reviewed the patches without testing them
<borneoa_> rkta: if you succeed to get it working for rp2040, please report it here
<rkta> borneoa_: I have no idea how to proceed. I see there is a openocd fork from RPi, I'll check this out. Maybe I get some helpful logs from this. I'll report back. I'd like to keep my workflow.
<borneoa_> rkta: maybe looking at the original patch from RPi. But it does not include the TCL script because at that time the rp2040 was still not disclosed
<borneoa_> rkta: but there is one script already upstream for rp2040....
<rkta> borneoa_: yes, ...core0.cfg, the RPi fork has a rp2040.cfg
<borneoa_> rkta: do they use the same code we have upstream or the old multidrop proposal?
<rkta> borneoa_: I don't know, haven't looked into it in detail, yet.
<rkta> Ok, so they have it working, but failed to submit it in a form that would be accepted from upstream, right?
<borneoa_> rkta: yes
<rkta> I just read the comments on gerrit, it's a pity they didn't come back with a review since April 2021...
<rkta> That's not how open source is supposed to work
wingsorc has quit [Quit: Leaving]
<PaulFertser> rkta: it should be easy for you to try their version
<PaulFertser> rkta: and compare the logs
<rkta> PaulFertser: will do and come back with the logs
<rkta> can I somehow 'subscribe' to the gerrit patch? I want to get an email if something happens.
c4017w__ has joined #openocd
c4017w_ has quit [Ping timeout: 260 seconds]
<rkta> And yes, I have an account.
<PaulFertser> rkta: then yes, add yourself to Cc list.
<PaulFertser> rkta: but it's not like anything will happen on the original patch I think.
<rkta> PaulFertser: just in case, where is this cc list? that ui is confusing
<rkta> ah, it's behind show more
<PaulFertser> rkta: hm, current docs say dap_create should have -dp-id and -instance-id
<PaulFertser> rkta: and in your config they're lacking
<rkta> PaulFertser: that's the current master. I can try a clean install in case something is messed up.
<PaulFertser> rkta: oh, and I might have misguided you regarding jlink support, I'm not sure anymore, the docs say only "cmsis_dap (use an adapter with CMSIS-DAP version 2.0), ftdi, all bitbang based." support multidrop, but that should be fixable for jlink too.
<PaulFertser> rkta: no, it needs some digging, clean install can't help.
<PaulFertser> rkta: really sorry, I somehow have forgotten this rp2040 thing is multidrop.
<rkta> PaulFertser: np, I/we learned something atleast ;)
<rkta> To sum it up, with a different probe it might work, but not with a jlink.
<PaulFertser> rkta: I see no upstream configs have -dp-id specified yet.
<PaulFertser> rkta: no, it won't with this config.
<rkta> PaulFertser: Shouldn't be too hard, if it's only config. I could try the config from the RPi fork.
<PaulFertser> rkta: the config file you're using is for pico-debug. It's when one core of rp2040 runs special debug firmware, and another you debug. Without any additional debuggers.
<rkta> PaulFertser: ah, ok.
<PaulFertser> rkta: give that a try: https://github.com/majbthrd/pico-debug
<rkta> PaulFertser: will do, thanks. But I still would like to have it working without such things. :)
<PaulFertser> rkta: indeed, for that you should try creating a config using those multi-drop dp-id and instance-id parameters.
<rkta> PaulFertser: yep, that's the config I was talking about. I'll give it a try and report back with a -d3 log.
<PaulFertser> rkta: found something https://github.com/raspberrypi/openocd/issues/9
<PaulFertser> rkta: see, they have a jlink working branch.
<rkta> PaulFertser: nice, now I have something to do on the weekend. :)
<rkta> let's if it works and then poke them to send it upstream
zjason` has joined #openocd
zjason has quit [Ping timeout: 240 seconds]
c4017w_ has joined #openocd
c4017w__ has quit [Ping timeout: 250 seconds]
cambrian_invader has joined #openocd
c4017w__ has joined #openocd
c4017w_ has quit [Ping timeout: 245 seconds]
<cambrian_invader> how do I use the hwthread rtos?
<cambrian_invader> I specified `-rtos hwthread` when creating my targets
<cambrian_invader> but I only see one thread in gdb
<karlp> are the other cores alive? does the target know about them?
<karlp> that's all you should need as i understand it, but i've never used it sorry.
<cambrian_invader> yes and yes
<cambrian_invader> here's my log https://paste.debian.net/1230600/
c4017w_ has joined #openocd
<cambrian_invader> ah, I had to use -coreid
* karlp cheers
<karlp> excellent
c4017w__ has quit [Ping timeout: 256 seconds]
<cambrian_invader> this stuff should really be documented
<cambrian_invader> all the in-tree scripts use -rtos hawt still...
<karlp> that's a shame :(
<karlp> the hawt to hwthread naming was done during review, to try and pick a magic word that was a bit easier to find
<karlp> looks like the configs didnt get changed :(
<cambrian_invader> from what I can tell this was merged 5 years ago
<cambrian_invader> I guess people just don't update scripts
<karlp> that long ago already? that... feels like too long
<karlp> I think it's more that _very_ few people use it, and they never share their own configs because they're normally "doing somethign important"
<cambrian_invader> idk, seems pretty essential for debugging a multi-processor system
<cambrian_invader> the other thing I'm having trouble with is etm
<cambrian_invader> the command is just missing, even though the file is compiled in
<cambrian_invader> oh, and what happens if you want to debug an rtos on a multi-core system?
<karlp> I personally don't :) and I'm just another user, but my _feeling_ frrom the cortex-a level people that drive by, is that _nothing_ gets proposed back in any way shape or form. people hack enough shit locally to get their bootoader running or whatever, and then it's dropped, never heard from again, no further information...
<cambrian_invader> I personally had to use a vendor openocd fork for a particular processor and it was awful; had to re-launch openocd to change cores
<cambrian_invader> I looked at upstreaming things but it was an absolute mess to untangle
<karlp> and that seems to be what people leave it at... and so the next person comes along to the same ball of shit :)
<karlp> not blaming you at all, not in the least,
<karlp> but that seems to be the way things have been going
<karlp> perhaps I'm too pessimistic, there have been a couple of people doing more work on cortex-a stuff, but it still feels like a warzone.
c4017w__ has joined #openocd
c4017w_ has quit [Ping timeout: 256 seconds]
c4017w_ has joined #openocd
c4017w__ has quit [Ping timeout: 256 seconds]