3 ms·
Great point about architecture, this is most definitely a major issue and is not specific to what language is used. I've just been reassigned to oversee develop
by manuf_eng 11y ago
Great point about architecture, this is most definitely a major issue and is not specific to what language is used. I've just been reassigned to oversee development in this area and am hoping to fix both these issues.
Over time the manufacturing software has evolved. Originally everything was written in C, it was a single C file to test all products. It was fast but from a maintenance standpoint it grew to be too large and this approach was abandoned as a result. In practice we've found writing low level tests in C that only do one thing and then use bash as glue logic seemed to work well. Some hardware tests must be implemented in C(low level register accesses where timing is critical).
We currently interface with USB printers(the board under test) to print a serial number corresponding to a MAC. address. I found maintaining this utility on all boards became a major issue(udev, devfs, busybox - eabi, oabi...) so I implemented it in Python and from a maintenance standpoint it's been a huge improvement. The problem is it's slow on some products(30 seconds or more to print a label and log to a file via NFS) and I have to admit I haven't yet dug in to understand why.
- dottrap 11y agoSounds like a good job for Lua. You can replace the glue logic with Lua. And then you can augment or replace the tests on a case-by-case basis. For tests that must be done in C, you can either leave them as is and drive them externally, or create a binding so you can invoke the C portions from Lua. LuaJIT's FFI feature makes it very easy to experiment with bridging because it avoids writing binding code.