NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
slobodan has quit [Ping timeout: 260 seconds]
russ has quit [Ping timeout: 264 seconds]
noarb has quit [Quit: ZNC 1.8.2 - https://znc.in]
ayaka has quit [Quit: byte]
noarb has joined #openocd
ayaka has joined #openocd
<ayaka> PaulFertser, that is what arm trustzone used for
key2 has quit [*.net *.split]
Foxyloxy_ has quit [*.net *.split]
damex has quit [*.net *.split]
gruetzkopf has quit [*.net *.split]
postal_blab_ has quit [*.net *.split]
<ayaka> I was wondering whether the gdb could recognize the cpu status(secure or non-secure)
shoragan has quit [*.net *.split]
tchebb_ has quit [*.net *.split]
tlwoerner has quit [*.net *.split]
dreamcat4 has quit [*.net *.split]
zear has quit [*.net *.split]
jybz has quit [*.net *.split]
jancoow has quit [*.net *.split]
joconor has quit [*.net *.split]
van has quit [*.net *.split]
<ayaka> because the image for the secure(optee os and trusted application) and non-secure(linux kernel) are different
jybz has joined #openocd
zear has joined #openocd
key2 has joined #openocd
Foxyloxy_ has joined #openocd
gruetzkopf has joined #openocd
damex has joined #openocd
postal_blab_ has joined #openocd
joconor has joined #openocd
jancoow has joined #openocd
van has joined #openocd
shoragan has joined #openocd
tchebb_ has joined #openocd
dreamcat4 has joined #openocd
tlwoerner has joined #openocd
russ has joined #openocd
balrog has quit [Quit: Bye]
balrog has joined #openocd
Hawk777 has joined #openocd
ayaka__ has joined #openocd
Guest29 has joined #openocd
Guest29 has quit [Quit: Client closed]
ayaka__ has quit [Ping timeout: 256 seconds]
ayaka__ has joined #openocd
ayaka__ has quit [Ping timeout: 268 seconds]
tsal_ has joined #openocd
tsal has quit [Ping timeout: 268 seconds]
Zer0KooL has joined #openocd
* Zer0KooL says hello
<Zer0KooL> quiet bunch
Zer0KooL has left #openocd [#openocd]
ayaka__ has joined #openocd
nerozero has joined #openocd
crabbedhaloablut has joined #openocd
crabbedhaloablut has quit [Read error: Connection reset by peer]
crabbedhaloablut has joined #openocd
crabbedhaloablut has quit [Ping timeout: 255 seconds]
crabbedhaloablut has joined #openocd
MGF_Fabio has joined #openocd
Haohmaru has joined #openocd
Hawk777 has quit [Quit: Leaving.]
ayaka__ has quit [Remote host closed the connection]
ayaka__ has joined #openocd
<ayaka__> There is a adapter that using ft2232h, which use channel 0 for jtag as usual. The problem is the only line could be assigned to nRST is in the channel 1
<ayaka__> is it possible to enable two channels in the cfg?
<PaulFertser> No, it's two different USB devices essentially.
<PaulFertser> So you can have kernel driver handling UART of one channel and OpenOCD driving MPSSE on another.
<karlp> it doens't _have_ to be like that, but it is...
<PaulFertser> Who would need to use JTAG on one channel and RESET for the same target on the other anyway? I do not remember ever reading about such adapters.
<karlp> from the poitn of view of a hardware layout guy, he's got one usb connection and a bunch of signals :)
<karlp> who is some linux beard to tell them they can't use them how they see fit :)
<PaulFertser> Hardware guys who behave like that end up spending their evenings doing manual rework cutting traces and soldering jumpers.
<karlp> lol
<karlp> yeah, I'm not advocating it as a clever plan, but sometimes some restrictions are not entirely _required_ they're just convenient for other users.
<Haohmaru> cutting traces is just wrong
<Haohmaru> it's a sin
ayaka__ has quit [Ping timeout: 260 seconds]
jn has quit [Ping timeout: 240 seconds]
jn has joined #openocd
jn has joined #openocd
MGF_Fabio has quit [Read error: Connection reset by peer]
a3f has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
shoragan has quit [Quit: quit]
a3f has joined #openocd
shoragan has joined #openocd
<ayaka> PaulFertser, the channel 1 was for SPI, it just happens it has a free pin for rst, I would like to use it for nRST
<ayaka> it is the most cheap ft2232h with a voltage level shift, the adapter itself is a clone of the FPGA downloader for a Chinese FPGA
<ayaka> I have a another problem with the variable scope here. I defined some variable in config files, also I define a proc(function) there
<ayaka> when I call that function from telnet port, it can't find those variables. I have tried the global or upvar, it doesn't work
<ayaka> the only way to make it work is moving the variables declarations into that proc
<PaulFertser> ayaka: global variables work in my experience, and you can see them used in many target scripts.
<ayaka> here is what I did, in foo.cfg : set bar "0x0 0x1 0x2 0x3"; proc test{} { set _bar [lreverse $bar]; }
<ayaka> I tried set bar "0x0 0x1 0x2 0x3";global bar;
<PaulFertser> ayaka: you need "global bar" inside the proc.
<PaulFertser> I just tried in jimsh.
<ayaka> but I want to put that variable in the beginning of the file
<PaulFertser> Yes, you set it in the beginning, to access it inside a proc add "global bar" inside the proc.
<ayaka> I see, which tcl standard that openocd follows? I found it is a little different to the tcl tutorial I found
<PaulFertser> It's just Jim Tcl interpreter embedded.
<ayaka> btw, what is that tcl port used for, I think I could insert the function(proc) into openocd environment from that port
<ayaka> but it can't call any command or proc
bvernoux has joined #openocd
<PaulFertser> ayaka: Tcl port offers RPC via a simple protocol. It can do anything with the integrated Tcl interpreter. See the User Manual.
<PaulFertser> ayaka: it's meant to control OpenOCD from another tool.
<ayaka> I see thank you. I did read the manual, I just didn't find it mention which tool would use it
silurian_invader has quit [Ping timeout: 268 seconds]
cambrian_invader has quit [Ping timeout: 256 seconds]
silurian_invader has joined #openocd
cambrian_invader has joined #openocd
Haohmaru has quit [Quit: saionara]
slobodan has joined #openocd
<PaulFertser> ayaka: there're some tools, contrib/ has basic examples, everything else are external projects.
nerozero has quit [Ping timeout: 264 seconds]
mrec has joined #openocd
<mrec> I'm getting tired of openocd ...
<mrec> first of all why should I add set CPUTAPID 0x2ba01477
<mrec> to stlink.cfg
<mrec> this is a standard nucleo board and I need to do some post config, that doesn't make sense
<PaulFertser> mrec: in what circumstances do you need to do that?
<PaulFertser> mrec: that's part of _target_ config. What target do you have and what target file are you sourcing?
<mrec> anyway okay I added that and all I get is Cannot identify target as a stm32 family.
<PaulFertser> mrec: again, hints at wrong target config.
<mrec> well I'd like to upload my stm32f0 firmware but seems like whatever version I use of openocd it gives different errors
<PaulFertser> mrec: so what target config are you using? Please show full log.
<mrec> I have one system that is supposed to work, set up 2019 but I have no physical access to that one
<mrec> openocd -f interface/stlink-v2-1.cfg -f target/stm32f0x.cfg
<PaulFertser> And what is the target MCU exactly?
<mrec> while stlink-v2-1 just refers to stlink.cfg
<mrec> stm32f0
<PaulFertser> And what is the OpenOCD version?
<PaulFertser> stm32f0 is _family_
<mrec> I tried 0.10 and 0.11
<mrec> well it doesn't matter if I have a device attached or not it gives me the same error
<PaulFertser> mrec: it can't be true
<PaulFertser> Show logs
<PaulFertser> btw, 0.12.0 was released on Sat Jan 14 23:14:31 2023
<mrec> Info : Unable to match requested speed 1000 kHz, using 950 kHz
<mrec> Info : Unable to match requested speed 1000 kHz, using 950 kHz
<mrec> this is also nonsense I saw that so many times already also from different logs (which I searched with google)
<bencoh> hm, doesn't "Cannot identify target as a stm32 family." come from the flash driver?
<mrec> I think so
<bencoh> I'd raise the debug level to make it output the various ID registers
<bencoh> and/or check which registers the nor driver tries to read
<mrec> it worked in 2019 .. on another system I should try to copy that config and openocd version
<bencoh> s/nor/flash/
<PaulFertser> mrec: the requested speed info is not essential.
<PaulFertser> It is what it is, stlink has just a list of frequencies it supports, and 1000 kHz is not in it.
<PaulFertser> OK, so it connects to the target properly, that we see.
<PaulFertser> mrec: so what target MCU is connected to that stlink?
<PaulFertser> F446 has that flash ID and SWD ID is 0x2ba01477 for it.
zjason` has joined #openocd
<bencoh> 0x421 doesn't seem to be listed in src/flash/nor/stm32f1x.c
<PaulFertser> bencoh: of course, because it's in stm32f2x.c
zjason has quit [Ping timeout: 264 seconds]
<bencoh> oh, so he's just using the wrong target tcl then
crabbedhaloablut has quit []
<PaulFertser> That's what I said right away and asked several times about the target MCU model.
<bencoh> :)
<bencoh> mrec: maybe try stm32f4x instead
<PaulFertser> f0 firmware won't run on f4 anyway
<bencoh> true
<mrec> I'm using that programmer for flashing all my stm32f0s
<mrec> whatever it doesn't work with openocd I need to find another way
<mrec> go back to windows.
<PaulFertser> mrec: but here you have f446 connected.
<PaulFertser> Probably there're two stlinks with targets connected to this specific computer?
<PaulFertser> Or you're using a nucleo/disco board as stlink and have forgotten to remove the jumpers?
<mrec> I tried various boards even a L072 board and it also printed UNEXPECTED idcode: 0x2ba01477
<PaulFertser> mrec: so it's not related to the boards then, it's either another stlink connected to the same computer or this stlink has target connected right there on the same board.
<mrec> could be that there was an STM32F4 on the main stlink, however that chip was removed
<PaulFertser> mrec: check with "lsusb" that you have only one stlink connected.
<PaulFertser> Then check visually the stlink, make sure there's no target for real.
<mrec> oh that could be it
<mrec> it's late and I didn't think about that 3am here
<mrec> isn't hla_serial supposed to filter for the device?
<PaulFertser> mrec: where did you enter the serial and how did you find it's the serial of the correct stlink and not the other one?
<PaulFertser> Are you not near the computer in question? Just disconnect what's not needed for the task.
<mrec> I disconnected the second one now and it's okay
<mrec> thanks for that hint..
<mrec> before I tried it on MacOS where it doesn't work either with 0.11
<PaulFertser> Hm, was Homebrew not updated to offer 0.12.0 ?
<PaulFertser> Either way, it should have worked.
<PaulFertser> Again, show the logs.
<PaulFertser> I think I cared to update Homebrew back then when it was released.
<mrec> I will continue with that tomorrow. time to sleep here.
<PaulFertser> Yes, 0.12.0 and HEAD are offered https://formulae.brew.sh/formula/open-ocd
<mrec> I have 0.11 here, I don't like to update too much because I'm using a self built freecad version updating usually smashes the dependencies
MGF_Fabio has joined #openocd