-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Set F7 GCC optimizations to -O2 for F745 and -Os for F277 Always #8953
Conversation
Finally, thanks God. So it is now officially clear there is a problem with a compiler GCC 10.x.x OK, I will wait for 6.1 release and try it. |
…ch-f7-optimizations
Do you think this might be a factor in #8950 ? The gyro behaviour when it decided to do a death spin looks very strange. Raw gyro and filtered don't correlate at all (assuming they should of course) and the values rocket in 1 log in a ms or so and unrealistically drop to 0 for a time in the other other log. |
There are examples of people whom I respect advising against using
INAV actually uses, in some places
Whether I'd prefer to see consistent optimisation ( |
@breadoven I'm not really expecting this is the case. We have |
It is hard to read yours arguing guys. It brings even more distrust. Even if something worked for over 3 yeas but it is not right so why do you keep it like that? I do not understand what are you talking about but clearly understand Jonathans arguments and believe he is right. Anyway, leave my thoughts without comments. I just need to filter my mind somehow. :) |
It is also the case that we've updated the compiler over those releases and the compiler has changed how it implements various optimisation levels. So that we've done something over a number of releases doesn't really matter if the compiler has changed. It is certainly the case that there were significant changes to gcc optimiation between 9.x and later versions. |
I'm fully aware of that @stronnag . But even that is not a last moment change. The previous GCC update happened for INAV 4.0 in 2021. After that we stayed with the same GCC and the same optimization levels. I'm not saying it's not connected or related. I'm saying that I don't expect this is caused by that. It's not just that probable. Could be, but I don't think so. |
Pawel, in one of your latest videos you said: "we (developers) are special". Well, I would not expect from special developer to say words like probably or could be or I don't think so. You live in binary world so there are only 2 possibilities you know it or you don't know it. Simply, probably could think belong to second category. Now I'm being cruel, but it's my plane that I'm literally putting in your hands. |
No, we do not live in a binary world. The whole nature of our world is probabilistic. Just look at quantum mechanics. Interesting see |
I first reported about it in this issue: #7434 |
I am curious why there are only a few people complaining or noticed there is a problem. How many people have H7 and F2 controllers? I would say many but is it really many? How come only a few people have a problem? How many people use iNav compiled in GCC 10.x.x? Maybe not so many and now when v6.0.0 was recommended to everyone the planes will start falling in bigger numbers... Do not take this as a complain, I only have a head full of questions. I crashed twice because of the iNav and I need to know that everything was fixed to feel safe for the next flight. I like iNav but I cannot trust it and it drives me crazy. |
@DzikuVx how can i test this Version? |
@RoadyFPV you can download artifacts from the GitHub CI |
@DzikuVx I don't have any Idea how to get it. Maybe you can compile me a test version for MATEKF722SE? |
https://github.com/iNavFlight/inav/actions/runs/4621320316 on the very bottom is a link to all the artifacts from this PR |
Absolutely the same story. One drone has flown away so far has not been found, the second one is now broken =) |
@DzikuVx no change, fc is still freezing |
Remind me, which FC? |
MATEKF722SE |
In all the sadness the positive thing is that we know the GCC 10.x.x is the problem |
Thanks. Humour me, please try this hex. Alas (for my sanity) it has to be 7.0.0 (if you need a configurator, the examples from http://seyrsnys.myzen.co.uk/inav-configurator-next/ will work).
Please let us know what happens; I really hope it fails miserably. |
Wow, I am completely lost now. From my point of view if I am lucky maybe iNav 8.0.0 might be a version I can take for test flight. Unfortunately I have no idea what iNav 8.0.0 will look like. I am very sorry but iNav now is from my view unusable. The GCC 10.x.x is a huge disappointment... I feel sorry for developers. I am happy the iNav 6.0.0 compiled in GCC 9.3.1. is almost perfect for my Dji O3 Air Unit. It does not support HD but I can live with it. I am not able to let the iNav fly my models but at least the telemetry is working, It is expensive one but I am not complaining. |
Last words for today, is it really so hard for developers to compile a hex file for testing instead of provide the link no one instead of developers understands? We could work together but this is not the way... I am so angry I found iNav, it was so promising but it only drives ma nuts. |
such contributions help no one here. I can understand you well, it also annoys me very much that this problem exists and have also lost a dart xl... @stronnag First test is running, lets see what happens..... |
@stronnag FC Freeze around 40min |
@RobinatiNav this is the first and final warning. Either you will start acting with respect towards INAV developers, contributors, and pilots, or I will ban your account and report to GitHub abuse. Your comments and general attitude in the last few weeks are anything but helpful. Instead of driving the discussion forward and being helpful and respectful to others, you only managed to irritate all the devs that contributed in the GCC and ExBus issues. This is not how issues in the open-source world are solved. This includes not sending personal emails to INAV core members with demands. Such behavior will not be tolerated as well. Finally, I would like to remind you a fragment from the INAV license that you agreed to upon downloading:
|
I am angry with you Pawel and Darren in particular. You never helped me even I asked for it many times. That's why I am so frustrated. |
@DzikuVx Maybe you can try contacting marv-t, he implemented the Jeti code in BF. |
@RobinatiNav you are an adult, you should learn to manage your anger |
Thanks for testing. |
@RoadyFPV the thing is that this is not a driver code. Or at least, not directly driver related. Seems to me this is stack management related as ExBus works heavily with Strings. |
Is this helpful? what bothers me extremely, as soon as i set the tx frequency to 50Hz the fc doesn't seem to freeze anymore. i wrote an email to Jeti and asked if the tx frequency 50/100Hz affects the exbus output signal on the rx. But why does it work on GCC9 50Hz refrashrate test is running |
OK, right now i have a freeze in 50Hz mode too..... |
I'm not so convinced. I ran a 70 minute BBL through the SITL with JETI TX and telemetry at > 100Hz (each TX packet appending a telemetry request) without any issue or evidence of stack corruption. I appreciate this is a completely different runtime, but it's one with an MMU that is pretty smart at faulting on memory corruption. The recorded telem log also looking consistent (all starting
|
Could be. This is only my suspicion and they might be wrong. |
If i disable the Telemetry option the freezes are gone... seems like there is a timing issue in the tx/rx line? |
My view, based on your comment, the SITL experiment, and the behaviour of INAV serial transmission ( This is seriously difficult to track down; without the hardware that tickles this issue, almost impossible. |
last idea for testing from my side. i have now installed an resistor betwen rx/tx (2k2) (like the old way). Possible to reduce the telemetry update rate in the code? |
Freeze around 11 min with resistor |
As shown in #8905 CMAKE and various optimizations levels do not like each other with GCC 10 family.
This PR forces F722 always to
-Os
and F745-O2
On MR tasks execution times look fine on default settings (4kHz gyro and 2kHz on PID). Some in-flight tests might be useful as I don't have any F7 right now to test.
For more details see https://gist.github.com/stronnag/08f79fa9ae3c1f23e2f6631df1d37fb5#file-inav-and-modern-compilers-md prepared by @stronnag
Related to #8948
Might fix ExBus issues on F722 boards as defined in #8899