stm32duino / BoardManagerFiles

Storage for Arduino Board Manager JSON and package files etc
BSD 3-Clause "New" or "Revised" License
104 stars 90 forks source link

Problems with Variant_h #34

Closed nicoverduin closed 2 years ago

nicoverduin commented 2 years ago

HI, I use the Sloeber-IDE 4.4 from Jantje. If I use the old deprecated package of STM32duino 1.9.0 it works fine. Now I am using the new 2.0.0 and it seems that the variant.h is not working quite corectly. I has a line #include VARIANT_H where this variable is substituted in the right variant include file. The compiler complains that it cannot process the include statement. If I add \" in front and at the end of the string, all works fine.

nicoverduin commented 2 years ago

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} -DARDUINOARCH${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} -DARDUINOARCH${build.arch} "-DBOARD_NAME=\"${build.board}\"" -DVARIANT_H=\""${build.variant_h}\""

Now it works like a charm Regards Nico

fpistm commented 2 years ago

This is linked to sloeber so open an issue to it.