Cleric-K / FlySky-i6X_Firmware_BugFix

Fixes a bug in the original FS-i6X firmware

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Merge with FlyPlusI6X

007hacky007 opened this issue · comments

Hello,

would it be possible to release firmware with your patch which would basically include features from FlyPlusI6X? (https://github.com/qba667/FlyPlusI6X). Seems like that would be the best from both worlds. Now it seems like one has to decide whether he prefers features or the performance (quality).

Thank you in advance for thinking about it and thank you for this patch and for all your time dedicated to this stuff!

Hi,
actually I posted PR an year ago: qba667/FlyPlusI6X#7
but seems @qba667 didn't have time to work on the project.

Since then FlySky released two more firmware updates (they don't solve the problem but introduce some new minor features, like fixing the USB joystick). Yet the FlyPlus fw is still based on the original 2017 firmware. It will require more work to rebase it on the latest official firmware.

So if you want to have FlyPlus with the bugfix you can compile the above PR or I can compile it for you. Just remember that it is based on the 2017 fw, which is not necessarily a problem.

Firstly, thank you for your response!

I see, I've missed your PR. FlyPlusI6X seems to be abandoned. I probably don't want to run on old 2017 firmware, so rebase is definitely required. Unfortunately my C and ASM skills are definitely not on such level - so I would not feel comfortable doing so on my own (and potentially bricking my transmitter). :(

Anyway, maybe I'll take a look on this and try to rebase & merge it by myself if I find enough free time... In the meantime I'm gonna use your latest patched FW.

Thanks again for all your work!

By rebase I didn't mean git rebase. When FlySky compile their firmware from source, all the functions, variables, constants land in different addresses in the memory image.

Patches like FlyPlus and my bugfix depend on identifying the addresses of some functions and data and injecting some additional code at these key places. This means that when FlySky release a new firmware, the compiled image most certainly have all functions and variables shifted at some other places in the image. Thus the image has to be disassembled anew and all the places where the code must be injected must be identified once again.
It's easier with my bugfix because I have to identify only a couple of things in the firmware and to inject the patch, but FlyPlus depends on hooking at many more functions in order to achieve it's complex results. That's why migrating FlyPlus to the newer firmwares requires more work.

That sounds like ton of work. Even traditional merge conflicts between 2017 and 2019 sounds like quite a bit of work, but now it sounds crazy. I did not realize the patches are built on top of decompiled source code instead of the original src. It's shame Flysky did not opened their code for others to improve it. Would be a hell lot easier to maintain all these great patches from the community.

edit: "decompiled" is wrong word. The correct description of the work done may be: hooking around the original firmware with new functions... Sounds like lot of ASM work actually - to understand where to put the hooks and fuctions. Doh.

hmmm ... can we get one fw that has all bings and boings??