Thanks, but I already tried importing my ino file from my Arduino project into platformio and got the same error. I think it must be due to some defines that are different, but I don’t know how to see what the differences are.
The code around the error is:
#if (RH_PLATFORM == RH_PLATFORM_STM32)
// Maple etc
#elif defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4)
// And stm32duino
#elif (RH_PLATFORM == RH_PLATFORM_ESP32)
With the error being:
.pio\libdeps\genericSTM32F103CB\RadioHead\RH_ASK.cpp:18:21: error: invalid conversion from 'int' to 'TIM_TypeDef*' [-fpermissive]
18 | HardwareTimer timer(1);
If I force it to use the first section by defining RH_PLATFORM = RH_PLATFORM_STM32 it compiles, but crashes.
Actually, I think I ended up just ifdeffing out that whole file, but it makes me think that the STM32 framework that I’m using in platformio is different from what I’m using in arduino, which I believe is this: https://github.com/stm32duino/Arduino_Core_STM32
It also took me quite a while just to find a arduino framework that worked, with all the different bootloaders and flashing options, etc. I finally got it to work with no bootloader and flashing via serial. I would also love to use a bootloader, but all the ones I tried either didn’t work, or seemed to flash over themselves, so they only lasted one flash.