*** tpb has joined #tomu | 00:00 | |
xobs | tcal: thanks -- Docker changed when I upgraded Fedora and I didn't notice that server had broken. | 01:14 |
---|---|---|
*** AnimaInvicta has left #tomu | 01:34 | |
*** wrtlprnft has quit IRC | 04:18 | |
*** wrtlprnft has joined #tomu | 04:19 | |
*** wrtlprnft has quit IRC | 04:24 | |
*** wrtlprnft has joined #tomu | 04:44 | |
*** mupuf_ has quit IRC | 05:26 | |
*** mupuf has joined #tomu | 05:26 | |
*** gio_ has joined #tomu | 06:27 | |
*** gio has quit IRC | 06:30 | |
*** gio has joined #tomu | 06:34 | |
*** gio_ has quit IRC | 06:36 | |
*** S has joined #tomu | 07:53 | |
*** S is now known as Guest22957 | 07:54 | |
*** Guest22957 has quit IRC | 07:55 | |
*** awe001 has joined #tomu | 08:27 | |
*** wrtlprnft has quit IRC | 09:52 | |
*** wrtlprnft has joined #tomu | 09:52 | |
*** kyl has quit IRC | 10:18 | |
*** gio has quit IRC | 10:21 | |
*** gio has joined #tomu | 10:23 | |
*** kyl has joined #tomu | 10:24 | |
*** flx has quit IRC | 11:21 | |
*** flx has joined #tomu | 11:25 | |
st-gourichon-fid | Hi! We make some progress on our design. On to software. Assume we want to add C++ code to `foboot/examples/riscv-blink`. It looks like existing makefile compiles main() with GCC, not C++, so I expect we lose static initializers. Also linking with gcc we lose C++ libraries (should be okay). Any recommendations? | 13:46 |
st-gourichon-fid | I guess we are okay with no static initializers. It's basic C++ code (porting from Arduino). | 13:46 |
st-gourichon-fid | Still, if anyone knows caveat of some sort, feel free to comment about the use of C++ in fobot examples. Makefile looks like C and C++ do not receive exact same treatment in Makefile. | 13:47 |
st-gourichon-fid | s/fobot/foboot/ | 13:47 |
xobs | I've not done much [anything] with C++ in Fomu. | 13:52 |
xobs | Having said that, I did do some stuff back in the day with Chibitronics. | 13:52 |
st-gourichon-fid | Thanks xobs for the information. | 13:52 |
xobs | This horrible mess of a function called C++ constructors from a C initializer: const_start | 13:52 |
xobs | https://github.com/chibitronics/ltc-os/blob/9825dd637b00e654318903c482b0c91c1ccb4966/orchard/esplanade_app.c#L115-L131 | 13:52 |
tpb | Title: ltc-os/esplanade_app.c at 9825dd637b00e654318903c482b0c91c1ccb4966 · chibitronics/ltc-os · GitHub (at github.com) | 13:52 |
xobs | The actual program header is constructed at https://github.com/chibitronics/ltc-compiler-layer/blob/master/support/variant.cpp | 13:54 |
tpb | Title: ltc-compiler-layer/variant.cpp at master · chibitronics/ltc-compiler-layer · GitHub (at github.com) | 13:54 |
xobs | With the linker script available at https://github.com/chibitronics/ltc-compiler-layer/blob/master/support/KL02Z32-app.ld | 13:54 |
tpb | Title: ltc-compiler-layer/KL02Z32-app.ld at master · chibitronics/ltc-compiler-layer · GitHub (at github.com) | 13:54 |
st-gourichon-fid | Thanks xobs for those links. I see the function calling C++ constructors from a C array and the struct field .const_start . Not sure what is related to C++ in the linked script *-app.ld . Anyway, thanks. | 14:02 |
xobs | C++ places its static constructors in a section called ".init_array". The linker script provides two symbols: __init_array_start and __init_array_end that allows C code to know where this list of constructors starts and ends. It can then just traverse the list and call each function. | 14:03 |
st-gourichon-fid | xobs, interesting. I guess this is what provides per-class initializers... and thus allows to get static initializers while using regular C compiler for main and regular C linker. | 14:05 |
xobs | Not necessarily a C compiler -- something needs to know how to construct the initializers. It just so happens that g++ does it by creating an array of function pointers. Maybe that's a C++ thing? I'm not too sure on the standards there. | 14:06 |
st-gourichon-fid | xobs, right, we could be inviting c++ code from any environment, not necessarily C. | 14:14 |
st-gourichon-fid | We make some progress. We have some working code in `foboot/examples/myexample` that compiles and boots on the hardware. Cool! | 15:04 |
st-gourichon-fid | Was SYSTEM_CLOCK_FREQUENCY renamed to CONFIG_CLOCK_FREQUENCY at some point in litex ? | 15:14 |
xobs | Yes, at some point they changed the prefix and redid all the accessors. | 15:14 |
st-gourichon-fid | Thanks for confirming. | 15:14 |
st-gourichon-fid | We are writing our code in foboot/example/myexample from foboot/master but with a newer litex (litex/master instead of the version pinned in .gitmodules), so other example codes are outdated. | 15:15 |
*** awe002 has joined #tomu | 16:12 | |
*** awe001 has quit IRC | 16:13 | |
*** awe002 has quit IRC | 16:46 | |
*** js is now known as Guest54560 | 16:55 | |
*** gio_ has joined #tomu | 16:55 | |
*** gio has quit IRC | 16:57 | |
*** dwg has quit IRC | 17:16 | |
*** wrtlprnft has quit IRC | 18:03 | |
*** wrtlprnft has joined #tomu | 18:05 | |
*** mifune has joined #tomu | 18:10 | |
*** mifune has quit IRC | 18:48 | |
*** mifune has joined #tomu | 18:48 | |
*** dwg has joined #tomu | 20:01 | |
*** js has joined #tomu | 21:51 | |
*** CarlFK has quit IRC | 23:55 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!