My issue is that:
I try to run the stm32 blink example in PlatformIO but “Arduino.h” is always marked as not found.
It’s just the imported example.
I tried to create a new bluepill stm32f1 project but same issue, also same issue with generic_stm32f103c8.
Vscode and PlatformIo latest version
I already tried to manually add build_flags= -I “path to framework arduino stm32/**” .
It finds the arduino.h but not all related headers like wiring_time.h although they are in subfoders…
Here is a screenshot:
That should not be necessary in any case.
Does the project build for one environment? If yes, do a Ctrl+Shift+P->Rebuild IntelliSense.
Do you also know why you seem to have 2 PlatformIO icons in the left sidebar?
Everything about STM32f103 and Arduino doesn’t work, I tried to rebuild Intellisense without results, here is a new screenshot for an example with the Bluepill.
Here is what the terminal say: Hastebin: Send and Save Text or Code Snippets for Free | Toptal®
The 2 PlatformIO icons are the default one and a shortcut for managing my code structure.
I had programmed Arduino Chips and ATtiny85/84 with PIO before, without any problem.
Your packages probably got corrupted. Delete the folder
C:\Users\<user>\.platformio\packages\framework-arduinoststm32 and retry building.
Ok, thank you very much, I will wait until I have a good internet connection because I am limited now. I hope it will work out, I like PlatformIO and I hope I won’t have to go back to Arduino IDE
Thank you very much, it worked.
Here is what my terminal says: Hastebin: Send and Save Text or Code Snippets for Free | Toptal®
But how can I prevent it to be corrupted again?
This looks good now.
Well now that it’s properly downloaded it won’t just self-destory again. You can of course keep a backup copy of the packages folder (
C:\Users\<user>\.platformio\packages) to restore once-working packages again in such a case, but that’s unlikely to happen.