<MCorgano>
IS it possible to have both serial console and OpenOCD SWD debuggers running on the same pi?
<MCorgano>
EX say I want to use the same pi to flash the chip and read the console, and be able to access both over telnet from my pc
<MCorgano>
has anyone did that yet?
nerozero has joined #openocd
<PaulFertser>
MCorgano: yes, should be possible
<PaulFertser>
MCorgano: using raspberrypi UART doesn't depend on OpenOCD running or not.
<PaulFertser>
Forwarding it over network is possible with socat.
<MCorgano>
I realize, I can already ssh into the pi
<MCorgano>
what command would I use to pull up a serial console on the pi, to talk from pi <-> to device?
<PaulFertser>
MCorgano: first you need to configure the UART to not use it as a kernel console. raspi-config has the options to enable UART but not to enable the console on it. Then I recommend running picocom.
<indy>
PaulFertser, thanks :) i just noticed, that in rawhide openocd started to fail
<indy>
to build or install old
Hawk777 has quit [Quit: Leaving.]
MCorgano has quit [Quit: Client closed]
Guest77 has joined #openocd
Guest77 has quit [Client Quit]
Xogium has quit [Quit: Leaving.]
Xogium has joined #openocd
Haohmaru has joined #openocd
MCorgano has joined #openocd
<karlp>
is libgpiodv2 available anywhere yet?
<karlp>
this was such a python3 disaster of an upgrade.
<karlp>
sysfs is dead, losers, you should all use chardev, we built libgpiod for you, because, yeah, no-one actualyl wants to work with the chardev either, but actually no, the chardev is busted, we didn't learn from any of the first 15 gpio implementations, so everything's deprecated now! but don't worry, the kernel has v2 and you can use it's chardev! just not both apis at once, no no...
<karlp>
even within that we had incompatible v1.4 and v1.6.
<Haohmaru>
what's this about?
<Haohmaru>
otherwise my condolesence about the snek situation
<Haohmaru>
f*cking snek everywhere
xytx has joined #openocd
<PaulFertser>
indy: is Peter Robinson co-maintainer for Fedora now?
<indy>
PaulFertser, he is kind of super-maintainer in fedora :)
<PaulFertser>
indy: please tell me if I did wrong by not pinging you when 0.12.0 final was tagged, I assumed you have the watch file automatically notifying you.
<indy>
PaulFertser, i have, but fedora notification system is quite 'spamming' so i overlooked it as i'm busy with family stuff. irc is more reliable as i don't log in to gmail often
<PaulFertser>
indy: I see. Thank you for caring, it's very nice to have up-to-date packages readily available for end users.
MCorgano has quit [Quit: Client closed]
merethan_ has joined #openocd
wingsorc has quit [Ping timeout: 252 seconds]
<Haohmaru>
does openocd/gdb have to "touch" the RAM of the MCU when you merely flash an .elf to it?
<PaulFertser>
Haohmaru: for fast flashing, yes. For some MCUs, yes.
<Haohmaru>
huh
<Haohmaru>
cortex-m4f in this case
<Haohmaru>
is there anyway to influence it? i have a "special" chunk in the RAM which i intentionally want to keep dirty (uninitilized), and whenever i flash my bootloader on - that chunk of RAM appears modified
<Haohmaru>
i flash it with that .sh script i stole some weeks ago.. it invokes openocd with "init" "targets" "reset halt" "flash write_image erase" "verify_image" "reset run" "shutdown"
<PaulFertser>
Haohmaru: it depends not on the core but on the way flashing is implemented.
<Haohmaru>
hm
<PaulFertser>
Haohmaru: yes, you can relocate workarea in target config or make it 0 size.
<PaulFertser>
Haohmaru: I can't understand why you're using some script and not "program" functioon.
<Haohmaru>
it happens that my special chunk of RAM is in the beginning of the RAM, maybe that wasn't the greatest decision ever
<PaulFertser>
Haohmaru: you can move workarea elsewhere, no problem.
<PaulFertser>
Or you can make OpenOCD save and restore it.
<Haohmaru>
PaulFertser no idea.. i wanted to have a "quick" way to flash an .elf because doing it from the IDE every time is kinda slow
<Haohmaru>
for the IDE i have to first launch openocd anyway
<Haohmaru>
for the .sh script i simply need to have a terminal open where i repeat the command (executing the script), so i just press UP+enter
<PaulFertser>
Haohmaru: OpenOCD has built-in "program" function for flashing.
<Haohmaru>
i don't remember why i did this but i surely asked here for a script and i think someone showed me an existing script from some project on the internet, i took it and adapted it
<Haohmaru>
i certainly added the "adapter speed 4000" there btw
<Haohmaru>
so you say i remove all the other crap and change it to this ^?
<PaulFertser>
No, adapter speed shouldn't be needed with upstream configs.
<Haohmaru>
hm?
<PaulFertser>
Yes, target configs should have sane default value in them.
<Haohmaru>
i think i set that because by default i get something like 1 or 2MHz with my debugger
<PaulFertser>
Probably the reset-init handler changes it to a higher value if applicable.
<Haohmaru>
and i'm a semi-impatient person ;P~
<Haohmaru>
okay, it works, that RAM still gets touched tho
<karlp>
yes, you will need to change workarea and/or workarea size.
<karlp>
do you really need the ram preserved when you're reflashing?
<karlp>
I use first sections of ram for bootloader/app comms, but you're reflashing, what's to communicate with
<karlp>
setting work area size to 0 will be "quick" to implement, but very slow to flash.
<Haohmaru>
well, my bootloader uses the data there to figure out what's going on
<karlp>
ok, and what does it do on power on reset?
<Haohmaru>
it clears it
<karlp>
so...
<karlp>
no problem?
<Haohmaru>
i'm working on the bootloader and firmware still, so i just reflash the bootloader with the script
<Haohmaru>
"-work-area-phys address" can this be passed like the other commands in my silly .sh script?
<Haohmaru>
..so i don't want to have to switch the power off/on all the time, on the other hand, i wanted to debug a POR situation and it wasn't possible because when my debugger is "active" - the chip voltage doesn't fall low enough and i get brown-out reset instead of POR
<Haohmaru>
but i think i figured out the POR issues already
<Haohmaru>
seems not
Mis012[m] has quit [Ping timeout: 252 seconds]
LinuxHackerman has quit [Ping timeout: 260 seconds]
<Haohmaru>
because i sprinkle scripts into different project folders, i have projects with SAM E5x/D5x and SAMD20 for now
<Haohmaru>
so i wanted to have a dumb and simple script that is capable of programming a firmware onto a chip with least bullsh*t
<Haohmaru>
so i could, for example, instruct a $collegue how to do it over the $phone
<Haohmaru>
this seemed simpler than instructing folks how to open my IDE, load the project, additionally also launch openocd with a set of arguments i can't synthesize out of my head, and then press some funky buttons in the IDE
<Haohmaru>
also that scenario requires openocd+IDE+gdb
<Haohmaru>
as for the other things - i don't know, i don't schprachen ze .sh much, but i wanted all the "important" things i may want to modify in the script, to be at the top, instead of in the middle of that hairy-looking command
<Haohmaru>
i tried without "sh -c" and it... didn't quite work
<PaulFertser>
Haohmaru: I'm not talking about the idea to use a script for that. I'm talking about the implementation details that are kind of amusing me.
<Haohmaru>
i stole it from $somewhere and modified it
<Haohmaru>
i think it was intended as a post-build step in a Makefile for some $thing
<PaulFertser>
Haohmaru: yeah, it's quite outdated and has sudo, but at least no strange shell scripting "solutions" are present.
<PaulFertser>
Ah, it's also using "halt" to prepare for flashing. Issues almost guaranteed.
<Haohmaru>
*shrug*
<Haohmaru>
any suggestions on how to debug POR issues?
<Haohmaru>
i guess this heavily depends on how the debugger is made electrically around the SWD port.. and maybe also my target board
<PaulFertser>
I really feel like I need to fix this wiki now...
<PaulFertser>
Haohmaru: hm, I have an idea actually. Unpower the target and pull reset line low externally. Then power the target while still having it low. Start OpenOCD with -c "init; reset halt; wait_halt 10000", and release the reset line manually after seeing "timeout waiting for the target halted".
<Haohmaru>
i guess i'll write that down for the future, but i can't try it now since the reset doesn't go anywhere else besides to the SWD port
PsySc0rpi0n has quit [*.net *.split]
ericonr_ has quit [*.net *.split]
joconor has quit [*.net *.split]
PsySc0rpi0n has joined #openocd
joconor has joined #openocd
ericonr_ has joined #openocd
PsySc0rpi0n has quit [Remote host closed the connection]
PsySc0rpi0n has joined #openocd
buldi777 has joined #openocd
nerozero has quit [Ping timeout: 246 seconds]
Haohmaru has quit []
merethan_ has quit [Ping timeout: 255 seconds]
wingsorc has joined #openocd
buldi777 has quit [Quit: Leaving]
PaulFertser has quit [Ping timeout: 252 seconds]
PaulFertser has joined #openocd
<borneoa__>
karlp: the maintainer of libgpiod is writing since few weeks that the release would probably be the following week. Anyway, it's arriving... If you have any suggestions on how to support it, you are welcome.