rogerclarkmelbourne / Arduino_STM32

Arduino STM32. Hardware files to support STM32 boards, on Arduino IDE 1.8.x including LeafLabs Maple and other generic STM32F103 boards
Other
2.53k stars 1.26k forks source link

Can't use ArduinoModbus with STM32F1 Blue Pill (Maple Mini clone) #839

Closed requeijaum closed 3 years ago

requeijaum commented 3 years ago

Seems like a bug in this core. I already opened issues in other repositories.

https://github.com/stm32duino/Arduino_Core_STM32/issues/1279

https://github.com/arduino-libraries/ArduinoModbus/issues/47

stevstrong commented 3 years ago

It seems that this core is not prepared to include in a C file. The solution is to make conditional the include of CPP header files only when compiling with g++.

In order to get rid of the errors, please try to replace the attached files in the directory \Arduino_STM32\STM32F1\cores\maple. cores-maple-include-files.zip I have tested and it works for me but please let me know if this resolves the issue for you, too.

stevstrong commented 3 years ago

Have you managed to try my suggestion?

stevstrong commented 3 years ago

This commit should solve the problem.