Making Embedded Systems[0] is a great book that goes over some basics about how to structure a low level coding project. It's focused on embedded projects, but the principles will still apply.
It's been very useful for me to learn how to make the compiler, and make/cmake, work well with the software that I'm writing. Things like compile time switches can be really useful in making your software super flexible. For example, you can add in compile time switches in your code to log particular events when you're debugging that wouldn't be useful and make your project bloated in the final version.
[0]: https://www.oreilly.com/library/view/making-embedded-systems...
Electronics design: https://contextualelectronics.com/
Programming embedded systems: http://shop.oreilly.com/product/0636920017776.do
Misc. projects: https://makezine.com/
https://github.com/eleciawhite/making-embedded-systems
Practical Electronics for Inventors, Fourth Edition 4th Edition by Scherz, Simon Monk