Skip to content

Fix LINKFLAGS containing a tuple in platformio build script #2751

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

Merged

Conversation

Stary2001
Copy link
Contributor

This PR fixes an issue in the platformio build script where a tuple containing the arguments is placed into LINKFLAGS. This broke a custom script in a different project (Bosch BSEC2 sensor library) that looks at LINKFLAGS.
I'm not sure how it worked before..

I've tested this locally and it's a minor change.

@fpistm
Copy link
Member

fpistm commented Jun 9, 2025

Hi @Stary2001
Thanks for the PR.
@valeros I guess you are the best to approve this change.

@fpistm fpistm added this to the 2.11.0 milestone Jun 10, 2025
@fpistm fpistm added the fix 🩹 Bug fix label Jun 10, 2025
@valeros
Copy link
Contributor

valeros commented Jun 11, 2025

Hi guys, thanks for pinging.

@Stary2001 Could you please share a project to reproduce the issue?

Stary2001 added a commit to Stary2001/pio-project-for-pr-2751 that referenced this pull request Jun 13, 2025
@Stary2001
Copy link
Contributor Author

@valeros I've made a simple reproducer here - https://github.com/Stary2001/pio-project-for-pr-2751
It doesn't need anything, apart from lib_deps = boschsensortec/bsec2 - it fails before compiling any source files.

The extra script they use is here: https://github.com/boschsensortec/Bosch-BSEC2-Library/blob/master/extra_script.py#L18 - it iterates over LINKFLAGS to find the mcpu= argument that's being used.

@valeros
Copy link
Contributor

valeros commented Jun 17, 2025

@Stary2001 thanks for a detailed reply. I've pushed your fix to PlatformIO registry.

@fpistm Feel free to merge the PR.

@fpistm fpistm merged commit 729b087 into stm32duino:main Jun 17, 2025
3 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in STM32 core based on ST HAL Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix 🩹 Bug fix
Projects
Development

Successfully merging this pull request may close these issues.

4 participants