- Posts: 5
about reduce devo7e code size
- yuqiang
- Topic Author
- Offline
Thanks to your open source deviation firmware.
I plan to add a new protocol in devo7e, so I need print some debug information via UART.
As guide, I using "TYPE=dev" for enable UART print, but the dfu image size is bigger than 116Kb
I want to reduce some code size, Can you give me some suggests?
Thanks again~
notice: After I update code to latest version, TYPE=dev will work without any modify. update @ 12/23/2013
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- yuqiang
- Topic Author
- Offline
- Posts: 5
1. "HAS_STANDARD_MIXER = 0" I can't find anything about HAS_STANDARD_MIXER in source code;
2. using RaspberryPi is a good idea, but the protocol is too simple.
btw, Now I disable ini_handler() in model.c, just fill "Model" with a hijacked data, this will reduce the size to 112Kb.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
#define HAS_STANDARD_GUI 0
Please Log in or Create an account to join the conversation.
- HappyHarry
- Offline
- Posts: 1136
Please Log in or Create an account to join the conversation.
- victzh
- Offline
- Posts: 1386
Please Log in or Create an account to join the conversation.
- victzh
- Offline
- Posts: 1386
Please Log in or Create an account to join the conversation.
- kreidler
- Offline
- Posts: 157
There is no switch for disabling the telemetry stuff. I did it some time ago just to get all in the 116kB before having the opportunity to disable the Standard GUI.HappyHarry wrote: guys how can you build without telemetry? I can find nothing in the define file?
My attempt was quick and dirty only. If you want to test how much the advantange will be just start with removing (comment out) the following lines in menus.c:
{PAGEID_TELEMCFG, NULL, MENUTYPE_SUBMENU, 0, MIXER_ALL, PREVIOUS_ITEM},
....
{PAGEID_TELEMMON, NULL, MENUTYPE_SUBMENU, 1, MIXER_ALL, PREVIOUS_ITEM},
But I cannot remember how much space I saved.
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
- Posts: 1433
With that you implement a switch which allows you to turn telemetry on again if somewhere else some space is left...
And I would look into the code if you publish it to see if we can make it a general switch (I am sure that more code could be disabled than the lines throwing errors).
Have I mentioned that I own a Devo7e since yesterday? Now I know why you guys like it - it is so mignon, but I can use it with my big paws... I have tested the actual build, but it does not fit; I had to disable the standard mixer gui (so nothing important lost ).
Please Log in or Create an account to join the conversation.
- kreidler
- Offline
- Posts: 157
I do have with b5579a0 115.75kb on Windows environment with the ARM as recommended by PB here http://deviationtx.com/forum/7-development/2407-testing-compiler-builds .rbe2012 wrote: I have tested the actual build, but it does not fit; I had to disable the standard mixer gui (so nothing important lost ).
If you do not mind my preferred config is
#define HAS_STANDARD_GUI 0
#define HAS_PERMANENT_TIMER 1
#define ENABLE_LAYOUT_EDIT 1
Please Log in or Create an account to join the conversation.
- SadSack
- Offline
- Posts: 317
+ Optimizing placement and re-linking
ROM: 0x08003000 - 0x0801faf4 = 114.74kB
RAM: 0x20000000 - 0x200027e4 = 9.97kB
Stock-devo7e.bin
+ Optimizing placement and re-linking
ROM: 0x08003000 - 0x0801dd60 = 107.34kB
RAM: 0x20000000 - 0x20002748 = 9.82kB
ENABLE_LAYOUT_EDIT-devo7e.bin
+ Optimizing placement and re-linking
ROM: 0x08003000 - 0x0801ec68 = 111.10kB
RAM: 0x20000000 - 0x200027b4 = 9.93kB
#define HAS_STANDARD_GUI 0
#define HAS_ADVANCED_GUI 1
//#endif
#define NO_LANGUAGE_SUPPORT 1
#define HAS_PERMANENT_TIMER 1
#define ENABLE_LAYOUT_EDIT 1
#define DATALOG_ENABLED 1 << copied from devo10 :-)
Maybe you should try installing GCC LINARO 4.8-2013.11.
I was able to build it under unbuntu 12.4 but haven't figured how to cross compile for windows and for me Mingw couldn't build it but that could have just been me.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- HappyHarry
- Offline
- Posts: 1136
phil
Please Log in or Create an account to join the conversation.
- FDR
- Offline
HappyHarry wrote: ...as I don't think the model ini's are transferable?
They are, but the configs will be unnecessarily complex...
Please Log in or Create an account to join the conversation.
- HappyHarry
- Offline
- Posts: 1136
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Please Log in or Create an account to join the conversation.
- kreidler
- Offline
- Posts: 157
Latest build 115.86kB with the ARM compiler and applied 1x3sw_mod.HappyHarry wrote: (2 x 3way, i know I can only use 1 of the 3 way switches just now) to my 7e and I need space for the current switch mod.
Just to enable some additional features with the switch mod. I just show the changes only:
#define HAS_TELEMETRY 0
#define HAS_LAYOUT_EDITOR 1
Please Log in or Create an account to join the conversation.
- HappyHarry
- Offline
- Posts: 1136
HAS_ADVANCED_GUI 0
HAS_TELEMETRY 0
HAS_LAYOUT_EDITOR 0
HAS_PERMANENT_TIMER 0
and got down to 113.4kb, though i don't know if it's a functional build yet, but with your findings i can add things back in now and see where i end up
thanks for all the help and work guys
phil
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Development
- about reduce devo7e code size