Skip to content
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

update f4 vcp in line with BF #9544

Merged
merged 1 commit into from
Dec 7, 2023
Merged

update f4 vcp in line with BF #9544

merged 1 commit into from
Dec 7, 2023

Conversation

stronnag
Copy link
Collaborator

@stronnag stronnag commented Dec 6, 2023

Second attempt to fix F4 VCP lockups with modern (post-GCC 10) compilers.

The PR updates the F4 VCP code, in particular using volatile for queue indices and improves the calculation of queue full. The code is basically synced with that from betaflight.

Tested with dump all on a number of F4 FCs, all of which locked up with GCC 13.2 firmware prior to this PR. With the PR applied, 48KB dump all completes correctly with no data overruns or lockups.

In addition to preventing potential lockup, this PR opens the possibility to move to more modern compilers, offering
useful saving in flash usage.

For example GCC13.2 compiled firmware is c. 5KB smaller than GCC 10.3 compiled firmware.

@stronnag stronnag added this to the 7.1 milestone Dec 6, 2023
@stronnag stronnag merged commit 9ba7868 into master Dec 7, 2023
14 checks passed
@DzikuVx DzikuVx deleted the jh_revise_f4_vcp branch April 14, 2024 16:56
JulianTiller pushed a commit to JulianTiller/inav that referenced this pull request Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant