New post-compile patch program for C18 HEX code . . .

All – Team 585 has created a patch program in PERL that allows you to patch the compiled hex code with constants defined in an external file (i.e., constants not initialized at compile time). The upshot is that you can make a single build of the controller software, but maintain the flexibility of changing constants (e.g., calibration curves) as tuning and hardware changes dictate. Simply put, manage one controller build and a few text files of constants rather than several special builds that each have different constants defined in their source code.

I have enclosed the program but had to change the name from patchy.pl to patchy.txt to support the upload file types.

Please let me know if you find utility in this . . . um . . . utility.

Cheers-:slight_smile:
jwk

patchy.txt (13.6 KB)


patchy.txt (13.6 KB)

Very nice, thanks.

Very cool. I’ll give it a shot when I start tuning some of our control loops.

Here are an example mdl.h and two mdl.txt files that we have tested with. Note that we have not yet loaded a patched file into the robot, but the process should work. :confused: Please let me know if the process works for you. I’ll do the same once we get our robot loaded (probably later this week).:slight_smile:

mdl9.h (133 Bytes)
mdl12.txt (165 Bytes)
mdl9.txt (325 Bytes)


mdl9.h (133 Bytes)
mdl12.txt (165 Bytes)
mdl9.txt (325 Bytes)