Skip to content

Commit b4dc3c8

Browse files
committed
[examples] Deduplicate ITM example
1 parent a042cbb commit b4dc3c8

File tree

9 files changed

+6
-206
lines changed

9 files changed

+6
-206
lines changed

examples/blue_pill_f103/itm/main.cpp

Lines changed: 0 additions & 57 deletions
This file was deleted.

examples/blue_pill_f103/itm/openocd.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

examples/blue_pill_f103/itm/project.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.

examples/nucleo_l476rg/itm/main.cpp renamed to examples/generic/itm/main.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,25 @@
1515
using namespace Board;
1616

1717
modm::IODeviceWrapper<Itm, modm::IOBuffer::DiscardIfFull> itm_device;
18+
// Set all four logger streams to use ITM
1819
modm::IOStream stream(itm_device);
1920

2021
int
2122
main()
2223
{
2324
Board::initialize();
2425
Itm::initialize();
26+
Leds::setOutput();
2527

2628
stream << "Hello from the SWO." << modm::endl;
27-
stream << "debug" << modm::endl;
28-
stream << "info" << modm::endl;
29-
stream << "warning" << modm::endl;
30-
stream << "error" << modm::endl;
31-
3229

3330
while (true)
3431
{
3532
static modm::PeriodicTimer tmr{500ms};
3633
if (tmr.execute())
3734
{
3835
tmr.restart(Button::read() ? 100ms : 500ms);
39-
LedGreen::toggle();
36+
Leds::toggle();
4037

4138
static uint32_t counter{0};
4239
stream << "loop: " << counter++ << modm::endl;

examples/nucleo_f303re/itm/project.xml renamed to examples/generic/itm/project.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<library>
22
<extends>modm:nucleo-f303re</extends>
3+
<!-- <extends>modm:nucleo-l476rg</extends> -->
4+
<!-- <extends>modm:nucleo-f103rb</extends> -->
35
<options>
4-
<option name="modm:build:build.path">../../../build/nucleo_f303re/itm</option>
6+
<option name="modm:build:build.path">../../../build/generic/itm</option>
57
<option name="modm:platform:itm:buffer.tx">250</option>
68
</options>
79
<modules>

examples/nucleo_f103rb/itm/main.cpp

Lines changed: 0 additions & 49 deletions
This file was deleted.

examples/nucleo_f103rb/itm/project.xml

Lines changed: 0 additions & 15 deletions
This file was deleted.

examples/nucleo_f303re/itm/main.cpp

Lines changed: 0 additions & 49 deletions
This file was deleted.

examples/nucleo_l476rg/itm/project.xml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)