Using Platformio Core 5.2.5 Home 3.4.1
I am trying to build a project on a STM32F103C bluepill board using this STM32ADC library: GitHub - 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
Although my code uploads to the MCU, even a simple LED blink test does not work.
Here is how I’ve set up my .ini file:
[env:bluepill_f103c8]
platform = ststm32
framework = arduino
board = bluepill_f103c8_128k
board_build.core = maple
And here is the code I am trying to run:
#include <Arduino.h>
#include <STM32ADC.h>
#define LED_PIN PC13
void setup() {
pinMode(LED_PIN, OUTPUT); // LED out
}
void loop() {
// Blink the LED so we know we haven't crashed
digitalWrite(LED_PIN, HIGH);
delay(1000);
digitalWrite(LED_PIN, LOW);
delay(1000);
}
When I remove both board_build.core = maple from the .ini file and #include <STM32ADC.h> from the cpp file, the code blinks as expected.
I tried to put the STM32ADC library directly into the Library folder in my project but that didn’t work. I also checked every pin on the MCU after running the code to see if the pins are mapped differently with the STM32ADC library, but I didn’t find any pins outputting a high and low signal.
For full reference, the actual code I am trying to upload for this project is here: directional_speaker/main.cpp at master · gururise/directional_speaker · GitHub
Any help would be deeply appreciated. Cheers!