Steffanx has quit [Read error: Connection reset by peer]
tsal has quit [Ping timeout: 240 seconds]
tsal has joined #openocd
Hawk777 has quit [Ping timeout: 252 seconds]
Hawk777 has joined #openocd
keshav has joined #openocd
nerozero has joined #openocd
<keshav>
Hi karlp, I have multiple STM32 Microcontrollers individually connected in a linear daisy chain. TDI --> TDI1, TDO1 --> TDI2, TDO2--> TDO.
<keshav>
I would like to mass flash those microcontrollers in the chain with one Hex file. It would always be STM32 in a chain.
<keshav>
If that works, I will make a PCB which would connect to those multiple Microcontrollers with one connector for the adapter and flash multiple Microcontrollers at a time which would make my work a whole lot easier
<Hawk777>
keshav: Does it make sense to construct a config file that uses a TCL loop to define a series of chips, and then defines a TCL proc that contains a loop to flash code to all of them? You could then use a TCL variable to define how many chips there are, which could be set externally by outside tooling. I’m not sure whether you could do that on the command line, but even if not, you could have your external tooling write a tiny conf
<Hawk777>
ile that just sets the variable and then includes the main file, and then uses the RPC API to call the function to flash the targets (or even just include a call to that function using -c on the command line).
<keshav>
Unfortunately I have been working on OpenOCD only for the past week and I am unsure on how the program works. I have been testing with command line codes with existing Config files and I am able to flash single Microcontrollers through those config files. But regrettably I am starting to learn TCL and how it works.
<keshav>
Is there an example cfg file in OpenOCD that could help me understand the loop that you mean?
<Hawk777>
Hm, I’m not sure if there are any examples of loops in the shipped config files.
<Hawk777>
But TCL is a regular programming language, so there are definitely plenty of options available. There’s some documentation at <http://jim.tcl.tk> that might be useful.
<keshav>
Thank you.
keshav has quit [Quit: Client closed]
keshav has joined #openocd
Haohmaru has joined #openocd
Hawk777 has quit [Quit: Leaving.]
keshav has quit [Quit: Client closed]
keshav has joined #openocd
sbach has quit [Read error: Connection reset by peer]
sbach has joined #openocd
wolfshappen has quit [Quit: later]
wolfshappen has joined #openocd
Haohmaru has quit [Ping timeout: 240 seconds]
Haohmaru has joined #openocd
wingsorc has joined #openocd
Bertl_zZ is now known as Bertl
wolfshappen has quit [Ping timeout: 252 seconds]
wolfshappen has joined #openocd
zkrx has quit [Ping timeout: 240 seconds]
<keshav>
Hi.
<keshav>
Update on the JTAG Olimex STM32 chain flashing.
<keshav>
I connected two STM32 CPUs in a daisy chain as mentioned yesterday with TDI --> TDI1, TDO1 --> TDI2, TDO2--> TDO.
<keshav>
There were no error messages. Two Taps were found. But the last Tap on the chain was flashed. The first one on the chain was not flashed. There was no change in Tap 1. Where could I be doing this wrong? Is there something I am missing in the command code?
<keshav>
xPack OpenOCD x86_64 Open On-Chip Debugger 0.11.0+dev (2021-12-07-17:33)
<keshav>
0* stm32f3x.cpu cortex_m little stm32f3x.cpu halted
<keshav>
Is it showing just one target because both the taps are the same CPUs?
<PaulFertser>
keshav: btw, is it olimex on windows 11 or did you install GNU/Linux?
<PaulFertser>
Hm, one target, I see you sourced the target config just once, why?
<keshav>
It is Olimex on Windows 10. I havent installed Linux yet and I havent tested on Windows 11 so far. I wanted to make this work on Windows 10 so that when this is successful, I will try it on Windows 11.
<PaulFertser>
Makes sense
<PaulFertser>
keshav: you have one target because you sourced it only once.
<keshav>
I am a bit blank on sourcing it twice. I tried it today and the program finds the second one as a command of the first target config.
<keshav>
cortex_m reset_config sysresetreq
<keshav>
invalid command name "targetstm32f3x.cfg"
<PaulFertser>
keshav: show the invocation command line
<PaulFertser>
keshav: -c is for Tcl commands. -f is for files.
<PaulFertser>
keshav: first you had -c for the file. Then you changed it to -f so it was correct but then we figured another command was to be added before that, and you added it with -f (which was wrong). Now you changed it to -c (correct) but also for whatever reason changed correct -f for the file to incorrect -c.
<keshav>
I understand now. I was a bit stupid and understood that the -c corresponded to the next data in the command.
<keshav>
Somehow I got a bit flustered and understood it wrongly. Thank you. Now I will test if it works
<PaulFertser>
keshav: that still writes only to one part, you'll need to also add commands to select another target and to flash it too after the first flash verify_image retuns.
<keshav>
It works with "target CHIPNAME" right?
<keshav>
To select the other target
<PaulFertser>
keshav: I think the command is "targets stm32f3x-2" or "targets stm32f3x".
<PaulFertser>
I know, sounds confusing
<PaulFertser>
keshav: you can experiment interactively with telnet.
<keshav>
Thank you so much. I will test it out and update you.
<karlp>
it' also wonderful that the CHIPNAME is just a convention, entirely implemented as copypasta inside _most_ of the target tcl file too :)
<bencoh>
:)
<bencoh>
well, this convention is mentionned in the documentation ... I guess it helps :)
<bencoh>
-n
<karlp>
where is it in the docs?
<karlp>
it's not in tap declaration
<bencoh>
"variable naming convention"
<karlp>
oh right, that's totally discoverable...
<karlp>
the section "Communication Between Config files" which is really "example for multiple target support".... is super easy to find
<bencoh>
I kinda feel like one needs to real the whole documentation to get a good grasp of what it can or cant do :)
<bencoh>
(apart from trial&error)
<bencoh>
to read*
<karlp>
yeah, but it's splattered all over the place, even after having readit a few times I could never find it,
<bencoh>
I usually search in the (full) pdf, I think it helps
<PaulFertser>
When you search in the Info manual you get all the hits too
keshav has quit [Quit: Client closed]
wingsorc__ has joined #openocd
wingsorc__ has quit [Client Quit]
wingsorc has quit [Ping timeout: 265 seconds]
<karlp>
I find info cumbersome, so I'm normally using the html. and the single page one loads badly, so I get no useful search :|
<PaulFertser>
karlp: do you use GNOME or KDE probably? Their GUI Help apps should be showing Info pages too.
keshav has joined #openocd
keshav has quit [Quit: Client closed]
<karlp>
gnome, but I've never had any luck with the built in help app honestly.
<karlp>
it's either installed separately, or only handles the packaged versions, or whatever
<karlp>
I mean, I can install to prefix=$HOME/.local and the cli does the right thing for unning, but whether man/info do the right thing? I've no idea.
<karlp>
and the installed man/info pages I hve don't have any version info so I can't tell either
<PaulFertser>
OpenOCD info has version on the first page iirc.
Hawk777 has joined #openocd
Haohmaru has quit []
nerozero has quit [Ping timeout: 240 seconds]
key2 has quit [Read error: Connection reset by peer]
key2 has joined #openocd
tlwoerner_ has joined #openocd
bencoh_ has joined #openocd
tlwoerner has quit [Remote host closed the connection]
bencoh has quit [Ping timeout: 260 seconds]
Steffann is now known as Steffanx
v0|d has joined #openocd
thinkfat has joined #openocd
bencoh_ has joined #openocd
bencoh_ has quit [Changing host]
bencoh_ is now known as bencoh
<karlp>
not here, nor at work...
<karlp>
I did look...
<PaulFertser>
This User's Guide documents release 0.10.0+dev, dated 9 December 2020,
<PaulFertser>
of the Open On-Chip Debugger (OpenOCD).
<karlp>
hrm, I suspect info on my machine is showing me a man page.
<karlp>
the _man_ page doesn't have a verison at least...
<karlp>
in fact, it's dated 2009
<PaulFertser>
man page didn't receive any love, that's true.
<karlp>
well, "info openocd" is showing me the man page of my local custom build at least.
<karlp>
I guess configure && make && make install didn't find the right things to build info?
<PaulFertser>
it ends up in doc/openocd.info* and then installed in /usr/local/share/info normally
<karlp>
yeah, I guess I don't have makeinfo or something, but that's not there.
<karlp>
and "info openocd" is apparently falling back to showing me a man page