Skip to content

Error in Variant.h with STM32 #1404

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

Closed
nicoverduin opened this issue Nov 4, 2021 · 4 comments
Closed

Error in Variant.h with STM32 #1404

nicoverduin opened this issue Nov 4, 2021 · 4 comments

Comments

@nicoverduin
Copy link
Contributor

In de STM32duino library an error occurs when I create an stm32 project. There is an environment variable called VARIANT.H which is opened in a file called variant.h. The problem that occurs is that VARIANT_H is used in a statemetn #include VARIANT_H.
This environment variable comes from build.variant_h. And in the source code it is translated without the extra double quotes. Below is a fix for it.

The cause is in a file called sloeber.txt in the folder : D:\Sloeber_4.4\arduinoPlugin\packages\STMicroelectronics\hardware\stm32\2.1.0.

I modified the line :

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}"

into

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}""

Now it works like a charm
Regards
Nico

@jantje
Copy link
Member

jantje commented Nov 4, 2021

IMHO This has been reported in #1378 and confirmed as fixed in the nightly.

@nicoverduin
Copy link
Contributor Author

I just downloaded the stable 4.4 a couple of days ago. So I need to download the nightly build as well?

@jantje
Copy link
Member

jantje commented Nov 4, 2021

No I should release 4.4.1 but there are some problems :-(
I think the problem is fixed though.

@nicoverduin
Copy link
Contributor Author

I downloaded the nightly build and overwritten 4,4 with it. Deleted the whole STM32 package and re-installed it. Works like a charm. Thanks

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

No branches or pull requests

2 participants