NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
ianstcdns has joined #openocd
ianstcdns has quit [Quit: Client closed]
marcusmae has quit [Ping timeout: 265 seconds]
marcusmae has joined #openocd
wingsorc__ has joined #openocd
wingsorc has quit [Remote host closed the connection]
Hawk777 has joined #openocd
greenail has quit [Quit: Connection closed for inactivity]
nerozero has joined #openocd
jancoow has quit [Ping timeout: 250 seconds]
urja has quit [Ping timeout: 248 seconds]
jancoow has joined #openocd
russ has quit [Ping timeout: 246 seconds]
russ has joined #openocd
Hawk777 has quit [Quit: Leaving.]
Haohmaru has joined #openocd
russ has quit [Ping timeout: 246 seconds]
russ has joined #openocd
urja has joined #openocd
merethan__ has joined #openocd
wingsorc__ has quit [Ping timeout: 240 seconds]
merethan__ has quit [Remote host closed the connection]
merethan__ has joined #openocd
PsySc0rpi0n has quit [Ping timeout: 256 seconds]
merethan__ has quit [Ping timeout: 248 seconds]
PsySc0rpi0n has joined #openocd
PsySc0rpi0n has quit [Remote host closed the connection]
merethan has joined #openocd
merethan has quit [Remote host closed the connection]
PsySc0rpi0n has joined #openocd
PsySc0rpi0n has quit [Ping timeout: 256 seconds]
tlwoerner has quit [Quit: Leaving]
nerozero has quit [Ping timeout: 240 seconds]
Hawk777 has joined #openocd
Deneb has joined #openocd
<Deneb> I have the basics of getting OpenOCD to work with my Olimex adapter, but am having difficulty getting it to work with a Pico over SWD
<Deneb> I have used -f interface.rp2040.cfg but end up getting: 'Missing CHIP TAP OPTIONS'
<PaulFertser> Deneb: hi
<Deneb> Hi Paul
<PaulFertser> Deneb: I hope you're using only the config files that come with OpenOCD release you're running?
<PaulFertser> Deneb: please use some pastebin to show -d3 output along with the full invocation command line.
<Deneb> yes. I initially tried the vanilla version of openocd, but then, on advice, tried the Raspberry Pi version
* Deneb goes to sort the pastebin as requested
<Haohmaru> why does everybody and their grandma's dog seem to have their own version of openocd >:/
<Deneb> I have only seen the vanilla version and the raspberry version
<PaulFertser> There is no raspberrypi version afaik.
<PaulFertser> Deneb: the problem is your -c "swd newdap", why is there? Everything should be part of upstream config already.
<Deneb> I was directed to add it by and error message. I just removed it. I didn't get the previous error message, but it did fail with 'DAP init failed'
<Deneb> Command 'dap init' failed with error code -4
<Deneb> the next message is 'Failed to select core 0....
<PaulFertser> Deneb: do you actually have the additional olimex SWD adapter?
<Deneb> BTW, do I need to use the RPi version of openocd, or should it work with the vanilla version nowdays?
<PaulFertser> Deneb: I have no idea about RPi version of openocd. I know current upstream release works properly with rp2040.
<Deneb> ah, Ok, that's helpful to know it should work. When I referred to 'vanilla' version I meant from openocd.org.
<PaulFertser> Deneb: so do you have the SWD adapter?
<Haohmaru> genuine openocd
<Deneb> Open On-Chip Debugger 0.12.0-rc2+dev-00037-g77c281d2d (2022-12-25-19:14)
<Deneb> so its quite recent
<Haohmaru> this is the xmas edition ;P~
<Deneb> Paul, sorry, yes, I do have the SWD adapter connected directly to the ARM-USB-OCD-H
<Deneb> I have SWDIO connected to pin 7 and SWDCLK to pin 9, and a GND connection to pin 6.
<Deneb> the only clue I got was for the SWDIO pin which is defined in the Olimex SWD config file as being mapped to TMS which is on pin 7.
<Deneb> PS, I have not previously used the adpater so this is its "test run"
<Deneb> I have no idea whether I am using the correct pin for SWDCLK however. I did trawl the documentation but there seems to be little eklse other than having the SWD plugged directly onto the Olimex. I was hoping to find a wiring diagram, but unfortunately didn't find one.
<PaulFertser> Deneb: do you also have Vcc connected?
<Deneb> no
<Deneb> just GND, SWDIO and SWDCLK
<PaulFertser> You need it on pin 1
<PaulFertser> SWDCLK goes to TCK
<Deneb> let me try...
<PaulFertser> SWDIO to TMS
<Deneb> Yes, got that already
<PaulFertser> Target voltage is needed for reference.
<Deneb> Got an error I hve seen beforwe: Failed to connect multidrop rp2040.dap0
<PaulFertser> Deneb: I do not see it in the last paste.
Haohmaru has quit []
<Deneb> Its there in this one: https://dpaste.org/7abMa
<Deneb> what I don't have is an SWDCLK....
<Deneb> there's a circuit diagram for the adapter which I am trying to find....
<PaulFertser> Deneb: it's there on the official Olimex website.
<PaulFertser> Deneb: and SWDCLK goes to JTAG TCK pin.
<Deneb> yeah, I downloaded it somewhere.... Might be quicker to go to the site....
<Deneb> yes, this is what I had determined, but there is no mapping in the .cfg file. Maybe it doesn't need one, i.e. a clock is a clock...
<PaulFertser> Yes, that's not configurable.
<PaulFertser> Are you sure you have the target board powered?
<Deneb> annoying thing about the Pico is it has not powere LED... but yes its powered. I have blink running on it.
<Deneb> I also think I have the connection working now with original openocd...
<Deneb> just going to make a gdb connection and upload something....
<PaulFertser> Deneb: so lack of Vtarget connection it was?
<Deneb> yes, I think so. One of the wires slipped off as well. Re-checkedf and secured then it worked.
<Deneb> Thanks for that tip.
<PaulFertser> :)
<Deneb> OPenocd now listens but the gdb connection keeps dropping immediately. Trying to figure out why.
<PaulFertser> Every decent JTAG or SWD adapter need reference voltage from the target.
<Deneb> yes, I did use the Olimx on an ESPO I think and I rememeber connecting the VREF, but forgot about it this time....
<Deneb> *ESP32
<Deneb> yey! successfully uploaded an .elf file to the Pico.
<Deneb> thanks Paul for your help
<Deneb> has lldb superceded gdb, or is this just an Apple version of gdb?
<PaulFertser> Deneb: neither. Apple version of a debugger, yes.
PsySc0rpi0n has joined #openocd
PsySc0rpi0n has quit [Ping timeout: 265 seconds]
<Deneb> PaulFertser: thanks.
Deneb has quit [Quit: Leaving]
shibboleth has joined #openocd
tlwoerner has joined #openocd
<antto> crApple-bugger
urja has quit [Ping timeout: 276 seconds]
PsySc0rpi0n has joined #openocd
urja has joined #openocd
urja has quit [Read error: Connection reset by peer]
postal_blab has joined #openocd
urja has joined #openocd
shibboleth has quit [Quit: shibboleth]
<postal_blab> hi all. hopefully someone in here can help me with my request. i do have a IoT device with a sama5d26 on it, running some kind of debian. connected to it is a 512mb nand flash (w29n04gvbiaa). i'm able to connect to it via jtag with an arm usb tiny h. my goal is to get a full dump of the nand flash, but so far i'm only able to read 0x1000 0000 bytes from 0xc000 0000, but as i did understand, the flash is mapped in pages. therefore, the
<postal_blab> resulting dump is a mess. i'm still able to read some files and extract them with binwalk, but i would prefer a clean ubifs dump which i can mount. as i'm not pretty new to ARM Cortex stuff, i kinda stuck at the moment. i dont expect a step by step guide ;) but e.g. a hint where i can get documentation for beginners how to propperly configure openocd to recognize the nand flash would be awesome.
<karlp> I think you'd get faster results using the bootloader or jtag if needed to load your own initramfs and just using mtd tools or ubi tools forom linux directly?
<Hawk777> I’m not personally familiar with that part, but OpenOCD has drivers for various kinds of Flash connected to various kinds of interfaces, including NAND Flash. Commands are here <https://openocd.org/doc-release/html/index.html#toc-Flash-Commands-1>. Maybe you can add some of those to your config file and then use the Flash-read command instead of a memory read?
<postal_blab> karlp: as i'm new to arm cortex and the board seems to have no uart exposed for me to read any output, i was thinking that using the fact that the board boots with the existing configuration (jtag is only enabled after a successfull boot) to connect via jtag to it
<postal_blab> Hawk777: i'm realy trying to just use the existing nand interface, but so far i didnt have any luck with it. i'm not even sure if the driver at91sam9 supports the sama5d26
<postal_blab> for example the last config i tried was "nand device bank1 at91sam9 at91sama5d2 0xc0000000 0xF8014000" but this gives just an "invalid target"
<Hawk777> And your target is named “at91sama5d2”?
<Hawk777> I.e. in the output of “targets”?
<Hawk777> You might also need to check if the NAND controller on your chip does live at F8014000. It’s possible that it’s the same hardware, or similar enough that the driver will work, but living at a different address. That would be in the chip documentation.
<postal_blab> F8014000 is address of the ECC module, C0000000 is the address of the NAND flash controller
<postal_blab> targets tells me my target name is "at91sama5d2.cpu_a5.0" but that gives the same error
<postal_blab> oh damn, i'm stupid. maybe i should add the line after the "target create" line....
<Hawk777> Oh, OK, I didn’t actually check the docs for that specific driver. I think you want at91sama5d2.cpu_a5.0 but after the target create line maybe, yeah.
<postal_blab> nand probe fails but i think thats just due to a wrong address for the ecc controller (or at91sam9 does not support the at91sama5d26) but that is a new step for me which i can hopefully figure out on my own :)
<postal_blab> Hawk777: thanks for the help
<Hawk777> No problem, hope you can make some progress!
<postal_blab> me too, would be funny to get a root shell on my central heating unit