Unit testing can't easily (or practically) be performed on the target, but integration testing can.
Vehicle ECUs require in system testing, and the project I'm working on at the moment is building a HIL (Hardware in the Loop) tester, with continuous integration and testing.
There are several USB I/O devices connected to the ECU, and a debugger. Software on the PC runs testing scripts which toggle real I/O, vary voltages and loads, and read inputs, take measurements, etc.
I'm working on having a system pull the commits down, recompile, reprogram the target, and run all the tests. The nature of the software requires a long test (lights remain on for so many seconds after the doors close, etc) so real continuous integration is unlikely, but a nightly test of all the latest commits is doable.
This would save vast amounts of time in debugging and hand testing - right now when a new baseline comes out everyone has to hand test their code. Many don't, and it may be several baselines later before the error is found, and then it must be tracked down.
This is on a 16 bit processor, but the principles and application are the same across the gamut, the difference is that people don't want to spend a lot of time and money on this sort of solution when there's only one hardware guy and one software guy doing the majority of the work, and the projects are small enough that a test by hand of all the features takes minutes instead of hours.
Further, it offers great traceability to the customer. Each test case has a list of requirements it tests. At the end of a regression test the program generates reams of HTML reports with all the requirements that passed and failed, graphs of the I/O for that test over the period of the test, etc.
So... Yeah, automated testing is usually not worth this level of effort for very small, limited projects, but if the setup and cost were low (ie, most of it is setup time and cost) then everyone would want to use it on every project just as much as they use unit testing on PC targeted programs.