The voice of inexperience is here, but I’ve been thinking about this lately. It seems to me that the best approach would be either
A) Write as much of your device-independent application code as you can in the PC environment before writing it on the landing page, and write down your unit tests at the same time (this is done on the PC, first of all making you separate the device-independent materials) . Thus, you can use your choice of module testers, and then check the hardware-dependent material in the old-fashioned way - with RS-232 and / or oscilloscopes and I / O pins signaling time-dependent data, depending on how fast it should work,
B) Write everything on the target hardware, but you have a make target to conditionally compile the unit test assembly, which will run unit tests and output the results (or data that can be analyzed for the results) via RS-232 or some other means. If you have little memory, this can be difficult.
Edit 7/3/2009 I just thought about how unit test hardware-dependent stuff. If your hardware events happen too fast to record using RS-232, but you don’t want to manually sift tons of oscilloscope data data to see how your I / O pin flags rise and fall, as expected, you can use a PC card with built-in DIO (for example, National Instruments data cards) to automatically estimate the time of these signals. Then you just had to write software on your PC to manage the data acquisition card to synchronize with the current launch of the unit test.
Sam Skuce Jun 30 '09 at 17:23 2009-06-30 17:23
source share