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.
<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]