Bare-metal configuration for a Bluepill board.
Warning
It does not work with the Mbed Online Compiler.
Follow these steps to import and compile them with Mbed CLI:
mbed import https://os.mbed.com/users/hudakz/code/Baremetal_Blinky_Bluepill mbed compile -t GCC_ARM -m bluepill
main.cpp
- Committer:
- hudakz
- Date:
- 2020-05-14
- Revision:
- 1:57decb93282e
- Parent:
- 0:a04710facbb6
File content as of revision 1:57decb93282e:
/* mbed Microcontroller Library * Copyright (c) 2019 ARM Limited * SPDX-License-Identifier: Apache-2.0 */ #include "mbed.h" // Blinking rate in milliseconds #define BLINKING_RATE_MS 500 int main() { // Initialise the digital pin LED1 as an output DigitalOut led(LED1); while (true) { led = !led; wait_ms(BLINKING_RATE_MS); } }