-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Reduce ROM by define some helper functions in pages/ #625
base: master
Are you sure you want to change the base?
Conversation
I did some analyze on the .text size of each C files, no rodata (no string counted). here is the result. Please check if anything catch your eyes. I am surprised on the size of model.c. objs/devo7e/model.o Total | 8406 |
According to the checks actually Rom size increase in some transmitters? |
Need covert the code to use the new function. |
the model.c has always been a problem. I've taken several stabs at optimizing it, but I never was able to get it as small as I'd like. |
Also, I have:
Which may be helpful in identifying memory usage |
let me give it a try. i have some ideas to try it out first. then build
tests and refector the code. the challenge part is always some back
compatiblity code.
…On Tue, Jan 22, 2019 at 12:44 AM PhracturedBlue ***@***.***> wrote:
the model.c has always been a problem. I've taken several stabs at
optimizing it, but I never was able to get it as small as I'd like.
My last idea was to use DevationUploader to do all the work and to store
the files on Tx as binaries. We'd compile them to match the actual memory
layout during upload, and download/decompile/recompile/upload during a dfu
update.
It would remove basically all 8k of code from model.c, but have the
downside that Deviation-Uploader is required to work with files (I'd add a
gui to work as a file explorer). It also requires being able to run the
compile/decompile stages from Java on the host machine, so I was looking at
a C->Javascript translator that could reproduce the binary structure. I got
close to getting the latter part working, but it is a very complex system,
and would be error prone. Anyhow, I gave up on that path. I'll be
interested to see what you come up with.
I'd be open to a different file-format if it would actually help
significantly, but it must remain human readable/editable (and we'd need to
be able to provide a converter)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#625 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAuzRPbi9f4eN6Zzsn5kBAiaRWsOXp80ks5vFe5agaJpZM4aKQkg>
.
--
-Howard
|
I'll throw model file versioning in as another concern. I think an external compile step might make it easier. One method I looked at is to have the ini read code apply any transformations necessary to convert an older model file into the latest Model definition. That didn't give a good solution for the cyclic AIL/ELE reversal because model.c reads each config value independently so correction has to wait till all the parameters are loaded. At that point correcting the cyclics requires scanning through all the mixers. The additional code needed to support previous model file versions gets large. An external model file compile step would keep the compatibility code out of the firmware. It does make managing the model files more complex for users. We'd also need a way to generate readable model files from the model data on the tx so users could save changes made on the tx. |
Any specific reason to swap order of CreateLabel parameters v.s. CreateLabelBox? the strCallback and label description is swapped?
|
CreateLabel was one of the very 1st functions in the GUI and we didn't have the data parameter. When it was added, it was tacked on the end.. When CreateLabelBox was added, we had a convention (cb and data go together at the end). So CreateLabelBox is 'right' and CreateLabel is like that because there wasn't any reason to change every call as a beutification project. |
No description provided.