Hello! I'm after some advice on how to tackle a project. I have written basic firmware for a few microcontroller devices which were quite simplistic (ATtiny and ATmega with simple IOs). I have a fairly good grasp of C and microcontroller hardware, but I'm coming from a PC programming background (object oriented Java, etc.), and I'm having some trouble adapting to programming microcontrollers.
I've purchased a few books on embedded systems, AVR, and C, but they all tend to be reference material and explain things in detail without covering much on program design and architecture. What I mean is, advice and best practices on putting a larger more complex firmware together. I have seperate C modules for my ADCs, TWI, SPI, UART, etc. What's the best way to stitch everything together that is robust and maintainable?
I've put things together, but it feels like I'm breaking modularity in some ways (maybe this is just the way MCUs are programmed), and my code base starts to feel like I have to many variables linking different modules together. Without experience, I'm second-guessing the architecture/flow of the code.
Are there any good resources that cover this? Not necessarily language or brand specific, but something that can help me better adapt to putting the entire firmware together?