Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Host controlled embedded testing
I am designing a driver (to run on my HCS08) for communicating with a controller program (running on the PC) via a serial link. The purpose of this is to invoke test functions on the target from the host.
I've come up with a layout for the driver however for the test functions I want to allow any number and any type of arguments and return type. To that end I've created a wrapper structure to store a pointer ( void (*)(void) ) to my test function as well as an enumeration to store what the real underlying function that pointer points to. I then store an array of pointers to possible handler functions for each type combination of arguments and use the enumeration as an offset into the array.
Now this makes the code a little bloated, and since I'm very new to embedded development I'm sure there is something I am missing (an easier way to implement this) or haven't thought of. My questions is, has anyone had any experience with this kind of development (host/target automated embedded testing, or specific to the example I gave: implementing an RMI style system but with embedded systems) ? I'm open to all suggestions,input or comments.
0 · ·