I am looking for a tool to facilitate maintenance of a firmware-based product, but I don't know whether it exists, nor do I have a name for it. Ideally it would be vendor agnostic as I never wish to be covenant-married to any particular processor, language, or IDE.
I will illustrate a typical problem (greatly simplified) from a real-life example.
Let's say my executable comes from 2 source files (in C), holding 3 & 4 functions; respectively:
Rev 1.6: +------ File1.c | +---- File2.c | | - - -------- x . x . func1a() x . func1b() x . func1c() | | . x . x func2a() . x func2b() . x func2c() . x func2d()
The lines refer to the declaration section at the top of the file, which is outside all function definitions.
This is the way it looked when I released revision R1.6. My manager wanted me to follow that up with inclusion of 2 new features:
H New hardware: The new platform has more I/O ports, more complex signal processing,
I Input Sampling: Due to a misunderstood requirement, I had been sampling 2 input signals at the same frequency. When one of them needed more noise filtering while the other needed quicker response time, I had to split them into separate processing pipes, with new names.
In my revision control system, I give it a prototype revision number: R1.6.HI.
The changes ripple through the design in a crazy-quilt kind of pattern, Along the way, I have to add a new function to File2.c and other functions therein grow until File2.c becomes unmanageably large. I have to split it into 2 files of 3 & 2 functions each, keeping the old function names:
R1.6.HI - R1.6: New hardware -------+ Input Sampling ---+ | | | +------ File1.c | | | +---- File20.c | | | | +-- File21.c | | | | | | | - - - ---------- - - x . . . . x . . func1a() . . x . . func1b() . . x . . func1c() I . | | | | | . x . . . . x . func2a() . . . x . func2b() . H . . x func2c() I H | | | | | . --> I H . --> func2d() . H . . + func21e() I .
Say after 3-4 weeks of effort I reach a point where this builds without error and appears to run correctly, but I have not completed regression testing and don't consider it releaseable into the wild.
At this point the service manager returns from the field saying one of the user inputs needs an abnormally long debounce time to fit industry standards. My manager says this request trumps what I am working on, so I must stop what I am doing and get it out NOW.
I must make my changes to R1.6 (the lastest release). This time, File1.c becomes a monster and I split it.
R1.6.D - R1.6: Debounce ---------+ | +------ File10.c | | +---- File11.c | | | +-- File2.c | | | | | - - - ---------- - x . . . x . . func1a() . x . . func1b() D | | | | . --> D . --> func1c() . . . + func11d() D | | | | . . x . . . x func2a() D . . x func2b() . . . x func2c() . . . x func2d() D
I get that tested, release it as R1.7, and return to my prior task, which now must be patched into R1.7.
At this point, what I really need is a utility that would allow me to implement the top-level command:
R1.7.HI = R1.7 + (R1.6.HI - R1.6)
where each variable above is a rather complex, multi-level structure of base type char, but having elements involving files and functions and lines. Without it, I must either:
- Throw away the 3 man-weeks I spent creating Rev_1.6.HI and repeat that task on a new base, or - Attempt to execute the command above manually, (Keeping track of all the levels can get tedious).
A couple of years ago, I thought a decent revision control system ought to be able to handle this, since the users can be forced to supply all the info necessary to drive it at check-in time.
The most difficult sub-task is isolating changes to individual functions, but most revision control systems come with a file differencing utility that goes a long way toward providing this feature. I have yet to find one, however, that can handle functions migrating between files due to re- factoring.
Although I made this example extremely simple, just representing these relationships is difficult in the 2-D system I have to work with.
Furthermore, writing this down makes me realize my problem is in the tools, for whom the smallest unit of analysis is the file; whereas in my source deck, the "atoms" are really functions.
So I'll stop the example here and ask: - Does such a tool exist? - Is there a generic name for it? - Where do I learn more about this topic?
Any ideas? ============================================================ Gary Lynch | To send mail, change no$pam gary.lynch@no$pam.org | in my domain name to ieee ============================================================