-
-
Notifications
You must be signed in to change notification settings - Fork 114
Precompiled libs feature doesn't account for floating point mcu variants #256
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
Comments
Hi @kgoveas , |
Hi @facchinm , Do you mean like a folder structure like cortex-m4, cortex-m4-sfp, cortex-m4-hfp? If so, what references would you use from the platform.txt file apart from the {build.mcu}? |
Probably {build.mfloat-abi} is the only way to extract that information but it must be declared in board.txt and not directly on the commandline... It's a bit awkward but the most effective thing to do could be creating two different libraries (one for hardfloat variant) and including them selectively (maybe with |
How about using {build.arch} instead? It would create duplicates in case of archs that share the same MCU but it would also synchronize with the warning that would appear in the Arduino IDE. |
Ok, I had some time to take a look at the issue; the correct approach is probably the one adopted by STM32 core, which specifies all the information in |
Hi @facchinm , Yes, i guess this would work. I had come across this while testing on the STM32F411RE board. |
General change: - library compilation bails out if the precompiled object is found. This allows mixed libraries that fallback using sources if no suitable precompiled object is found ARM float specification change: - Cortex M4+ allows specifying different flags for floating point ABI This patch introduces a second level of subfolder that MUST be used is -mfpu or -mfloat-abi are specified on the commandline Since there's no clear specification (unlike build.mcu), the values are extracted from c++ recipe For example, for a target which commandline contains `-mfloat-abi=hard -mfpu=fpv4-sp-d16` , the precompiled search path will be `$libfolder/cortex-m4/fpv4-sp-d16-hard` If that folder doesn't exist the library will be compiled from sources Fixes arduino/arduino-builder#256
General change: - library compilation bails out if the precompiled object is found. This allows mixed libraries that fallback using sources if no suitable precompiled object is found ARM float specification change: - Cortex M4+ allows specifying different flags for floating point ABI This patch introduces a second level of subfolder that MUST be used is -mfpu or -mfloat-abi are specified on the commandline Since there's no clear specification (unlike build.mcu), the values are extracted from c++ recipe For example, for a target which commandline contains `-mfloat-abi=hard -mfpu=fpv4-sp-d16` , the precompiled search path will be `$libfolder/cortex-m4/fpv4-sp-d16-hard` If that folder doesn't exist the library will be compiled from sources Fixes arduino/arduino-builder#256
Hi
The precompiled libs fix for the arduino builder doesn't account for the floating point unit variants of the mcu. Example: {build.mcu} = cortex-m4 but there are 2 variants of the MCU. With floating point and without floating point.
Unfortunately i have no input for how to know which mcu variant is in use. But the ldflags would be found in cortex-m4 or cortex-m4f.
The text was updated successfully, but these errors were encountered: