Table of Contents

Mbed

Design

https://developer.mbed.org

Online

example programs > nucleo_blink_led > import this program
import > main.cpp

#include "mbed.h"

DigitalOut myled(LED1);

int main() {
    while(1) {
        myled = 1; // LED is ON
        wait(0.2); // 200 ms
        myled = 0; // LED is OFF
        wait(1.0); // 1 sec
    }
}

save > compile > file download (Nucleo_blink_led_NUCLEO_L476RG.bin)

Offline

install gcc-arm-none-eabi

sudo apt-get install gcc-arm-none-eabi

export program > toolchain > GCC (ARM Embedded)

arm-none-eabi-g++ -v
make