NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
zjason` has quit [Read error: Connection reset by peer]
zjason`` has joined #openocd
wingsorc has quit [Ping timeout: 245 seconds]
nerozero has joined #openocd
braunr has quit [Remote host closed the connection]
Hawk777 has joined #openocd
crabbedhaloablut has joined #openocd
braunr has joined #openocd
Guest96 has joined #openocd
Guest96 has quit [Client Quit]
Guest96 has joined #openocd
Guest96 has quit [Client Quit]
bvernoux has joined #openocd
Hawk777 has quit [Quit: Leaving.]
Foxyloxy has quit [Quit: Textual IRC Client: www.textualapp.com]
merethan_ has joined #openocd
merethan has joined #openocd
HelloShitty has joined #openocd
HelloShittyAlt has joined #openocd
HelloShitty has quit [Ping timeout: 258 seconds]
HelloShitty has joined #openocd
HelloShittyAlt has quit [Ping timeout: 258 seconds]
HelloShittyAlt has joined #openocd
HelloShitty has quit [Ping timeout: 260 seconds]
HelloShitty has joined #openocd
HelloShittyAlt has quit [Ping timeout: 245 seconds]
HelloShittyAlt has joined #openocd
HelloShitty has quit [Ping timeout: 246 seconds]
HelloShitty has joined #openocd
HelloShittyAlt has quit [Ping timeout: 248 seconds]
HelloShittyAlt has joined #openocd
HelloShitty has quit [Ping timeout: 260 seconds]
HelloShitty has joined #openocd
HelloShittyAlt has quit [Ping timeout: 260 seconds]
HelloShittyAlt has joined #openocd
<merethan> PaulFertser, I've been reading & learning the stuff we discussed last Friday with also Hawk777 involved. Very educational.
<merethan> SystemV stuff like .init & .fini, then gcc stuff like .ctors & .dtors
<PaulFertser> merethan: tbh, I never really digged that, as newlib and libopencm3 scripts did the job for the usual usecases I had.
HelloShitty has quit [Ping timeout: 246 seconds]
<PaulFertser> But I'm glad to hear you enjoyed learning that.
<merethan> My understanding is it all essentially been superseded by the __init_array_start/end etc. mechanisms defined by the .elf format.
<merethan> The other stuff is mainly important to people dealing with binary compatibility.
<merethan> Unless you're linking old binary stuff along with your embedded things, should be able to drop all the legacy.
<merethan> So I did. But GCC keeps adding in the .init and .fini sections somehow, which still nets me a _init() which only has an epilogue but no return. So crti.o still comes in somehow.
<karlp> are you build ing with freestanding or nosys or anything? should you be? :)
<karlp> those have ... marked impacts on how this stuff works.
<merethan> "--specs=nosys.specs" "--specs=nano.specs"
<merethan> Should be good there, I think.
<karlp> whatabout -nostartfiles?
<karlp> -nostartfiles means you won't get any of that extra stuff you don't want anywya :)
<karlp> saves you having tow ork around it...
<karlp> nosys will give you stub syscalls, but you still get crtX shit
<karlp> libopencm3 uses nosys+nostartfiles, so you can still have printf and libc stuff, without having to do any juggling around this.
<karlp> I can't remember freestanding vs nostartfiles anymore
<merethan> I did use -nostartfiles with gcc but did exact same.
<merethan> Or is it meant to be a linking switch?
<karlp> it's a linker switch.
<karlp> oh, freestanding is a whole different set ofr cruft.
<karlp> if you are still getting strange crashes, and you have an m3r1 core, make sure you're not running into this too: https://github.com/libopencm3/libopencm3/blob/cb0661f81de5b1cae52ca99c7b5985b678176db7/lib/cm3/vector.c#L79
<merethan> I already have -nostdlib btw
<karlp> can't remember if nostdlib includes notstartfiles or if those are sideways...
<karlp> ok, gcc says nostdlib includes both
<karlp> well, *shrugs* then.
<karlp> who's calling _init anyway?
<karlp> you have your own startup then if you have nostdlib....
<karlp> so... just... do whatever you want?
HelloShitty has joined #openocd
<karlp> it's been a little while since I've looked at this.
HelloShittyAlt has quit [Ping timeout: 252 seconds]
<merethan> Super annoying this is. Somewhere in my build, it's pulled in.
<PaulFertser> merethan: oh, you can look in the generated map file (with an ld option) and it tells you which section is pulled by which other section.
<PaulFertser> And of course you need --gc-sections to avoid linking what you do not need at all.
<merethan> I got --gc-sections yes
<merethan> I got the map file too but not had the idea yet to look there.
<merethan> It's just strange. Because crti.o (containing the function prologue) is pulled in, but crtn.o (the function return) is not.
russ has quit [Ping timeout: 255 seconds]
russ has joined #openocd
HelloShittyAlt has joined #openocd
<karlp> if you've using -nostdlib Im 99% sure you don't want eitehr of them pulled in.
HelloShitty has quit [Ping timeout: 245 seconds]
HelloShitty has joined #openocd
<merethan> Indeed I don't want to. But it happens anyway and i not figured out yet why.
<merethan> The map file did not yield much clues yet either.
HelloShittyAlt has quit [Ping timeout: 240 seconds]
<merethan_> The map file does have LOAD /usr/lib/gcc/arm-none-eabi/12.2.1/thumb/v7e-m/nofp/crti.o in it, but no clues why. It is not listed as included to satisfy a symbol.
<merethan_> Nanolib has a branch/call to _init which needs be satisfied but I not specify anywhere it needs pull crti.o for that.
<merethan_> (Not to mention again that crti.o only has the prologue, not the epilogue in it. Meaning having one without the other breaks the stack.)
<merethan> Oops time flies when having fun: Need to get moving now to pick up the girlfriend.
<merethan> Shiiit
merethan_ has quit [Ping timeout: 252 seconds]
merethan has quit [Ping timeout: 248 seconds]
HelloShittyAlt has joined #openocd
HelloShitty has quit [Ping timeout: 240 seconds]
embeddedNoob has joined #openocd
<embeddedNoob> hello
<embeddedNoob> if my debug chip can use both swd and jtag, which should i choose?
<PaulFertser> embeddedNoob: swd should be fine if it's alone
<PaulFertser> And your debug adapter supports it
<embeddedNoob> and if its with other chips i should use jtag?
<PaulFertser> If you want to have a single debug connector for all of them and they do not support multi-drop swd, yes.
<embeddedNoob> ok, thanks
nerozero has quit [Ping timeout: 240 seconds]
HelloShitty has joined #openocd
HelloShittyAlt has quit [Ping timeout: 245 seconds]
Hawk777 has joined #openocd
bvernoux has quit [Quit: Leaving]
HelloShittyAlt has joined #openocd
HelloShitty has quit [Ping timeout: 258 seconds]
zjason``` has joined #openocd
zjason`` has quit [Ping timeout: 272 seconds]
zjason``` has quit [Read error: Connection reset by peer]
erhankur has joined #openocd
zjason``` has joined #openocd
crabbedhaloablut has quit []
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
Hawk777 has quit [Ping timeout: 272 seconds]
Hawk777 has joined #openocd
Foxyloxy has joined #openocd
Hawk777 has quit [Quit: Leaving.]
Hawk777 has joined #openocd