11
votes
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
I made a tileable blueprintin factorio that can craft any entity an assembly machine or a chemical plant can make
I'm intrigued, do you have a link?
This week on repeatTest, I’ve been working on making table generation and parsing more flexible. I’d like to be able to define rows as unions of JavaScript objects with different properties, so long as the properties used as unique keys are the same in each variant.
For one of my contracts, I set up a containerized embedded development platform. It was a lot of work, but the end result has been super satisfying.
It has code auto formatting, doxygen generation, and code coverage instrumentation. The code uses the Arduino framework and a lot of Arduino libraries (using Arduino was not my call), so I am wrapping each of those with an abstract interface. The application components are built on top of these interfaces so that they can be unit tested using mock driver implementations. This makes it easy to do off-target functional testing and to simulate failures originating in the drivers or hardware interfaces. Although we will also have to to do HIL integration tests.
The build system (cmake) builds libraries for each component twice, once using an embedded toolchain and once using vanilla gcc. The embedded libraries get linked with the main to make the embedded binary, and the Linux libraries get linked against unit tests written with Google Test and using mocks of the aforementioned interfaces.
Everything runs in a docker container which can be used standalone or as a vscode dev container. The latter is nice because the intellisense can see all the embedded libraries and use the toolchain in the container. It also means a pretty nice Linux working environment even on my Windows machine.
There's a task file inside the docker image that automates all the common tasks, and another to invoke them from outside the docker container for standalone operation.
I would like to add some static analysis, but started by just turning all the gcc warnings on (really all of them, not -Wall) and have them converted to errors.
I have not had time to look into it yet, but I would like to look into building and running the test binaries either on target or on an Arm simulator so that I'm as close as possible to the target architecture.