/home/formigola/Arduino/libraries/Simple_FOC/src/drivers/hardware_specific/stm32_mcu.cpp: In function ‘int findIndexOfFirstPinMapEntry(int)’:
/home/formigola/Arduino/libraries/Simple_FOC/src/drivers/hardware_specific/stm32_mcu.cpp:415:10: error: ‘PinMap_TIM’ was not declared in this scope; did you mean ‘PinMap_PWM’?
415 | while (PinMap_TIM[i].pin!=NC) {
| ^~~~~~~~~~
| PinMap_PWM
/home/formigola/Arduino/libraries/Simple_FOC/src/drivers/hardware_specific/stm32_mcu.cpp: In function ‘int findIndexOfLastPinMapEntry(int)’:
/home/formigola/Arduino/libraries/Simple_FOC/src/drivers/hardware_specific/stm32_mcu.cpp:427:10: error: ‘PinMap_TIM’ was not declared in this scope; did you mean ‘PinMap_PWM’?
427 | while (PinMap_TIM[i].pin!=NC) {
| ^~~~~~~~~~
| PinMap_PWM
/home/formigola/Arduino/libraries/Simple_FOC/src/drivers/hardware_specific/stm32_mcu.cpp:428:45: error: ‘ALTX_MASK’ was not declared in this scope
428 | if ( pinName == (PinMap_TIM[i].pin & ~ALTX_MASK)
| ^~~~~~~~~
/home/formigola/Arduino/libraries/Simple_FOC/src/drivers/hardware_specific/stm32_mcu.cpp: In function ‘int findBestTimerCombination(int, int, int*, PinMap**)’:
/home/formigola/Arduino/libraries/Simple_FOC/src/drivers/hardware_specific/stm32_mcu.cpp:455:36: error: ‘PinMap_TIM’ was not declared in this scope; did you mean ‘PinMap_PWM’?
455 | searchArray[index] = (PinMap*)&PinMap_TIM[i];
| ^~~~~~~~~~
| PinMap_PWM
hi @Matteo_Formigli and @runger
I am basically having the same issue but instead nucleo i am using a blue pill. I don’t know wich files or where to modify them.
How to obtain the newest framework version? i am guessing this has something to do with platforms - st stm32 17.2.0 (this is the version im running now in Platformio)
Also, where to add the URL. Thanks for your time and help.
I think that at the time I simply uninstalled the STM lib from the board manager of the ARDUINO IDE and than reinstalled it. I use the bluepill too but I have no issues now. I don’t use platformio so I afraid that i can’t help you with this. Anyway I hope I provided you with some useful informations.
I managed to get it to compile by adding the library “PeripheralPins.h” and “pinmap.h” to the stm32_mcu.cpp file.
Also to upload, add: “upload_flags = -c set CPUTAPID 0x2ba01477” to the platformio.ini file. The reason this flag is needed is probably because of a clone chip
I’m also having other difficulties, in ArduinoIDE there are two ways for uploading the sketch, one uses stlink and the other also uses stlink but with stmCubeProgrammer (SWD) protocol. When I open the serial port, it shows:
MOT: Enable driver
to
Set the target angle using serial terminal.
But it when i send a command it doesn’t seems to recieve nothing, and also nothing gets back to the monitor. I have had an arduino nano working with a I2C sensor and terminal commands but I can’t do it with the blue pill. What do you think should i be looking for to get it to work?