Skip to content
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

4.4 nightly Windows - Arduino incompatibility in expansion of double quotes from platform.txt #1369

Closed
ArminJo opened this issue Aug 10, 2021 · 9 comments
Labels
domain: build The build does not work as the Arduino IDE. importance: board specific OS: all status: Arduino IDE incompatibility Somethig that is not exactly the same as the arduino ide status: fixed in 4.4.1 status: workaround documented A workaround has been confirmed to solve this issue.

Comments

@ArminJo
Copy link

ArminJo commented Aug 10, 2021

The compiler flags from the platform.txt for the 2.0.0 version from https://github.com/stm32duino/BoardManagerFiles/raw/master/package_stmicroelectronics_index.json
2021-08-10 17_10_45-Properties for NeoPatterns_BluePill_STM32_stm32

are:
build.info.flags=-D{build.series} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DBOARD_NAME="{build.board}" -DVARIANT_H="{build.variant_h}"
and are converted in platform.sloeber.txt to:
build.info.flags=-D${build.series} -DARDUINO=${runtime.ide.version} -DARDUINO_${build.board} -DARDUINO_ARCH_${build.arch} "-DBOARD_NAME=\"${build.board}\"" -DVARIANT_H="${build.variant_h}"

This results in the commandline: ... -DARDUINO_ARCH_STM32 "-DBOARD_NAME=\"BLUEPILL_F103C8\"" -DVARIANT_H="variant_PILL_F103Cx.h" ...

But in Arduino the comandline is different: ... -DARDUINO_ARCH_STM32 "-DBOARD_NAME=\"BLUEPILL_F103C8\"" "-DVARIANT_H=\"variant_PILL_F103Cx.h\"" ...

The -DVARIANT_H="variant_PILL_F103Cx.h" does not work! It requires at least a -DVARIANT_H="variant_PILL_F103Cx.h" at the commandline.
Workaround is to add a compile option -DVARIANT_H=\"variant_PILL_F103Cx.h\" to override the defect value.

@jantje
Copy link
Member

jantje commented Aug 10, 2021

I'm confused here.
From the title of the issue it looks like there is a quoting issue where the example and workaround also provide a different value

@ArminJo
Copy link
Author

ArminJo commented Aug 10, 2021

You are right, I missed to select the correct BluePill variant in Arduino. But this does not matter, so I corrected the above issue description.

@jantje
Copy link
Member

jantje commented Aug 10, 2021

Thanks
I see that -DVARIANT_H is not handled when doing the double quoting workaround processing
So I confirm the issue and the workaround looks great 👍
It may be even better to set the compile command as -DVARIANT_H=\"${build.variant_h}\" to avoid problems when changing variant

@ArminJo
Copy link
Author

ArminJo commented Aug 11, 2021

Thanks for the hint, I changed my workaround, to be more flexible 👍 .

@jantje jantje added domain: build The build does not work as the Arduino IDE. importance: board specific OS: all status: Arduino IDE incompatibility Somethig that is not exactly the same as the arduino ide status: workaround documented A workaround has been confirmed to solve this issue. labels Aug 11, 2021
jantje pushed a commit that referenced this issue Aug 22, 2021
@jantje jantje added the Status: waiting for confirmation fix works The nightly contains a fix but the fix has not yet been confirmed to work. label Aug 22, 2021
@jantje
Copy link
Member

jantje commented Aug 22, 2021

It should be fixed in the nightly (after next build).
Can you verify?

@ArminJo
Copy link
Author

ArminJo commented Aug 22, 2021

I just updated and the bug is not fixed.

@jantje
Copy link
Member

jantje commented Aug 23, 2021

Thanks for testing. 🎈
IMHO You were to early. Last successful nightly build is 12 hours ago and your comment is marked as 14 hours ago.
You can easily check whether you have the version with the fix by checking the first line in the sloeber.txt files. It should say
"#Sloeber created workaound file V1.02.test 20 "
6f0eaa4

So IMHO There should be a new nightly that contains the fix.

@ArminJo
Copy link
Author

ArminJo commented Aug 24, 2021

Fixed now 👍

@ArminJo ArminJo closed this as completed Aug 24, 2021
@jantje jantje added status: fixed in 4.4.1 and removed Status: waiting for confirmation fix works The nightly contains a fix but the fix has not yet been confirmed to work. labels Aug 24, 2021
@jantje
Copy link
Member

jantje commented Aug 24, 2021

thanks for testing :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: build The build does not work as the Arduino IDE. importance: board specific OS: all status: Arduino IDE incompatibility Somethig that is not exactly the same as the arduino ide status: fixed in 4.4.1 status: workaround documented A workaround has been confirmed to solve this issue.
Projects
None yet
Development

No branches or pull requests

2 participants