From b4eddeb6d5ef1cac430e86987aa611d06b2acdab Mon Sep 17 00:00:00 2001 From: Henrik Hose Date: Thu, 16 Sep 2021 18:26:58 +0200 Subject: [PATCH] [examples] Add DevEBox STM32H750VB blink example --- .github/workflows/linux.yml | 2 +- examples/stm32h750vbt6_devebox/blink/main.cpp | 28 +++++++++++++++++++ .../stm32h750vbt6_devebox/blink/openocd.cfg | 1 + .../stm32h750vbt6_devebox/blink/project.xml | 10 +++++++ 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 examples/stm32h750vbt6_devebox/blink/main.cpp create mode 100644 examples/stm32h750vbt6_devebox/blink/openocd.cfg create mode 100644 examples/stm32h750vbt6_devebox/blink/project.xml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 57659fb3dc..ee388a016c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -131,7 +131,7 @@ jobs: - name: Examples STM32H7 Series if: always() run: | - (cd examples && ../tools/scripts/examples_compile.py nucleo_h743zi nucleo_h723zg) + (cd examples && ../tools/scripts/examples_compile.py nucleo_h743zi nucleo_h723zg stm32h750vbt6_devebox) stm32f4-examples-1: runs-on: ubuntu-20.04 diff --git a/examples/stm32h750vbt6_devebox/blink/main.cpp b/examples/stm32h750vbt6_devebox/blink/main.cpp new file mode 100644 index 0000000000..a88e7fc2a7 --- /dev/null +++ b/examples/stm32h750vbt6_devebox/blink/main.cpp @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2021, Henrik Hose + * + * This file is part of the modm project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +// ---------------------------------------------------------------------------- + +#include + +using namespace Board; + +int +main() +{ + Board::initialize(); + + while(true) + { + LedGreen::toggle(); + modm::delay(100ms + ButtonK1::read()*500ms + ButtonK2::read()*1000ms); + } + + return 0; +} diff --git a/examples/stm32h750vbt6_devebox/blink/openocd.cfg b/examples/stm32h750vbt6_devebox/blink/openocd.cfg new file mode 100644 index 0000000000..06065b98c7 --- /dev/null +++ b/examples/stm32h750vbt6_devebox/blink/openocd.cfg @@ -0,0 +1 @@ +source [find interface/stlink.cfg] diff --git a/examples/stm32h750vbt6_devebox/blink/project.xml b/examples/stm32h750vbt6_devebox/blink/project.xml new file mode 100644 index 0000000000..abe3825daa --- /dev/null +++ b/examples/stm32h750vbt6_devebox/blink/project.xml @@ -0,0 +1,10 @@ + + modm:devebox-stm32h750vb + + + + + + modm:build:scons + +