-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Change ST drivers to use ST's driver repos as submodules #5976
Conversation
I created an issue on the STMF4 HAL repo for the unused variable error we're seeing when trying to build the stm32f412zg_discovery board. |
Thank you! Do you want to wait for ST or should I fork and fix that build error? That's normally what we do if the source repo has a bug. |
@tannewt I'll leave that up to you. If/when they eventually fix it, I'm guessing we can switch back to theirs? |
It is probably safe to fork and fix by just removing the unused variable, it looks like the f7 qspi driver has this fixed: |
Yup, that'd be the idea. I'll make a fork and remove that line. Would you mind updating this PR after I do? |
STM32F4 HAL driver submodule changed to the fork in adafruit to fix the unused variable error until ST fixes it in their repo. |
It's also possible to silence diagnostics strictly within source files and headers from a third party, meaning it may not be necessary to fork a repo just to make the ST code compile cleanly with our preferred CFLAGS. To silence a warning inside a header controlled by a third party, modify the CFLAGS so that it is the "-isystem" flag that introduces the location where the header resides, rather than "-I" or "-iquote". For example, in the espressif port we have
To silence a warning inside a source file controlled by a third party, modify CFLAGS for that file only. For example, in the raspberrypi port we have
where SRC_SDK is filled with the list of files from the pico sdk that we use. |
@jepler you're getting outside my comfort zone. If you can tell me what to add to what file, I can switch back to using the ST submodule and add something to the Makefile to ignore unused variable warnings just for the qspi driver. |
I think the method that @tannewt suggested with the Adafruit fork is a little cleaner and easier to remember what to update when ST does fix their code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick update!
@jepler Thanks for the tip. I didn't know we could do that for C files. Perhaps we need a separate file or section for fixes like that.
This will update the ST drivers to the latest from ST, as well as fix issue #5968 .
I had to have the CMSIS_5 submodule point to tag 5.4.0, as I was getting the error in the below issue when trying to build CircuitPython with the latest CMSIS_5.
ARM-software/CMSIS_5#1397