Arduino-FOC icon indicating copy to clipboard operation
Arduino-FOC copied to clipboard

[BUG] error: 'SIMPLEFOC_CURRENT_SENSE_INIT_FAILED' was not declared in this scope

Open TKroos18 opened this issue 3 years ago • 2 comments

Describe the bug lib\Arduino-FOC\src\current_sense\hardware_specific\stm32\stm32f4\stm32f4_mcu.cpp: In function 'void* _configureADCLowSide(const void*, int, int, int)': lib\Arduino-FOC\src\current_sense\hardware_specific\stm32\stm32f4\stm32f4_mcu.cpp:42:75: error: 'SIMPLEFOC_CURRENT_SENSE_INIT_FAILED' was not declared in this scope 42 | if(_adc_init(cs_params, (STM32DriverParams*)driver_params) != 0) return SIMPLEFOC_CURRENT_SENSE_INIT_FAILED; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Describe the hardware setup [env:genericSTM32F411CE] platform = ststm32 board = genericSTM32F411CE framework = arduino upload_protocol = stlink

IDE you are using

  • CLion + Platformio

TKroos18 avatar Sep 12 '22 05:09 TKroos18

For platformIO you should always add: lib_archive = false to platformio.ini

But this is not causing your problem.

For me,

[env:genericSTM32F411CE]
platform = ststm32
board = genericSTM32F411CE
framework = arduino

lib_archive = false

compiles without problems on the development branch of SimpleFOC.

So this issue is already fixed on the dev branch. You can use this branch in your project easily, either by referencing it in the platformio.ini, or by cloning it into the lib folder of your project.

runger1101001 avatar Sep 19 '22 21:09 runger1101001

Waiting for release 2.2.3 ...

runger1101001 avatar Sep 19 '22 21:09 runger1101001