This is continuation of the previous post about creating a C template for use across multiple platforms.

You can read the previous post here: Ultimate-C-Template

New Repos!

One of the big changes I’ve made is that now I have a collection of TDD template repos. Now it’s not just for C but also one’s for Zig and Rust.

All the repos can be accessed here: TDD-Templates.

Changes

Bugs across platforms

Over the course of testing and using my automation script otto.sh I found that the differences in the system utilities such as SED, can cause major issues.

On Linux systems I was able to do in place editing of files using sed without issue, but the same commands didn’t work exactly the same when using them on FreeBSD.

Diagnosing the issue I found out that one of the flags I had been using was actually a gnuism.

Fixing the issue is still a work in progress as I’ve added in more shell functions where the commands called are dependent on the host OS.

Embedded Templates

One new addition that might seem out of place is a embedded template made specifically for one architecture. The AVR template.

I found myself often writing firmware for clients using AVR micro-controllers such as the ATtiny85, ATtiny13A, ATtiny404 and some ATMega controllers as well.

Often I found that finally delivery and the documentation for these projects can become challenging so using a tdd template with doxygen has vastly improved this process.

Toolchain Files

The toolchain file I added to the project allow me to add in targets for compiling hex binaries that can be flashed/programmed into the MCU directly using the avrdude utility.