Skip to content

Commit 0cf1c65

Browse files
salkiniumchris-durand
authored andcommitted
[examples] Add Nucleo_L031K6 blink example
1 parent 26d4909 commit 0cf1c65

File tree

5 files changed

+56
-3
lines changed

5 files changed

+56
-3
lines changed

.github/workflows/linux.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ jobs:
107107
if: always()
108108
run: |
109109
(cd examples && ../tools/scripts/examples_compile.py nucleo_g071rb)
110+
- name: Examples STM32L0 Series
111+
if: always()
112+
run: |
113+
(cd examples && ../tools/scripts/examples_compile.py nucleo_l031k6)
110114
- name: Examples STM32L1 Series
111115
if: always()
112116
run: |
@@ -280,7 +284,7 @@ jobs:
280284
uses: actions/checkout@v2
281285
- name: Update submodules and install lbuild
282286
run: |
283-
(git submodule sync && git submodule update --init --jobs 8) & pip3 --upgrade --upgrade-strategy=eager modm & wait
287+
(git submodule sync && git submodule update --init --jobs 8) & pip3 install --upgrade --upgrade-strategy=eager modm & wait
284288
- name: Test run of docs.modm.io-generator-script
285289
if: always()
286290
run: |

.github/workflows/macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
- name: Compile STM32 Examples
6464
run: |
6565
(cd examples && ../tools/scripts/examples_compile.py nucleo_f031k6 nucleo_f103rb nucleo_f303re nucleo_f411re nucleo_f746zg)
66-
(cd examples && ../tools/scripts/examples_compile.py nucleo_g071rb nucleo_l152re nucleo_l476rg nucleo_g474re)
66+
(cd examples && ../tools/scripts/examples_compile.py nucleo_g071rb nucleo_l031k6 nucleo_l152re nucleo_l476rg nucleo_g474re)
6767
6868
- name: Compile AVR Examples
6969
run: |

.github/workflows/windows_armcortexm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
shell: bash
5757
run: |
5858
(cd examples && python ../tools/scripts/examples_compile.py nucleo_f031k6 nucleo_f103rb nucleo_f303re nucleo_f411re nucleo_f746zg)
59-
(cd examples && python ../tools/scripts/examples_compile.py nucleo_g071rb nucleo_l152re nucleo_l476rg nucleo_g474re)
59+
(cd examples && python ../tools/scripts/examples_compile.py nucleo_g071rb nucleo_l031k6 nucleo_l152re nucleo_l476rg nucleo_g474re)
6060
6161
# - name: Compile AVR Examples
6262
# shell: bash
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (c) 2016-2017, Niklas Hauser
3+
* Copyright (c) 2017, Nick Sarten
4+
*
5+
* This file is part of the modm project.
6+
*
7+
* This Source Code Form is subject to the terms of the Mozilla Public
8+
* License, v. 2.0. If a copy of the MPL was not distributed with this
9+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
10+
*/
11+
12+
#include <modm/board.hpp>
13+
14+
using namespace Board;
15+
16+
int
17+
main()
18+
{
19+
Board::initialize();
20+
LedD13::setOutput();
21+
22+
// Use the logging streams to print some messages.
23+
// Change MODM_LOG_LEVEL above to enable or disable these messages
24+
MODM_LOG_DEBUG << "debug" << modm::endl;
25+
MODM_LOG_INFO << "info" << modm::endl;
26+
MODM_LOG_WARNING << "warning" << modm::endl;
27+
MODM_LOG_ERROR << "error" << modm::endl;
28+
29+
uint32_t counter(0);
30+
31+
while (true)
32+
{
33+
LedD13::toggle();
34+
modm::delay(Button::read() ? 100ms : 500ms);
35+
36+
MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
37+
}
38+
39+
return 0;
40+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<library>
2+
<extends>modm:nucleo-l031k6</extends>
3+
<options>
4+
<option name="modm:build:build.path">../../../build/nucleo_l031k6/blink</option>
5+
</options>
6+
<modules>
7+
<module>modm:build:scons</module>
8+
</modules>
9+
</library>

0 commit comments

Comments
 (0)