Skip to content

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
@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