-
Notifications
You must be signed in to change notification settings - Fork 9
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
afatfs.cache unaligned with latest GCC #6
Comments
I think that comment must be a malware bot, definitely do not touch that. I've reported them to GitHub |
The change looks great, thanks, please submit that PR! |
Wow it's a different user posting the malware this time, I've reported them too. Hopefully GitHub gets on top of it. |
Repository owner
locked as spam and limited conversation to collaborators
Aug 28, 2024
Locking this issue so that we don't get any more of them appearing. |
Repository owner
unlocked this conversation
Aug 28, 2024
Repository owner
locked and limited conversation to collaborators
Aug 28, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have added your fine library to my simple asynchronous OS (https://github.com/sean-lawless/computersystems/tree/master/Lab20%20Mass%20Storage/fat). All was working fine last time I tested. Recently I upgraded my PC and installed the latest versions of all my embedded development tools and now the sdcard integration was broken.
It turns out that with the latest GCC (arm-none-eabi-gcc.exe (GCC) 13.3.0) the afatfs.cache[] compiles to be unaligned (starts at 3 bytes from the structure start). This caused the lower-level code (USB SD card) to complain about an unaligned buffer (not 4 byte-aligned) when writing data to the afatfs.cache (reading from SD).
I fixed this locally by moving the cache and descriptors above the enumerated types, as below. If you like the change I can make a pull request.
Compile settings (see link):
arm-none-eabi-gcc -c -Wall -ggdb -O0 -ffreestanding
The text was updated successfully, but these errors were encountered: