My partial suggestion to the problem is to write the firmware "application logic" in portable C (e.g., by avoiding architecture-specific special constructs when they are unnecessary, and using stdint.h stuff), and add thin layers of "PC simulation" code within the firmware, replacing the peripheral accesses. Can be separate modules compiled for PC target, or can be just #ifdef within the project, or combination thereof.
For example, I have used POSIX timers to trigger execution of handlers that normally trigger on timer interrupts. This allows adjusting speed of execution, too.
Of course running the "PC firmware" won't replace testing with physical hardware, but there are great benefits: it is extremely easy to add a lot more logging, like you can just fopen() a file and write a gigabyte of CSV data without having to think about data links, or open a socket and control the thing through telnet/web browser/whatever level of complexity you are comfortable with. Speeding up the time allows complex tests to run quickly, and you can simulate with large datasets. You can add extra asserts() all around of your codebase, without worrying these extra checks wasting program memory or execution cycles on real hardware. This way you also add visibility and error checking inside the DUT, not just observing the outputs.
But eventually, you will also want the things mentioned by most others in this thread, because the pc-compiled firmware would miss all of the peripheral stuff and replace them with some simplified simulation models.