-
6 votes
-
KNOWER - I'm the President (2023)
8 votes -
Astral Doors – Temple Of Lies (2024)
6 votes -
Ezra Klein reminisces with Jon Stewart about right wing US media, social media, the rise of Donald Trump, cancel culture and where to go from here
12 votes -
Dropkick Murphys feat Violent Femmes - Gotta Get to Peekskill (2023) - More solidarity and anti-fascist recommendation?
19 votes -
Tildes Video Thread
Find yourself watching tons of great videos on [insert chosen video sharing platform], but also find yourself reluctant to flood the Tildes front page with them? Then this thread is for you. It...
Find yourself watching tons of great videos on [insert chosen video sharing platform], but also find yourself reluctant to flood the Tildes front page with them? Then this thread is for you.
It could be one quirky video that you feel deserves some eyeballs on it, or perhaps you've got a curated list of videos that you'd love to talk us through...
Share some of the best video content you've watched this past week/fortnight with us!
9 votes -
Jónfrí – Andalúsía (2023)
1 vote -
Steam game recording - available now
35 votes -
Explain one play: Steph Curry creates unexpected Slow Mo dunk and Draymond 3 using new Wheel Spain play versus Washington Wizards
3 votes -
Winnetka Bowling League - America In Your 20's (2024)
2 votes -
Konkhra – Revolution (2024)
3 votes -
It's up to us to preserve video games
13 votes -
US election distractions thread
Obsessively refreshing results is the most stressful way to follow an election, but it can be an easy trap to fall into. This thread is a place to try and consciously disengage with that process,...
Obsessively refreshing results is the most stressful way to follow an election, but it can be an easy trap to fall into. This thread is a place to try and consciously disengage with that process, and talk about or link to anything and everything: how a sports team is doing, your latest hyperfixation, a silly video you liked, wax poetic about an obscure hobby, do a small text based let's play for a game, or elucidate the proper usage of commonly misapplied Latin phrases. So long as it's not related to the election and you don't feel it warrants a topic all its own, throw it in.
103 votes -
Blood Incantation - The Stargate (20min) (2024)
8 votes -
Invincible Fight Girl S1E1- "I Am"
3 votes -
Unpacking the intertwined histories of porn and video games
8 votes -
What games have you been playing, and what's your opinion on them?
What have you been playing lately? Discussion about video games and board games are both welcome. Please don't just make a list of titles, give some thoughts about the game(s) as well.
16 votes -
S.T.A.L.K.E.R.: Shadow of the Zone
7 votes -
Calva Louise - Oportunista (2023)
2 votes -
joan meets the divine void
10 votes -
Ennaria - Monstarrr (2024)
5 votes -
Golden State Warriors pull out overtime win in Houston
7 votes -
Z Berg - Better the Devil (From "Strange Darling") (2024)
1 vote -
North Korean troops in Russia - North Korean shells, troops and Russian offensives
11 votes -
Watch electricity hit a fork in the road at half a billion frames per second
18 votes -
Kælan Mikla – Stjörnuljós (2024)
1 vote -
Club Penguin: gone but not forgotten
15 votes -
"Valve are gathering the avengers": we believe Gabe Newell is assembling the ultimate dream team for the one game everyone's been waiting for
23 votes -
BLIB - Silent Love (2024)
3 votes -
How do I know if a USB-C PCIe card supports 4k video output?
finally getting to be that time where I need a USB-C slot on my tower that I built back in 2017 so I started looking into expansion cards. One thing I can't tell is how to tell if a particular...
finally getting to be that time where I need a USB-C slot on my tower that I built back in 2017 so I started looking into expansion cards.
One thing I can't tell is how to tell if a particular expansion card supports the usb-c ports with DP-Alt mode for a 4k display if the need arises.
for exmple, had my eye on this one and I can't tell much if it does have that kind of support
9 votes -
Explain one play: Steph Curry - JaVale McGee relay lob play by Brandin Podziemski and Trayce Jackson-Davis settles Golden State Warriors vs New Orleans Pelicans
5 votes -
Cmake strategies or alternatives for building (different) code for different platforms
Okay, so this is getting really long, I'll put the ask up front: I have a strategy, I think it is reasonable. Now is a point where I can easily change things, and it won't be so easily later. So...
Okay, so this is getting really long, I'll put the ask up front: I have a strategy, I think it is reasonable. Now is a point where I can easily change things, and it won't be so easily later. So I'm looking to see if anyone has trod this road before and can recommend any of:
- a different build system that will be easier to manage for this use case
- a different strategy for using cmake that will be easier to manage
- any gotchas I should be aware of, even if you don't have better solutions.
Background
I have a project I'm working on where the ultimate deliverable will be a hardware device with 3-4 different microcontrollers coordinating with each other and interacting with a PC-ish platform. This is a clean rewrite of a C++ codebase. Due to the microcontroller (and some of the PC APIs) being C++, the language of choice for most of it is likely to remain C/C++.
I'm succeeded in setting up a build system for embedded code. The old code was arduino, so it relies a lot on those libraries, but I've managed to set up enough custom cmake to get off of the ardunio tools altogether, even if I am borrowing their libraries and some of the "smarts" built into the system about setting build flags, etc. So far, I have a dockerized toolchain (cmake + make + gcc-arm-none-eabi) that can successfully build ARM binaries for the target platform.
The thing that I'm up against now is that I'd like to have a robust off-target unit testing infrastructure. My ideal case is that everything in the embedded system will be broken down into libraries that have clear interfaces, then to use unit tests with mocks to get high coverage of test cases. I'll still need some HIL tests, but because those are harder to set up and run, I want to use those for integration and validation.
In terms of OSes available, we're mostly working on Windows systems using WSL for linux. I'd like things to be as linux-based as possible to support CI on github, etc.
Goals and Cmake limitations
I started out using cmake because I hate it least of the tools I've used, and I am at least pretty far up the learning curve with it. But a limitation I'm hitting is that you can't do a mixed compile with two different toolchains in one build. The reasons why cmake has this limitation seem reasonable to me, even if it is annoying. You can easily change the toolchain that your code is built with, but that seems to be largely targeted at cross-compiling the same binaries for different systems. What I want to do is:
- build my code libraries with embedded settings for linking to the embedded binaries and build those embedded binaries (the end product)
- build my code libraries with linux-ish tools and link them against unit tests to have a nice CI test process
- (eventually) also be able to build windows binaries for the PC components -- when I get to that point, I'd like to get away from the MSVC compilers, but will use them if I have to
Current strategy
My current plan is to configure a library build like this (pseudocode):
add_library(mylib sources) if (BUILD_TYPE STREQUAL BUILD_TYPE_EMBEDDED) <embedded config> elseif (BUILD_TYPE STREQUAL BUILD_TYPE_LINUX) <linux config, if any> endif() #unit tests are built for each library if (BUILD_TYPE STREQUAL BUILD_TYPE_LINUX) add_executable(mylib_test sources test_sources) target_link_libraries(mylib gtest etc.) endif()For the rollup binaries, I make the whole target conditional
if (BUILD_TYPE STREQUAL BUILD_TYPE_EMBEDDED) add_executable(myembedap sources) target_link_libraries(mylib) endif()Then the build script (outside cmake) is something like
cd build/embedded cmake <path to src> <set embedded toolchain> -DBUILD_TYPE=embedded make cd ../../build/linux cmake <path to src> -DBUILD_TYPE=linux makeThings I like about this strategy:
- It's relatively simple to do all the builds or just one of the builds (that control would go in the shell script)
- I have one source tree for the whole build
- It lets configuration be near code
- It lets tests be near code.
- I think it's extensible to cover the PC component builds in the future
Things that worry me:
- It feels like a hack
- Support for off-target tests feels like it should be solved problem and I'm worried I'm missing something
Thanks for reading. If you made it this far, you have my gratitude. Here's a video with funny out of office messages that I enjoyed.
6 votes -
Tribulation – Saturn Coming Down (2024)
3 votes -
Takashi Yoshimatsu - And Birds Are Still… (1998) - If you like Studio Ghibli's soundtracks I'd strongly recommend checking this guy's music out!
12 votes -
A freeze dryer is not a reasonable purchase
61 votes -
Vola – Bleed Out (2024)
3 votes -
Where did Fallout 3's bombs actually hit?
9 votes -
Steam games now need to fully disclose kernel-level anti-cheat on store pages
84 votes -
Neonme – Yet Again (2023)
8 votes -
John Grant - Glacier (2014)
4 votes -
Knosis - FUHAI (feat. Hanabie) (2024)
4 votes -
Aliens Realize Why No One Attacks "Defenseless" Earth
5 votes -
German pigeon (Full song remix, 2024)
5 votes -
Serj Tankian - Life's revengeful son (2024)
12 votes -
Mount Eerie - Non-Metaphorical Decolonization (2024)
3 votes -
Inside the world's largest AI supercluster xAI Colossus
4 votes -
Týr – Dragons Never Die (2024)
6 votes -
The Kids Should See This
32 votes -
What games have you been playing, and what's your opinion on them?
What have you been playing lately? Discussion about video games and board games are both welcome. Please don't just make a list of titles, give some thoughts about the game(s) as well.
21 votes -
Ensiferum – Winter Storm Vigilantes (2024)
10 votes