mbed OS user guide
Ref: https://docs.mbed.com/docs/getting-started-mbed-os/en/latest/
以 Windows 為例.
- yotta Windows installer.
執行 run_yotta (可以用 開始, cmd search )
--
blinky example
> yotta search --limit 1000 target
以 stm32f429 為例, 可以看到 有 stm32f429i-disco-gcc
> yotta target stm32f429i-disco-gcc
> yotta install mbed-drivers
/source, app.cpp
#include "mbed-drivers/mbed.h" static void blinky(void) { static DigitalOut led(LED1); led = !led; printf("LED = %d \r\n",led.read()); } void app_start(int, char**) { minar::Scheduler::postCallback(blinky).period(minar::milliseconds(500)); }
> yt build
以 Windows 為例.
- yotta Windows installer.
執行 run_yotta (可以用 開始, cmd search )
--
blinky example
Create an empty folder, then move into that folder:
$ mkdir blinky
$ cd blinky
以 stm32f429 為例, 可以看到 有 stm32f429i-disco-gcc
> yotta target stm32f429i-disco-gcc
> yotta install mbed-drivers
/source, app.cpp
#include "mbed-drivers/mbed.h" static void blinky(void) { static DigitalOut led(LED1); led = !led; printf("LED = %d \r\n",led.read()); } void app_start(int, char**) { minar::Scheduler::postCallback(blinky).period(minar::milliseconds(500)); }
> yt build
留言
張貼留言