- edited description
Split TCC ELF-Loader from the actual compiler
Background
TCC has two components:
-
The ELF loader, needed by ML MODULES subsystem
-
The TCC compiler itself. It's used to compile .c files directly on the camera. Handy for user-contributed scripts.
Suggestion
Make the TCC compiler optional, load it as a module when you need to compile new scripts.
Benefits
ML autoexec.bin size is reduced, thus allowing modules to work on more cameras (such as 1100D/60D)
Comments (7)
-
reporter -
reporter - edited description
-
""May I freely modify files in tcc directory, or should I make as less changes as possible? I'm thinking about putting all needed functions into one file to eliminate chances of having not used functions in binary."
You can hack it as you wish. Maybe you can copy the existing implementation to modules folder (to be used as a scripting engine), and then strip down the old one to the minimum necessary for loading modules.
I've tried to do that with dcraw (wanted to port it to the camera in order to read CR2's and show raw histograms), and I've found it helpful to print a call list, so I knew what functions were called in a particular situations (here, reading CR2's without any processing). This can be done with gcc instrumentation, see the end of this file: https://bitbucket.org/hudson/magic-lantern/src/tip/src/tcc-glue.c
-
What are your suggestions regarding: https://bitbucket.org/hudson/magic-lantern/issue/1545/refactor-zebrac#comment-4201283
-
I'm almost there. It was easier than I thought; will polish and commit soon.
-
reporter Nice!
-
- changed status to resolved
- Log in to comment