STM32 blink sketch type error

This is my first time hooking up the stm32 board to Arduino IDE, and I’m getting the error:

/Users/main/Documents/Arduino/hardware/Arduino_STM32/STM32F1/cores/maple/avr/dtostrf.c: In function 'dtostrf':
/Users/main/Documents/Arduino/hardware/Arduino_STM32/STM32F1/cores/maple/avr/dtostrf.c:34:3: error: unknown type name 'uint8_t'

I’ve tried putting #include <Arduino.h> and #include <stdint.h> like they suggested online, but the error persists.

I’m running the sample blink sketch for stm32:

#include <Arduino.h>
#include <stdint.h> 
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin PB1 as an output.
  pinMode(PB1, OUTPUT);

// the loop function runs over and over again forever
void loop() {
  digitalWrite(PB1, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(PB1, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second

On a Bluepill it compiles without errors for me. I upload using an STLink without errors. If I replace all PB1 uses by PC13 then the builtin LED blinks.

I suspect you have an error in your configuration. Which STM32 boards manager did you install?

The STM32 environment has got a bit confusing since Roger Clark abandoned his development.

I've just being playing today with the STM supported Arduino environment with both a Nucleo-64 STMF103 and a Bluepill using the STM supported core. I've got as far as getting a working blink sketch on both boards. I even managed to use the ST-Link/SWD programmer built into the Nucleo to load a sketch on to the Bluepill.

Anyway, I suppose the first question is about which core you are using. Are you using the new core referenced here : Getting Started · stm32duino/wiki Wiki · GitHub - look in you preferences to see if the json Boards Manager file matches. MapleLeaf, however, does sound old.

Hi, I tried running the blink sketch again but I'm unable to recreate the error I got earlier. Now I'm getting

Failed to init device.
stm32flash Arduino_STM32_0.9

Using Parser : Raw BINARY
Interface serial_posix: 115200 8E1

An error occurred while uploading the sketch

I'm uploading with serial, and the port that automatically pops up when I connect my bluepill is called /dev/cu.usbmodem14101.

I have the "STM32F1xx/GD32F1xx boards" manager by stmduino. When I checked board manager URLs in preferences it was blank, and I added

I don't know if you have solved the problem in the meantime. Anyway, I now realise that the situation regarding the different cores for the STM32 (say STM32F103C8T6 "Bluepill") is even more confusing that I had presented it, because the term "STM32duino" is used for objects out of the old (Roger Clark) era as well as for the relatively recent official ST Microsystems supported development.

This article is excellent for making things clear: Program "blue pill" with STM32 Cores in Arduino IDE · One Transistor

If you are able to make a fresh start, then I would recommend clearing all STM32 relics out of your Arduino IDE and starting again with the ST Microsystems supported development, following this link: Getting Started · stm32duino/wiki Wiki · GitHub . There is only one "extra" piece of software you have to install, that is the STM32CubeProgrammer.

The board manager entry which you mentioned, "STM32F1xx/GD32F1xx boards" , appears no longer to be available in the current Arduino IDE boards manager. The "Dan.Drown" board manager URL which you have you have found is from the Roger Clark era, however, and may make it visible.

You also have the option of posting STM32 issues on forum.