NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
c4017w has joined #openocd
tsal has quit [Ping timeout: 252 seconds]
tsal has joined #openocd
Guest35 has joined #openocd
<Guest35> hi guys, can command like cortex_m be used with hla_swd? I tried to use it with stlink dongle but got "invalid command name "cortex_m""
Bertl_oO is now known as Bertl_zZ
nerozero has joined #openocd
JCHammons[m] has joined #openocd
<PaulFertser> Guest35: no, it can't. hla_swd is very limited. But with new enough stlink firmware you can use the "dap" mode.
xantoz has quit [Read error: Connection reset by peer]
xantoz has joined #openocd
Haohmaru has joined #openocd
Hawk777 has quit [Quit: Leaving.]
<karlp> the cortexm profiling works on hla_swd though, at least. though I think that bypasses the cortex_m command,
<karlp> hrm, yeah, iirc I had to hook that up on the side
<karlp> profiling is higher level and has a cortex_m and a hla_target implementaition
<karlp> nvm then :)
<karlp> Guest35: which commands were you hoping to be using?
joconor has quit [Ping timeout: 250 seconds]
Guest35 has quit [Ping timeout: 256 seconds]
joconor has joined #openocd
sbach has quit [Read error: Connection reset by peer]
sbach has joined #openocd
Guest35 has joined #openocd
Guest35 has quit [Client Quit]
Guest35 has joined #openocd
Guest35 has quit [Ping timeout: 256 seconds]
<indy> olerem, hi, were you able to get more informations regarding nexus in rh850?
<olerem> indy: hi. no. I do not have any projects with this chip, so was not trying to get NDA docs
michalkotyla has joined #openocd
michalkotyla has quit [Client Quit]
Bertl_zZ is now known as Bertl
pdgendt has joined #openocd
Guest1258 has joined #openocd
Guest1258 has quit [Client Quit]
Guest1295 has joined #openocd
<Guest1295> Good day.
<Guest1295> This is Keshav from Germany.
<Guest1295> I am a beginner with OpenOCD and TCL programming. I am in the process of trying to find out how to flash multiple STM32 microcontroller targets as JTAG Chain. I am able to individually flash one target at a time. But I need help in understanding how I could do that for more than 1 target in a chain.
<Guest1295> It would be amazing if I am advised on how to proceed with this.
<Guest1295> Thank you.
<Guest1295> I am using a ST-Link v2 debugger
Guest1295 is now known as keshav
<keshav> "C:\Program Files\GNU ARM Eclipse\OpenOCD\0.10.0-201601101000-dev\bin\openocd" -f "C:\Program Files\GNU ARM Eclipse\OpenOCD\0.10.0-201601101000-dev\scripts\interface\stlink-v2.cfg" -f "C:\Program Files\GNU ARM Eclipse\OpenOCD\0.10.0-201601101000-dev\scripts\target\stm32f3x.cfg" -c init -c targets -c "halt" -c "flash  erase_sector 0 0 127" -c
<keshav> "reset halt" -c "flash write_image C:/Users/Buero-1/Desktop/openOCD/init.hex" -c "verify_image C:/Users/Buero-1/Desktop/openOCD/init.hex" -c "reset run" -c shutdown
<keshav> This is the code I execute to flash single STM32 microcontrollers.
<karlp> unrelated, bu you can in general simplifyt that to "openocd -f interface/stlink-v2.cfg -f target/stm32f3x.cfg blah blah"
<karlp> the install path of oocd is implied.
<karlp> I'm not sure the high level interface that stlink provides gives enough access to the jtag chain to do it honestly, but you'll definitely need to add more commands to run in jtag mode.
<karlp> stlink will default to swd, which is single target (stlink doesn't support multidrop at least, and not all targets do either)
<karlp> you might get far enough with -f interface/stlink-v2.cfg -c "transport_select jtag" and see what's autodetected as taps.
<karlp> but not my field sorry
<karlp> you'll benefit a lot from updating to 0.11 as well.
<bencoh> how is that multidrop thing supposed to work though?
<karlp> multidrop swd? don't remember the details, but it's documented on arm if you want to go have a read.
<karlp> but yeah, _very_ few targets that support it, let alone debuggers.
<bencoh> I found a mux from TI
<keshav> Hi again. Thanks for the response. I tried setting it up to Jtag as you mentioned. I might be a bit stupid on how to go around with this since this is probably the first week I am working with OpenCAD and TCL.
<keshav> But I executed this code
<keshav> "C:\Program Files\GNU ARM Eclipse\OpenOCD\0.10.0-201601101000-dev\bin\openocd" -f "C:\Program Files\GNU ARM Eclipse\OpenOCD\0.10.0-201601101000-dev\scripts\interface\stlink-v2.cfg" -f "transport_select jtag" -c
<keshav> and it threw an error that says
<keshav> C:\Program Files\GNU ARM Eclipse\OpenOCD\0.10.0-201601101000-dev\bin\openocd: option requires an argument -- c
<keshav> embedded:startup.tcl:60: Error: Can't find transport_select jtag
<keshav> in procedure 'script'
<keshav> at file "embedded:startup.tcl", line 60
<PaulFertser> keshav: it means what it says
<PaulFertser> keshav: stlink doesn't support jtag
<PaulFertser> keshav: use some proper adapter if you have more than one device on the jtag chain.
<keshav> Hi PaulFertser, thank you for your response.
<keshav> That is a bummer. Is there an adapter that you would recommend in this case?
<PaulFertser> keshav: if you need something fast, right there right now, take raspberrypi or some other single-board computer if you have one around.
<PaulFertser> keshav: if you're doing it for non-commercial purposes, consider getting jlink edu.
<PaulFertser> keshav: you can
<PaulFertser> also get busblaster. Or Olimex. Or TUMPA.
<PaulFertser> Or some reasonable CMSIS-DAP device.
<PaulFertser> Plenty of options.
<karlp> oh, there's hla_jtag
<karlp> stlink does support jtag paul.
<PaulFertser> No, it doesn't really work for anything.
<PaulFertser> iirc it's for TI "icdi" hla.
Bertl is now known as Bertl_oO
<karlp> pretttttty sure it works for stlink as well, but I'm not motivated enough to go and dig out appropriate hardware right now :)
<PaulFertser> keshav: stlink "supports" jtag in a useless way, it's so stupid that nobody bothered to implement it.
<karlp> does dap mode on anewer stlink firmware work then?
<karlp> or is that an swd only mode?
<PaulFertser> I do not remember but probably you can use stlink with jtag only if stm32 is the first on the chain.
<keshav> That means if there are multiple stm32s in the chain, it wont work with ST-link, but if there are other microcontrollers after the stm32, then it would work?
<PaulFertser> keshav: idk and I never saw any reason to bother. It's not like there's shortage of saner debug adapters.
<PaulFertser> keshav: also stlinkv3 seems to be incompatible with everything that's not stm32 _on purpose_ which was plain nasty on the side of the stlink firmware team.
<keshav> Thanks a lot Karl and Paul. I will look more into other adapters that I could use for this application and will get back on this. Thanks again
<PaulFertser> keshav: don't you already have some?
<PaulFertser> keshav: you can even use a "blue pill" for that with appropriate (cmsis-dap) firmware.
<keshav> I unfortunately dont have other adapters except Olimex.
<keshav> And the disadvantage with Olimex is that i am unable to find a driver which works for windows 11 and the last driver available is from 2017
<keshav> I tried to test it to run for single target flashing and it doesnt communicate with win11
<PaulFertser> keshav: Olimex is awesome
<PaulFertser> keshav: and you do not need to be looking for any driver for it dammit
<PaulFertser> keshav: you need WinUSB from Microsoft themselves, and you can install it with Zadig. Read README.Windows in OpenOCD.
<keshav> I istalled the driver through Microsoft and Zadig 2.7 today. But somehow Olimex did not respond in Windows 11 OpenOCD. The same thing worked in Windows 10 with all the same circumstances.
<keshav> That is why I thought of maybe shifting to ST Link v2
<PaulFertser> keshav: did you install it for the composite device parent?
<keshav> Do you mean the first interface (Interface 0) of Olimex?
<PaulFertser> keshav: no, the composite device parent
<keshav> I do not think I did.
<keshav> I installed the driver directly through Zadig as I connected the olimex device
<PaulFertser> keshav: please do
<PaulFertser> Unless windows 11 broke USB in some horrible way it should work...
<keshav> I will try it out for sure.
<keshav> I have an Olimex-arm-usb-ocd-h with me
<PaulFertser> keshav: I have used this device many times, it's quite nice.
<keshav> I have a similar program as mentioned above to run flash on a single target with it. Except the cfg file for olimex differs. Do you think I could run jtag chain with this code?
<keshav> "C:\Program Files\GNU ARM Eclipse\OpenOCD\0.10.0-201601101000-dev\bin\openocd" -f "C:\Program Files\GNU ARM Eclipse\OpenOCD\0.10.0-201601101000-dev\scripts\interface\ftdi\olimex-arm-usb-ocd-h.cfg" -f "C:\Program Files\GNU ARM Eclipse\OpenOCD\0.10.0-201601101000-dev\scripts\target\stm32f3x.cfg" -c init -c targets -c "halt" -c "flash  erase_sector 0
<keshav> 0 127" -c "reset halt" -c "flash write_image C:/Users/Buero-1/Desktop/openOCD/init.hex" -c "verify_image C:/Users/Buero-1/Desktop/openOCD/init.hex" -c "reset run" -c shutdown
<PaulFertser> keshav: of course. BTW, it looks like your OpenOCD is quite old. It's year 2021 now.
<keshav> I noticed. I had an installed which was ancient in our server that I installed. I just noticed as Karl mentioned that I have to update it
<PaulFertser> keshav: please use some pastebin the next time to show what it has to say about your olimex once you install winusb on the composite device.
<keshav> I definitely will and I will keep you posted. Thank you so much.
emeb has joined #openocd
keshav has quit [Quit: Client closed]
keshav has joined #openocd
keshav has quit [Client Quit]
<karlp> are you targetting a _board_ with multiple stm32s, or are ou trying to make a mass flashing thing? I'm asking if it realllly need to be multiple stm32s on the chain, of if your needs would be met by N*USB devices, instead....
<GyrosGeier> FWIW, I have the same problem
<GyrosGeier> a panel with 8 STM32 based boards
<bencoh> but are they all connected in a jtag chain?
<GyrosGeier> before they are separated, that is a single long chain
<bencoh> ah
nerozero has quit [Ping timeout: 265 seconds]
<karlp> I'dpersonally have designed it to just get 8x stlinks pinned on, avoids all the fuckaround with jtag chains... but hey, if you built it like that.
<karlp> are you planning on using actual boundary scan or was this just what someone said "was the way things are done" ?
<PaulFertser> I think it's neat to be able to flash the whole panel by connecting to it once.
<GyrosGeier> yes
<GyrosGeier> but I've found it to be overrated
pdgendt has quit [Quit: Lost terminal]
<GyrosGeier> most assembly houses will run a SVF file for you after assembly at little to no extra cost
<GyrosGeier> and they don't care whether they need to connect to a single set of test points or multiple
<GyrosGeier> if the download takes very long, then an SVF that programs all at once would be beneficial
<GyrosGeier> but you don't save that much, because you still need to shift all the bits
<GyrosGeier> (and for machines with enough probe tips, it is faster to have one JTAG connection per board and let it run in parallel)
<PaulFertser> How do you convert stm32 flashing procedure to SVF
<PaulFertser> ?
Haohmaru has quit []
key2 has quit [Quit: Updating details, brb]
key2 has joined #openocd
Hawk777 has joined #openocd
<karlp> what gyrosgeir is mostly my feeling as well. it soudns cute and all, but it doesn't really save you anything