-
Notifications
You must be signed in to change notification settings - Fork 74
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
Remove packed attribute for uint32_t (new GCC-8 warning) #6
Conversation
Thanks for the patch. We need to be careful with things like this because the HAL can be picky when it comes to these kinds of things (see eg 1fe30d1). I think the With |
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 8-2018-q4-major) 8.2.1 20181213 (release) [gcc-8-branch revision 267074] downloaded from: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads |
Doing some research, it seems that ARM CC accepts the Then for gcc there is a compatibility macro in the HAL which defines https://answers.launchpad.net/gcc-arm-embedded/+question/452880 contains some more info about gcc in such a case, and the last post on that page provides a way to get it working in gcc by defining a packet struct with a single member (in this case it would be a uint32_t). I'm assuming that this packed qualifier never did anything on gcc (although that remains to be checked) and so I think the best way to handle it is to |
It seems the __packed is indeed used only for uint32_t in the whole stm32lib codebase, so it might make sense to undefine it for GCC in this lib. |
How about just undefining it in these ll_usb.c files? I.e. at the top of these .c files: |
I agree. |
Force pushed to my branch |
Sorry to be a bother, but I just realised this will need to be split into 4 separate commits (which can be all put in this same PR), one for each of the MCU variants. That makes it easier to maintain in the future, when the Cube HAL is updated. (Existing commits do this.) It'll also be good to add a C comment to this change, something like: Thanks! |
Updated the PR |
I realised this should not go to the vendor branch but rather to the latest active work-* branch. Superseded by #7 |
New GCC-8 complains about using packed attribute for uint32_t. This patch removes this extraneous usage.