Thank you for your tutorial,
I’ve also been using platformio on atom. Compared with Arduino IDE, platformio ide has better interface effect and function Association
We have an online version of the tutorial as well:
If using PlatformIO with SimpleFOC, its important to add the option
lib_archive = false
to your platformio.ini
The error you post looks like a setup error of some kind, it has nothing to do with SimpleFOC. it means the Arduino (atmelavr) platform is not installed.
When using PlatformIO, you have to go the “Platforms” pane, and install the correct platform for your MCU. Ardunio, STM32 and ESP32 all have separate platforms.
Hi @runger,
I tried to install SimpleFOC on PlatformIO, but I get error during compilation.
Compiling .pio\build\esp32doit-devkit-v1\lib862\Simple FOC\drivers\hardware_specific\esp32_mcu.cpp.oCompiling .pio\build\esp32doit-devkit-v1\lib862\Simple FOC\drivers\hardware_specific\esp8266_mcu.cpp.o
.pio\libdeps\esp32doit-devkit-v1\Simple FOC\src\drivers\hardware_specific\esp32_ledc_mcu.cpp:21:26:
fatal error: soc/soc_caps.h: No such file or directory
compilation terminated.
*** [.pio\build\esp32doit-devkit-v1\lib862\Simple FOC\drivers\hardware_specific\esp32_ledc_mcu.cpp.o] Error 1
=================================== [FAILED]
Any idea what I can do?
soc/soc_caps.h ---- should I try to find this file?
This error is caused by having the incorrect ESP32 platform version.
If you upgrade the ESP32 platform to the latest version, the error should go away.
Sometimes it also seems to be necessary to do a make clean and/or erase any cached parts of the project to get PlatformIO to compile with the new code.
PS C:\Users\Svein\Documents\PlatformIO\Projects\simple_tutorial\src> cd "c:\Users\Svein\Documents\PlatformIO\Projects\simple_tutorial\src" ; if (?) { g++ main.cpp -o main } ; if (?) { .\main }
g++ : The term ‘g++’ is not recognized as the name of a cmdlet, function, script file, or operable progr
am. Check the spelling of the name, or if a path was included, verify that the path is correct and try a
gain.
At line:1 char:84
… nts\PlatformIO\Projects\simple_tutorial\src" ; if ($?) { g++ main.cp …
This means there is something wrong in your platformio.ini…
And these are a problem in the code, these variables are not declared…
(And you can’t have more than one current sense anyway, unfortunately we only support one at the moment)
For sure you can! The results should be the same in either environment, it’s just what you feel more comfortable working with…
Arduino IDE is easier to use, with fewer options. PlatformIO is much more powerful, but can be confusing if you’re new to programming or aren’t familiar with visual studio code