Compile error please help

Hi Community,

i m using visual studio code with platformino with arduino

i m trying to compile SimpleFoc examples named HMBGC

i install simplefoc library and Pcimanager library

But i m getting that errors , i couldnt solve it.

src\main.cpp:33:43: error: invalid conversion from ‘void ()()’ to 'void ()(byte) {aka void (*)(unsigned char)}’ [-fpermissive]

*** [.pio\build\mkrwifi1010\src\main.cpp.o] Error 1

Can you please help?

Hey Boris,

Can you show us your platrofmio.ini file?
And your main.cpp file?

thanks for quick reply
i deleted lib_archive = false from platrofmio.ini file
Now its working :))

By the way is it correct method?

Yep, It is very important to include this in your ini file :smiley:

That s my ini file

platform = atmelavr
board = uno
framework = arduino
lib_deps =
    askuric/Simple FOC@^2.2.1

Dear @Borris123 ,

When using PlatformIO, you currently need to use the option
lib_archive = false
in your platformio.ini

Are you saying it does not compile when using this option?

Yes if i use lib_archive = false
it doesnt compile


This part confuses me… are you building for MKR1010 Wifi or for Uno?
Those boards use different platform cores, the MKR1010 is a SAMD21 based board, the Uno is atmelavr.

I did a quick test project for Arduino UNO, and the following compiled for me with no problems, including the option lib_archive = false

Dependency Graph
|-- <PciManager> 2.1.4
|-- <Simple FOC> 2.2.1
|   |-- <Wire> 1.0
|   |-- <SPI> 1.0

So my conclusion is there is something somehow wrong with your setup. Perhaps it will help if you upgrade PlatformIO, upgrade all your platforms and frameworks, and then maybe re-create the project from scratch.
Because at the moment it looks like something is mixed up.

Thank you, i will try again