Skip to content

exclude fpu options from stm32wl55 #1474

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

Conversation

dolfandringa
Copy link
Contributor

Summary

This PR fixes bug

Arduino Core STM32 provides a platformio-build.py file that sets compiler build flags for Arduino Core STM32 in platformio. This file sets the -mfpu flag automatically for every cortex-m4 MCU. But according to the CMSIS drivers, the STM32WL55 does not contain an FPU, causing this python script to set the wrong compile time flags. The proposed PR fixes this by excluding the -mfpu option from the CPPDEFINES flags.

Validation

  • Ensure CI build is passed.
    The following sketch won't compile without it, but will with this fix:
#include <Arduino.h>

void setup() {
}

void loop() {
}

Closing issues

Fixes #1473

@fpistm
Copy link
Member

fpistm commented Aug 15, 2021

Please @valeros could you review this?

@valeros
Copy link
Contributor

valeros commented Aug 16, 2021

Hi @dolfandringa ! Many thanks for the PR. Please review my comments above.

@dolfandringa dolfandringa force-pushed the feature/support_stm32wl55jc1_on_platformio branch from 481d215 to a3673c9 Compare August 16, 2021 13:09
@dolfandringa dolfandringa force-pushed the feature/support_stm32wl55jc1_on_platformio branch from a3673c9 to 11bcd30 Compare August 16, 2021 13:12
@dolfandringa
Copy link
Contributor Author

With this PR, and the one I am submitting for platformio, I got a basic blink sketch to compile, upload and (gdb) debug correctly on the nucleo stm32wl55JC1.

@valeros
Copy link
Contributor

valeros commented Aug 16, 2021

LGTM.

@fpistm fpistm added this to the 2.1.0 milestone Aug 16, 2021
@fpistm fpistm added the enhancement New feature or request label Aug 16, 2021
@fpistm fpistm merged commit fa8bebd into stm32duino:master Aug 16, 2021
@fpistm
Copy link
Member

fpistm commented Aug 16, 2021

Thank you @valeros and @dolfandringa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

STM32WL platformio options for cortex-m4 turn on fpu, but STM32WL55 CMSIS driver defines __FPU_PRESENT=0
3 participants