I’m running Win10, VSCode, and trying to compile a test program for an Arduino Framework and ststm32 platform.
In main.cpp the first line is #include <Arduino.h>
but I get the squiggly line under it and it says to update my include path and cannot open source file "variant.h" (dependency of "Arduino.h")
If I go ahead and compile I notice an odd path created:
C:\Users\georg\.platformio\packages\framework-arduinoststm32\system\STM32F4xx/stm32f4xx_hal_conf.h:4:10: fatal error: variant.h: No such file or directory
If I go to that directory files are there so it seems that the problem is that there is a forward slash before the file name instead of a back slash.
If I look at the beginning of the compile I see this:
Executing task: C:\Users\georg\.platformio\penv\Scripts\platformio.exe run <
Processing stm32test (platform: ststm32; board: IOTech_STM32F405; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/IOTech_STM32F405.html
PLATFORM: ST STM32 5.7.0 > IOTech Villara Tester
HARDWARE: STM32F405RGT6 168MHz, 192KB RAM, 1MB Flash
DEBUG: Current (stlink) External (stlink)
PACKAGES: framework-arduinoststm32 3.10700.191028 (1.7.0), toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
Warning! Cannot find linker script for the current target!
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 10 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio\build\stm32test\FrameworkArduino\HardwareSerial.cpp.o
Compiling .pio\build\stm32test\FrameworkArduino\HardwareTimer.cpp.o
Compiling .pio\build\stm32test\FrameworkArduino\IPAddress.cpp.o
Compiling .pio\build\stm32test\FrameworkArduino\Print.cpp.o
Compiling .pio\build\stm32test\FrameworkArduino\RingBuffer.cpp.o
Compiling .pio\build\stm32test\FrameworkArduino\Stream.cpp.o
Compiling .pio\build\stm32test\FrameworkArduino\Tone.cpp.o
Compiling .pio\build\stm32test\FrameworkArduino\USBSerial.cpp.o
In file included from C:\Users\georg\.platformio\packages\framework-arduinoststm32\system\Drivers\STM32F4xx_HAL_Driver\Inc/stm32f4xx_hal.h:30:0,
from C:\Users\georg\.platformio\packages\framework-arduinoststm32\system\Drivers\CMSIS\Device\ST\STM32F4xx\Include/stm32f4xx.h:250,
from C:\Users\georg\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32/stm32_def.h:34,
from C:\Users\georg\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32/clock.h:43,
from C:\Users\georg\.platformio\packages\framework-arduinoststm32\cores\arduino\wiring_time.h:23,
from C:\Users\georg\.platformio\packages\framework-arduinoststm32\cores\arduino\wiring.h:38,
from C:\Users\georg\.platformio\packages\framework-arduinoststm32\cores\arduino\Arduino.h:32,
from C:\Users\georg\.platformio\packages\framework-arduinoststm32\cores\arduino\HardwareSerial.cpp:26:
C:\Users\georg\.platformio\packages\framework-arduinoststm32\system\STM32F4xx/stm32f4xx_hal_conf.h:4:10: fatal error: variant.h: No such file or directory
Which I notice this error:
Warning! Cannot find linker script for the current target!
I have exited VSCode and deleted both the .pio and .vscode directories as well as uninstalling PlatformIO and reinstalling it but I can’t seem to find how to solve this.