NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
nmschulte has joined #openocd
<nmschulte> I'm looking for a kit to allow interfacing generically w/ e.g. SPI, I2C, CAN, devices/chips; like the Dangerous Prototypes Bus Pirate provides. Is this something I can do w/ OpenOCD and a compatible board?
<josuah> nmschulte: I do not think OpenOCD is meant to access generic protocols
<josuah> but rather to provide a link to microcontrollers for debugging and programming them
<josuah> so rather to be a way to access signals and protocols, it would be a way to access microcontroller debug ports
<nmschulte> I concur, that's what I'm finding too
<nmschulte> Not much outside of JTAG, except flash and some RAM utils
<josuah> nmschulte: what would permit to access the various protocols would be some FTDI chip, or an alternative since they is a shortage of FTDI chips since a few months
<nmschulte> FWIW, I also found this really cheap kit, but only provides an API vs e.g. Bus Pirate which provides a terminal interface: https://www.tindie.com/products/johnnywu/ch347-development-board/ (http://www.wch-ic.com/products/categories/62.html?pid=1) -- it seems great but my goal is to avoid writing software at the moment.
<josuah> wch makes some slower speed, and much less expensive chips that are not in shortage
<josuah> there might be some software to access various protocols through these chips, but what would you write on the other end?
<josuah> this is an option as well, but also list alternatives on a summary chart: https://www.crowdsupply.com/1bitsquared/glasgow
<nmschulte> I appreciate the insight. Bus Pirate v4 is out of stock. CH347 is USB2HS, w/ 36 MHz SPI, 60 MHz JTAG.
<nmschulte> I just want to poke a few registers of an SPI chip at the moment; read some diagnostic information.
<josuah> what about some microcontroller and a library?
<josuah> (would save you shipping time)
<nmschulte> want to avoid writing the code/interface: I have plenty of PIC and STM µC and some boards about though.
<josuah> do you have an RP2040?
<nmschulte> probably wouldn't be too bad to do what I need.
<nmschulte> I am receiving an STLINK V3 tomorrow which should also be capable: https://www.st.com/en/development-tools/stlink-v3-bridge.html
<nmschulte> I do not have RP2040, never heard of it actually. I do have RPi 3 and 4.
<nmschulte> And some Pine64 SBC/gear, and others.
<josuah> maybe openFPGALoader + some dongle can help, as many FPGA are programmed through an SPI chip
<josuah> I kind of prefer STM32 to RP2040 to be honest :3 I just happened to have something at hand for RP2040
<josuah> maybe you could try TinyUF2 as well
<josuah> hmm, would need adaptations, as it is made to program the MCU it is running onto (as a bootloader)
<josuah> I feel silly to not have a tool at hand for such an essential task ^_^'
<nmschulte> I feel the same!
<josuah> I usually program SPI flash as part of some operation, like FPGA programming, so using openFPGALoader for that
<nmschulte> I have decoders and analyzers, but nothing that can transact
<josuah> and in the end, openFPGALoader does just that, and supports plenty of different cihps
<josuah> it supports a few buspirate alternatives
<nmschulte> I'll try with the STLINK V3 tomorrow, hopefully MINIE has the ability; if not, burn a PIC w/ some code and UART log, and/or buy a Bus Pirate (and probably a wch board).
<josuah> That crowdsupply glasgow link above lists 8 alternatives to buspirate
<nmschulte> awesome, looking.
<nmschulte> BP v4 seems great, but non-stock. v3.6 is slower but stocked.
<josuah> to which I would add the list from openFPGALoader
<nmschulte> Oh, these are the Black Magic probe folks?! (1bitsquared)
<josuah> among other things, yes :)
<josuah> orbtrace from 1bitsquare crew as well
<josuah> these are separate projects maintained by separate people, with a lot of contributors in common (some of which might also have pushed onto OpenOCD)
<josuah> That openFPGALoader.txt lists plenty of programmers supported by this software, but these are all programmer dongles
<nmschulte> very cool; I prodded BMD yesterday and they were very responsive: https://github.com/blackmagic-debug/blackmagic/issues/1358
<nmschulte> w/ openFPGALoader, I can send arbitrary SPI?
<josuah> dragonmux never sleep I think
<josuah> nmschulte: not sure you can, the most interesting bit is the list of hardware dongles it collected
<nmschulte> thanks
Hawk777 has joined #openocd
nmschulte has quit [Quit: Lost terminal]
nerozero has joined #openocd
diddly has quit [Ping timeout: 260 seconds]
diddly has joined #openocd
Hawk777 has quit [Quit: Leaving.]
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
Haohmaru has joined #openocd
giorgiogiorgi has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
Guest96 has joined #openocd
giorgiogiorgi has quit [Quit: Ping timeout (120 seconds)]
erhankur has quit [Remote host closed the connection]
PsySc0rpi0n has quit [Ping timeout: 252 seconds]
PsySc0rpi0n has joined #openocd
erhankur has joined #openocd
giorgiogiorgi has joined #openocd
Guest96 has quit [Ping timeout: 260 seconds]
<giorgiogiorgi> hello! I'm trying to implement the removal of FAP (equivalent of RDP in STM32) for AT32F4xx chipsets. I'm struggling with it and would like to see if someone is familiar. Artery chipsets are similar to STM but not a perfect clone. They use CMIS-DAP standard or JLink debugger, but don't leverage St-Link additional features. However, the current
<giorgiogiorgi> driver is quite inspired from the STM32F1x one. Currently, this part of the code returns an error:
<giorgiogiorgi> COMMAND_HANDLER(at32x_handle_unlock_command) {
<giorgiogiorgi> [***]
<giorgiogiorgi>   int retval = CALL_COMMAND_HANDLER(flash_command_get_bank, 0, &bank);
<giorgiogiorgi>   if (retval != ERROR_OK)
<giorgiogiorgi>    return retval;
<giorgiogiorgi> the error is Please select the matching algorithm, auto_probed failed
<giorgiogiorgi> While the proper algorithm is selected when I open the connection with openOCD ./.. :(
<giorgiogiorgi> also, is it normal that a read_memory command returns 0x0 for the bytes corresponding to the User Data flash address which should display that the MCU is in RDP1 ? I ws expecting to see 0xCC which says it's RDP1/FAP1
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
erhankur has quit [Ping timeout: 260 seconds]
crabbedhaloablut has quit [Ping timeout: 255 seconds]
crabbedhaloablut has joined #openocd
giorgiogiorgi has quit [Quit: Ping timeout (120 seconds)]
erhankur has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
merethan_ has joined #openocd
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #openocd
Guest55 has joined #openocd
Guest55 has quit [Client Quit]
Guest99 has joined #openocd
Guest99 has quit [Client Quit]
alxsob has joined #openocd
alxsob has quit [Client Quit]
alxsob has joined #openocd
<alxsob> HI everyone, can anybody help me with boundary scan a STM32F411RET6 ?
<alxsob> or general understanding at least
erhankur_ has joined #openocd
erhankur has quit [Ping timeout: 260 seconds]
erhankur_ has quit [Read error: Connection reset by peer]
erhankur has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
alxsob has quit [Quit: Client closed]
giorgiogiorgi has joined #openocd
giorgiogiorgi has quit [Quit: Ping timeout (120 seconds)]
giorgiogiorgi has joined #openocd
giorgiogiorgi has quit [Quit: Ping timeout (120 seconds)]
giorgiogiorgi has joined #openocd
giorgiogiorgi has quit [Quit: Ping timeout (120 seconds)]
olerem has quit [Ping timeout: 248 seconds]
giorgiogiorgi has joined #openocd
giorgiogiorgi has quit [Ping timeout: 260 seconds]
olerem has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
shibboleth has joined #openocd
shibboleth has quit [Remote host closed the connection]
shibboleth has joined #openocd
erhankur has quit [Ping timeout: 246 seconds]
merethan_ has quit [Remote host closed the connection]
merethan_ has joined #openocd
wingsorc__ has quit [Quit: Leaving]
wingsorc has joined #openocd
nerozero has quit [Ping timeout: 260 seconds]
erhankur has joined #openocd
shibboleth has quit [Quit: shibboleth]
Haohmaru has quit [Remote host closed the connection]
merethan_ has quit [Ping timeout: 260 seconds]
PsySc0rpi0n has quit [Read error: Connection reset by peer]
renrelkha has quit [Quit: bye]
renrelkha has joined #openocd
kaichiuchi has joined #openocd
<kaichiuchi> question
<kaichiuchi> when using openocd, I’m getting “clearing lockup after double fault”
<kaichiuchi> however, if I don’t use openocd, my embedded device boots up fine
<kaichiuchi> any ideas what could be causing this?
<PaulFertser> kaichiuchi: hi
<PaulFertser> kaichiuchi: what exactly are you doing with openocd?
<kaichiuchi> the command i’m using is: openocd -f interface/jlink.cfg -c “transport select swd” -f target/stm32f4x.cfg
<PaulFertser> Just that? And with that the target doesn't boot up?
<kaichiuchi> just that command, yes
<PaulFertser> And do you power on the target after that or what?
<kaichiuchi> if the target is already booted, and I run that openocd command
<kaichiuchi> it dies
<PaulFertser> Are you reverse engineering?
<kaichiuchi> no
<kaichiuchi> this is for work related reasons and I kinda need this to work sadly
<kaichiuchi> (it’s for a security related reason)
<PaulFertser> I mean if you have proper control over firmware can you try flashing something minimal to see if it reproduces?
<kaichiuchi> well I went so far as to do a full chip erase and try
<kaichiuchi> still the same issue
<kaichiuchi> and that stumps me
<PaulFertser> And try what? With full chip erase double fault is expected because flash is all blank and trying to boot from it makes the target double fault.
<kaichiuchi> ah
<kaichiuchi> well, I can try
<PaulFertser> It's probably something fancy in your firmware that makes it die on debugger attached. Probably it tries using semihosting or probably detects debugger "for security reasons" etc.
<PaulFertser> So it makes sense to try with everything commented out first.
<kaichiuchi> I can debug this with IAR no problem
<PaulFertser> And then you can bisect to see what exactly is making the target not tolerate debugger attachment.
<kaichiuchi> that’s what’s confusing me
zjason`` has joined #openocd
<kaichiuchi> dunno how IAR works but openocd doesn’t
<PaulFertser> Is your target really stm32f4 ?
<kaichiuchi> absolutely
<kaichiuchi> we are on an STM32F446
<PaulFertser> kaichiuchi: you can try making a copy of stm32f4.cfg and commenting out writes from examine-end handler in there.
<PaulFertser> But it shouldn't be affecting the target anyhow...
zjason` has quit [Ping timeout: 265 seconds]
<kaichiuchi> standby
<kaichiuchi> nope, nothing worked
<PaulFertser> I wonder how exactly the target dies. You can still "halt" and attach GDB to see where it stays, right?
<kaichiuchi> i have telnet
<kaichiuchi> (i’m constrained to windows until a few hours from now)
<PaulFertser> windows can run same openocd and GDB as a standard OS.
<kaichiuchi> and i can’t install gdb on here… yet…
<PaulFertser> You can attach IAR to see what state the target is in after it "dies" :)
<PaulFertser> I remember having openocd running affected timings on stm32l152 firmware in some minimal way, like busy loop was a little bit slower or something like that.
<kaichiuchi> i’ll have to play in a bit
<PaulFertser> kaichiuchi: please do not forget to share your findings :)
<kaichiuchi> i won’t :p
<PaulFertser> kaichiuchi: I hope you're kidding because we're all volunteers here and learning about different interesting cases is part of the fun that allows to keep going.
<PaulFertser> Ah, you won't forget, I see.
<PaulFertser> Thank you :)
<PaulFertser> You can run openocd with -d3 to see all interactions it has with the target. But there's really nothing fancy after basic examination, it just polls it to see if it halted or not. And polls you can disable too.
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
Guest80 has joined #openocd
Guest80 has quit [Client Quit]
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd