Skip to content

Commit dee4143

Browse files
committed
[example] Add Nucleo H755ZI-Q dual-core blink example
1 parent 46cb036 commit dee4143

File tree

4 files changed

+90
-0
lines changed

4 files changed

+90
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) 2022, Christopher Durand
3+
*
4+
* This file is part of the modm project.
5+
*
6+
* This Source Code Form is subject to the terms of the Mozilla Public
7+
* License, v. 2.0. If a copy of the MPL was not distributed with this
8+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
9+
*/
10+
// ----------------------------------------------------------------------------
11+
12+
#include <modm/board.hpp>
13+
14+
using namespace Board;
15+
16+
int
17+
main()
18+
{
19+
Board::initialize();
20+
21+
while(1)
22+
{
23+
LedGreen::toggle();
24+
modm::delay_ms(1000);
25+
}
26+
return 0;
27+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<library>
2+
<extends>modm:nucleo-h755zi-q</extends>
3+
<options>
4+
<option name="modm:build:build.path">../../../build/nucleo_h755zi-q/blink_cm4</option>
5+
<option name="modm:target">stm32h755zit6@m4</option>
6+
</options>
7+
<modules>
8+
<module>modm:build:scons</module>
9+
</modules>
10+
</library>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright (c) 2022, Christopher Durand
3+
* Copyright (c) 2016-2017, Niklas Hauser
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+
13+
#include <modm/board.hpp>
14+
15+
using namespace Board;
16+
17+
int
18+
main()
19+
{
20+
Board::initialize();
21+
Leds::setOutput();
22+
23+
// Use the logging streams to print some messages.
24+
// Change MODM_LOG_LEVEL above to enable or disable these messages
25+
MODM_LOG_DEBUG << "debug" << modm::endl;
26+
MODM_LOG_INFO << "info" << modm::endl;
27+
MODM_LOG_WARNING << "warning" << modm::endl;
28+
MODM_LOG_ERROR << "error" << modm::endl;
29+
30+
uint32_t counter(0);
31+
32+
LedYellow::set();
33+
while (true)
34+
{
35+
LedYellow::toggle();
36+
LedRed::toggle();
37+
modm::delay(Button::read() ? 100ms : 500ms);
38+
39+
MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
40+
}
41+
42+
return 0;
43+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<library>
2+
<extends>modm:nucleo-h755zi-q</extends>
3+
<options>
4+
<option name="modm:build:build.path">../../../build/nucleo_h755zi-q/blink_cm7</option>
5+
<option name="modm:target">stm32h755zit6@m7</option>
6+
</options>
7+
<modules>
8+
<module>modm:build:scons</module>
9+
</modules>
10+
</library>

0 commit comments

Comments
 (0)