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

Fix HardFault in Logging #295

Merged
merged 1 commit into from
Feb 12, 2018
Merged

Conversation

whoenig
Copy link
Contributor

@whoenig whoenig commented Feb 9, 2018

The logging subsystem could trigger a hard fault caused by unaligned assignment "variable = *(float *)ops->variable;".
This issue can be reproduced with the crazyswarm_master firmware when connecting to the cfclient.

The fix uses lowlevel memcpy to a local (aligned) variable before assignment.

The logging subsystem could trigger a hard fault caused by unaligned assignment "variable = *(float *)ops->variable;".
This issue can be reproduced with the crazyswarm_master firmware when connecting to the cfclient.

The fix uses lowlevel memcpy to a local (aligned) variable before assignment.
@ataffanel ataffanel merged commit 63b6b49 into bitcraze:master Feb 12, 2018
@ataffanel
Copy link
Member

I though CM-4 allowed unaligned access so this is surprising, but after checking it seems that un-aligned access only work for some instructions.
Thanks for the PR! I merge it.

@krichardsson krichardsson modified the milestones: Next release, 2018.10 Oct 18, 2018
cafeciaojoe pushed a commit to cafeciaojoe/crazyflie-firmware that referenced this pull request Sep 27, 2024
cafeciaojoe pushed a commit to cafeciaojoe/crazyflie-firmware that referenced this pull request Sep 27, 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.

3 participants