diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index 7036c52bd7..8d39d30988 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -92,15 +92,11 @@ jobs:
- name: Examples SAMD Devices
if: always()
run: |
- (cd examples && ../tools/scripts/examples_compile.py feather_m4 samd samd21_xplained_pro)
+ (cd examples && ../tools/scripts/examples_compile.py feather_m4 samd)
- name: Examples SAMG Devices
if: always()
run: |
(cd examples && ../tools/scripts/examples_compile.py samg55_xplained_pro)
- - name: Examples SAME5x Devices
- if: always()
- run: |
- (cd examples && ../tools/scripts/examples_compile.py same54_xplained_pro)
- name: Examples SAME70 Devices
if: always()
run: |
@@ -112,7 +108,7 @@ jobs:
- name: Examples RP20 Devices
if: always()
run: |
- (cd examples && ../tools/scripts/examples_compile.py feather_rp2040 rp_pico thingplus_rp2040)
+ (cd examples && ../tools/scripts/examples_compile.py rp_pico)
- name: Execute Python Scripts
if: always()
run: |
@@ -138,51 +134,43 @@ jobs:
- name: Examples STM32F0 Series
if: always()
run: |
- (cd examples && ../tools/scripts/examples_compile.py stm32f0_discovery stm32f072_discovery nucleo_f031k6 nucleo_f072rb nucleo_f091rc nucleo_f042k6 stm32f030f4p6_demo_board)
+ (cd examples && ../tools/scripts/examples_compile.py stm32f0_discovery stm32f072_discovery nucleo_f072rb nucleo_f042k6 stm32f030f4p6_demo_board)
- name: Examples STM32F1 Series
if: always()
run: |
- (cd examples && ../tools/scripts/examples_compile.py stm32f1_discovery nucleo_f103rb olimexino_stm32 blue_pill_f103 black_pill_f103)
+ (cd examples && ../tools/scripts/examples_compile.py stm32f1_discovery nucleo_f103rb blue_pill_f103)
- name: Examples STM32F3 Series
if: always()
run: |
- (cd examples && ../tools/scripts/examples_compile.py stm32f3_discovery nucleo_f303k8 nucleo_f303re nucleo_f334r8)
+ (cd examples && ../tools/scripts/examples_compile.py stm32f3_discovery nucleo_f303re)
- name: Examples STM32F7 Series
if: always()
run: |
- (cd examples && ../tools/scripts/examples_compile.py stm32f746g_discovery stm32f769i_discovery nucleo_f746zg nucleo_f767zi)
+ (cd examples && ../tools/scripts/examples_compile.py stm32f746g_discovery stm32f769i_discovery nucleo_f767zi)
- name: Examples STM32G0 Series
if: always()
run: |
- (cd examples && ../tools/scripts/examples_compile.py nucleo_g070rb nucleo_g071rb)
+ (cd examples && ../tools/scripts/examples_compile.py nucleo_g071rb)
- name: Examples STM32L0 Series
if: always()
run: |
- (cd examples && ../tools/scripts/examples_compile.py nucleo_l031k6 nucleo_l053r8)
- - name: Examples STM32L1 Series
- if: always()
- run: |
- (cd examples && ../tools/scripts/examples_compile.py nucleo_l152re stm32l1_discovery)
+ (cd examples && ../tools/scripts/examples_compile.py nucleo_l031k6)
- name: Examples STM32L4 Series
if: always()
run: |
- (cd examples && ../tools/scripts/examples_compile.py stm32l476_discovery nucleo_l476rg nucleo_l432kc nucleo_l452re nucleo_l496zg-p)
+ (cd examples && ../tools/scripts/examples_compile.py nucleo_l476rg nucleo_l432kc nucleo_l452re)
- name: Examples STM32L5 Series
if: always()
run: |
(cd examples && ../tools/scripts/examples_compile.py nucleo_l552ze-q)
- - name: Examples STM32U5 Series
- if: always()
- run: |
- (cd examples && ../tools/scripts/examples_compile.py nucleo_u575zi-q)
- name: Examples STM32G4 Series
if: always()
run: |
- (cd examples && ../tools/scripts/examples_compile.py nucleo_g474re nucleo_g431rb nucleo_g431kb)
+ (cd examples && ../tools/scripts/examples_compile.py nucleo_g474re)
- name: Examples STM32H7 Series
if: always()
run: |
- (cd examples && ../tools/scripts/examples_compile.py nucleo_h743zi nucleo_h723zg stm32h750vbt6_devebox)
+ (cd examples && ../tools/scripts/examples_compile.py nucleo_h723zg)
stm32f4-examples-1:
runs-on: ubuntu-22.04
@@ -202,7 +190,7 @@ jobs:
- name: Examples STM32F4 Only Discovery Board
if: always()
run: |
- (cd examples && ../tools/scripts/examples_compile.py stm32f4_discovery stm32f429_discovery stm32f469_discovery stm32f401_discovery)
+ (cd examples && ../tools/scripts/examples_compile.py stm32f4_discovery stm32f469_discovery stm32f401_discovery)
stm32f4-examples-2:
runs-on: ubuntu-22.04
@@ -225,7 +213,7 @@ jobs:
- name: Examples STM32F4 Without Discovery Board
if: always()
run: |
- (cd examples && ../tools/scripts/examples_compile.py nucleo_f401re nucleo_f411re nucleo_f429zi nucleo_f446re nucleo_f446ze nucleo_f439zi black_pill_f401 black_pill_f411 stm32f407vet6_devebox stm32_f4ve)
+ (cd examples && ../tools/scripts/examples_compile.py nucleo_f401re nucleo_f411re nucleo_f429zi nucleo_f446re nucleo_f446ze nucleo_f439zi stm32f407vet6_devebox stm32_f4ve)
avr-examples:
runs-on: ubuntu-22.04
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 81caab334b..5d833af92f 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -70,13 +70,18 @@ jobs:
run: |
(cd examples && ../tools/scripts/examples_compile.py linux)
- - name: Compile STM32 Examples
+ - name: Generic Examples
if: always()
run: |
- (cd examples && ../tools/scripts/examples_compile.py nucleo_f031k6 nucleo_f103rb nucleo_f303re nucleo_f411re nucleo_f746zg)
- (cd examples && ../tools/scripts/examples_compile.py nucleo_g071rb nucleo_l031k6 nucleo_l152re nucleo_l476rg nucleo_g474re)
+ (cd examples && ../tools/scripts/examples_compile.py generic)
+
+ - name: Compile STM32 Discovery Examples
+ if: always()
+ run: |
+ (cd examples && ../tools/scripts/examples_compile.py stm32f0_discovery stm32f072_discovery stm32f1_discovery stm32f3_discovery stm32f4_discovery)
+ (cd examples && ../tools/scripts/examples_compile.py stm32f401_discovery stm32f469_discovery stm32f746g_discovery stm32f769i_discovery)
- name: Compile AVR Examples
if: always()
run: |
- (cd examples && ../tools/scripts/examples_compile.py avr)
+ (cd examples && ../tools/scripts/examples_compile.py avr arduino_nano arduino_uno srxe)
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index f5795822a4..127592943a 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -100,24 +100,28 @@ jobs:
with:
submodules: 'recursive'
- - name: Hosted Examples
+ - name: Hosted Unittests
if: always()
shell: bash
run: |
- (cd examples && python ../tools/scripts/examples_compile.py linux/assert linux/block_device/ram linux/build_info linux/git linux/logger linux/printf linux/etl linux/fiber)
+ (cd test && make run-hosted-windows)
- - name: Hosted Unittests
+ - name: Hosted Examples
if: always()
shell: bash
run: |
- (cd test && make run-hosted-windows)
+ (cd examples && python ../tools/scripts/examples_compile.py linux)
- - name: Compile STM32 Examples
+ - name: Generic Examples
+ if: always()
+ run: |
+ (cd examples && ../tools/scripts/examples_compile.py generic)
+
+ - name: Compile STM32 Discovery Examples
if: always()
- shell: bash
run: |
- (cd examples && python ../tools/scripts/examples_compile.py nucleo_f031k6 nucleo_f103rb nucleo_f303re nucleo_f411re nucleo_f746zg)
- (cd examples && python ../tools/scripts/examples_compile.py nucleo_g071rb nucleo_l031k6 nucleo_l152re nucleo_l476rg nucleo_g474re)
+ (cd examples && ../tools/scripts/examples_compile.py stm32f0_discovery stm32f072_discovery stm32f1_discovery stm32f3_discovery stm32f4_discovery)
+ (cd examples && ../tools/scripts/examples_compile.py stm32f401_discovery stm32f469_discovery stm32f746g_discovery stm32f769i_discovery)
- name: Compile AVR Examples
if: always()
diff --git a/examples/README.md b/examples/README.md
index bdec775371..72fae7f3de 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -18,7 +18,7 @@ Change directory into any of the examples and compile it:
```sh
# cd into any example you like
-cd modm/examples/generic/blinky
+cd modm/examples/core/blinky
# generate modm library (call only once)
lbuild build
# compile the example
@@ -56,6 +56,69 @@ Have a look at the [build system documentation][build_docs] and the
[online documentation][docs].
+## Structure
+
+- core
+ - custom_allocator
+ - delay
+ - exceptions_rtti
+ - fiber
+ - flash
+ - hard_fault
+ - itm
+ - multi-core
+ - resumable
+ - rtt
+ - threadsafe_statics
+ - tlsf_allocator
+ - unaligned_access
+ - vector_table_ram
+- gpio
+ - blinky
+ - exti
+ - gpio
+ - ports
+- analog
+ - adc_dma
+ - comp
+ - dac
+- timer
+ - encoder_input
+ - pwm
+ - timer
+- logging
+ - logger
+ - printf
+ - uart
+- ui
+ - game_of_life
+ - graphics
+- driver
+ - can
+ - i2c
+ - single wire
+ - spi
+- communication
+ - amnb
+ - ethernet_freertos
+ - nrf24
+ - sab
+ - xpcc
+- ext
+ - cmsis_dsp
+ - etl
+ - freertos
+ - nanopb
+ - usb
+ - usb_dfu
+ - usbfatfs
+ - lvgl
+ - ros
+- board
+ - super custom board-specific examples
+ - ideally we get rid of this section
+
+
## Interesting Examples
We have hundreds of examples but here are some of our favorite ones for our
@@ -117,6 +180,12 @@ Here are some additional examples of displays and sensors we like:
+
+### Compiling Examples for Multiple Targets
+
+
+
+
### Copy Carefully
When copying from our examples make sure to set the repository path correctly!
@@ -134,10 +203,10 @@ The `modm/examples/lbuild.xml` file:
When you write your own application, you must set this
path yourself! -->
- ../repo.lb
+ ../repo.lb
- modm:docs
+ modm:docs
```
diff --git a/examples/arduino_nano/color/project.xml b/examples/arduino_nano/color/project.xml
index 3a249e8797..252c4b400f 100644
--- a/examples/arduino_nano/color/project.xml
+++ b/examples/arduino_nano/color/project.xml
@@ -1,8 +1,5 @@
modm:arduino-nano
-
-
-
modm:build:scons
modm:processing:protothread
diff --git a/examples/arduino_nano/encoder_input_bitbang/project.xml b/examples/arduino_nano/encoder_input_bitbang/project.xml
index 6a15971d34..e1c2fe4773 100644
--- a/examples/arduino_nano/encoder_input_bitbang/project.xml
+++ b/examples/arduino_nano/encoder_input_bitbang/project.xml
@@ -1,8 +1,5 @@
modm:arduino-nano
-
-
-
modm:build:scons
modm:processing:timer
diff --git a/examples/arduino_nano/printf/project.xml b/examples/arduino_nano/printf/project.xml
index 121c387559..5581fa4c73 100644
--- a/examples/arduino_nano/printf/project.xml
+++ b/examples/arduino_nano/printf/project.xml
@@ -1,7 +1,6 @@
modm:arduino-nano
-
diff --git a/examples/arduino_uno/basic/analog_read_serial/project.xml b/examples/arduino_uno/basic/analog_read_serial/project.xml
index fca2afa952..cdac186b02 100644
--- a/examples/arduino_uno/basic/analog_read_serial/project.xml
+++ b/examples/arduino_uno/basic/analog_read_serial/project.xml
@@ -1,8 +1,5 @@
modm:arduino-uno
-
-
-
modm:platform:adc
modm:build:scons
diff --git a/examples/arduino_uno/basic/blink/main.cpp b/examples/arduino_uno/basic/blink/main.cpp
deleted file mode 100644
index 904d97b400..0000000000
--- a/examples/arduino_uno/basic/blink/main.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2013-2014, Kevin Läufer
- * Copyright (c) 2013, 2016-2017, Niklas Hauser
- * Copyright (c) 2014, Sascha Schade
- *
- * 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/.
- */
-// ----------------------------------------------------------------------------
-
-// Inspired by: http://arduino.cc/en/Tutorial/Blink
-
-#include
-
-int
-main()
-{
- Board::initialize();
- LedD13::setOutput();
-
- while (true)
- {
- LedD13::set();
- modm::delay(1s);
- LedD13::reset();
- modm::delay(1s);
- }
-}
diff --git a/examples/arduino_uno/basic/blink/project.xml b/examples/arduino_uno/basic/blink/project.xml
deleted file mode 100644
index e29d41ab2a..0000000000
--- a/examples/arduino_uno/basic/blink/project.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
- modm:arduino-uno
-
-
-
-
- modm:build:scons
-
-
diff --git a/examples/arduino_uno/basic/digital_read_serial/project.xml b/examples/arduino_uno/basic/digital_read_serial/project.xml
index ae364b05a0..aaa3d8241c 100644
--- a/examples/arduino_uno/basic/digital_read_serial/project.xml
+++ b/examples/arduino_uno/basic/digital_read_serial/project.xml
@@ -1,7 +1,6 @@
modm:arduino-uno
-
diff --git a/examples/arduino_uno/basic/read_analog_voltage/project.xml b/examples/arduino_uno/basic/read_analog_voltage/project.xml
index c43285ab08..78544d24ec 100644
--- a/examples/arduino_uno/basic/read_analog_voltage/project.xml
+++ b/examples/arduino_uno/basic/read_analog_voltage/project.xml
@@ -1,7 +1,6 @@
modm:arduino-uno
-
diff --git a/examples/avr/1-wire/ds18b20/project.xml b/examples/avr/1-wire/ds18b20/project.xml
index d76f2eac0f..5ab9c1ca76 100644
--- a/examples/avr/1-wire/ds18b20/project.xml
+++ b/examples/avr/1-wire/ds18b20/project.xml
@@ -2,7 +2,6 @@
-
modm:driver:ds18b20
diff --git a/examples/avr/adc/basic/project.xml b/examples/avr/adc/basic/project.xml
index 5b4f84c701..02ec057207 100644
--- a/examples/avr/adc/basic/project.xml
+++ b/examples/avr/adc/basic/project.xml
@@ -2,7 +2,6 @@
-
modm:io
diff --git a/examples/avr/adc/oversample/project.xml b/examples/avr/adc/oversample/project.xml
index a94acf03ab..6ac7739236 100644
--- a/examples/avr/adc/oversample/project.xml
+++ b/examples/avr/adc/oversample/project.xml
@@ -2,7 +2,6 @@
-
modm:driver:adc_sampler
diff --git a/examples/avr/app_can2usb/project.xml b/examples/avr/app_can2usb/project.xml
index c4a4667ae4..0b3497e4cf 100644
--- a/examples/avr/app_can2usb/project.xml
+++ b/examples/avr/app_can2usb/project.xml
@@ -2,7 +2,6 @@
-
modm:architecture:delay
diff --git a/examples/avr/assert/project.xml b/examples/avr/assert/project.xml
index 9b27a92988..8fb1190652 100644
--- a/examples/avr/assert/project.xml
+++ b/examples/avr/assert/project.xml
@@ -1,7 +1,6 @@
modm:arduino-nano
-
diff --git a/examples/avr/block_device_mirror/project.xml b/examples/avr/block_device_mirror/project.xml
index bac86d8116..8f22138872 100644
--- a/examples/avr/block_device_mirror/project.xml
+++ b/examples/avr/block_device_mirror/project.xml
@@ -2,7 +2,6 @@
-
diff --git a/examples/avr/can/mcp2515/project.xml b/examples/avr/can/mcp2515/project.xml
index f0c7777fa4..b843540ba4 100644
--- a/examples/avr/can/mcp2515/project.xml
+++ b/examples/avr/can/mcp2515/project.xml
@@ -2,7 +2,6 @@
-
diff --git a/examples/avr/can/mcp2515_uart/project.xml b/examples/avr/can/mcp2515_uart/project.xml
index be0337d4aa..1796d010ca 100644
--- a/examples/avr/can/mcp2515_uart/project.xml
+++ b/examples/avr/can/mcp2515_uart/project.xml
@@ -2,7 +2,6 @@
-
diff --git a/examples/avr/display/dogm128/benchmark/project.xml b/examples/avr/display/dogm128/benchmark/project.xml
index d49ecd55a0..2937aaff56 100644
--- a/examples/avr/display/dogm128/benchmark/project.xml
+++ b/examples/avr/display/dogm128/benchmark/project.xml
@@ -2,7 +2,6 @@
-
diff --git a/examples/avr/display/dogm128/caged_ball/project.xml b/examples/avr/display/dogm128/caged_ball/project.xml
index cea6286622..c2b80a9728 100644
--- a/examples/avr/display/dogm128/caged_ball/project.xml
+++ b/examples/avr/display/dogm128/caged_ball/project.xml
@@ -2,7 +2,6 @@
-
modm:driver:ea_dog
diff --git a/examples/avr/display/dogm128/draw/project.xml b/examples/avr/display/dogm128/draw/project.xml
index b6f250ad57..c2b80a9728 100644
--- a/examples/avr/display/dogm128/draw/project.xml
+++ b/examples/avr/display/dogm128/draw/project.xml
@@ -2,7 +2,6 @@
-
modm:driver:ea_dog
diff --git a/examples/avr/display/dogm128/image/project.xml b/examples/avr/display/dogm128/image/project.xml
index d3f62a0517..6974c8113d 100644
--- a/examples/avr/display/dogm128/image/project.xml
+++ b/examples/avr/display/dogm128/image/project.xml
@@ -2,7 +2,6 @@
-
diff --git a/examples/avr/display/dogm128/text/project.xml b/examples/avr/display/dogm128/text/project.xml
index 01677ed2ee..47d2de485a 100644
--- a/examples/avr/display/dogm128/text/project.xml
+++ b/examples/avr/display/dogm128/text/project.xml
@@ -2,7 +2,6 @@
-
modm:driver:ea_dog
diff --git a/examples/avr/display/dogm128/touch/project.xml b/examples/avr/display/dogm128/touch/project.xml
index 0ab2bd86e3..fc546bc1a9 100644
--- a/examples/avr/display/dogm128/touch/project.xml
+++ b/examples/avr/display/dogm128/touch/project.xml
@@ -2,7 +2,6 @@
-
modm:driver:ea_dog
diff --git a/examples/avr/display/dogm132/project.xml b/examples/avr/display/dogm132/project.xml
index 91dce2d58b..5f429dad0d 100644
--- a/examples/avr/display/dogm132/project.xml
+++ b/examples/avr/display/dogm132/project.xml
@@ -2,7 +2,6 @@
-
modm:driver:ea_dog
diff --git a/examples/avr/display/dogm163/project.xml b/examples/avr/display/dogm163/project.xml
index d1700bc654..603144304a 100644
--- a/examples/avr/display/dogm163/project.xml
+++ b/examples/avr/display/dogm163/project.xml
@@ -2,7 +2,6 @@
-
modm:driver:ea_dog
diff --git a/examples/avr/display/hd44780/project.xml b/examples/avr/display/hd44780/project.xml
index 37e48bec39..a8fb80f547 100644
--- a/examples/avr/display/hd44780/project.xml
+++ b/examples/avr/display/hd44780/project.xml
@@ -2,7 +2,6 @@
-
modm:driver:hd44780
diff --git a/examples/avr/display/siemens_s65/project.xml b/examples/avr/display/siemens_s65/project.xml
index af4a99045a..caa734a3dd 100644
--- a/examples/avr/display/siemens_s65/project.xml
+++ b/examples/avr/display/siemens_s65/project.xml
@@ -2,7 +2,6 @@
-
modm:driver:siemens_s65
diff --git a/examples/avr/fiber/main.cpp b/examples/avr/fiber/main.cpp
deleted file mode 100644
index 89065e4270..0000000000
--- a/examples/avr/fiber/main.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2020, Erik Henriksson
- *
- * 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
-#include
-#include
-
-using namespace Board;
-using namespace std::chrono_literals;
-
-constexpr uint32_t cycles = 100'000;
-volatile uint32_t f1counter = 0, f2counter = 0;
-uint32_t total_counter=0;
-
-void
-fiber_function1()
-{
- MODM_LOG_INFO << MODM_FILE_INFO << modm::endl;
- while (++f1counter < cycles) { modm::fiber::yield(); total_counter++; }
-}
-
-void
-fiber_function2(uint32_t cyc)
-{
- MODM_LOG_INFO << MODM_FILE_INFO << modm::endl;
- while (++f2counter < cyc) { modm::fiber::yield(); total_counter++; }
-}
-
-struct Test
-{
- void
- fiber_function3()
- {
- MODM_LOG_INFO << MODM_FILE_INFO << modm::endl;
- while (++f3counter < cycles) { modm::fiber::yield(); total_counter++; }
- }
-
- void
- fiber_function4(uint32_t cyc)
- {
- MODM_LOG_INFO << MODM_FILE_INFO << modm::endl;
- while (++f4counter < cyc) { modm::fiber::yield(); total_counter++; }
- }
-
- volatile uint32_t f3counter{0};
- volatile uint32_t f4counter{0};
-} test;
-
-modm::Fiber<> fiber1(fiber_function1);
-modm::Fiber<> fiber2(+[](){ fiber_function2(cycles); });
-modm::Fiber<> fiber3(+[](){ test.fiber_function3(); });
-modm::Fiber<> fiber4([cyc=uint32_t(cycles)]() mutable { cyc++; test.fiber_function4(cyc); });
-
-// ATmega2560@16MHz: 239996 yields in 2492668us, 96280 yields per second, 10386ns per yield
-int
-main()
-{
- Board::initialize();
- Board::LedD13::setOutput();
- MODM_LOG_INFO << "Starting fiber modm::yield benchmark..." << modm::endl;
- MODM_LOG_INFO.flush();
-
- fiber1.watermark_stack();
- fiber2.watermark_stack();
- fiber3.watermark_stack();
- fiber4.watermark_stack();
-
- const modm::PreciseTimestamp start = modm::PreciseClock::now();
- modm::fiber::Scheduler::run();
- const auto diff = (modm::PreciseClock::now() - start);
-
- MODM_LOG_INFO << "Benchmark done!" << modm::endl;
- MODM_LOG_INFO << "Executed " << total_counter << " yields in " << diff << modm::endl;
- MODM_LOG_INFO << uint32_t((total_counter * 1'000'000ull) / std::chrono::microseconds(diff).count());
- MODM_LOG_INFO << " yields per second, ";
- MODM_LOG_INFO << uint32_t(std::chrono::nanoseconds(diff).count() / total_counter);
- MODM_LOG_INFO << "ns per yield" << modm::endl;
-
- MODM_LOG_INFO << "Stack usage 1 = " << fiber1.stack_usage() << modm::endl;
- MODM_LOG_INFO << "Stack usage 2 = " << fiber2.stack_usage() << modm::endl;
- MODM_LOG_INFO << "Stack usage 3 = " << fiber3.stack_usage() << modm::endl;
- MODM_LOG_INFO << "Stack usage 4 = " << fiber4.stack_usage() << modm::endl;
-
- while(1) ;
- return 0;
-}
diff --git a/examples/avr/fiber/project.xml b/examples/avr/fiber/project.xml
deleted file mode 100644
index d06e96568a..0000000000
--- a/examples/avr/fiber/project.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
- modm:mega-2560-pro
-
-
-
-
-
- modm:build:scons
- modm:processing:timer
- modm:processing:fiber
-
-
diff --git a/examples/avr/flash/project.xml b/examples/avr/flash/project.xml
index 320a4384b9..25c47226b2 100644
--- a/examples/avr/flash/project.xml
+++ b/examples/avr/flash/project.xml
@@ -2,7 +2,6 @@
-
modm:architecture:accessor
diff --git a/examples/avr/gpio/basic/project.xml b/examples/avr/gpio/basic/project.xml
index c88a919454..958c42b0e0 100644
--- a/examples/avr/gpio/basic/project.xml
+++ b/examples/avr/gpio/basic/project.xml
@@ -2,7 +2,6 @@
-
modm:platform:core
diff --git a/examples/avr/gpio/blinking/project.xml b/examples/avr/gpio/blinking/project.xml
index 95416fa367..15fbad6080 100644
--- a/examples/avr/gpio/blinking/project.xml
+++ b/examples/avr/gpio/blinking/project.xml
@@ -2,7 +2,6 @@
-
modm:architecture:delay
diff --git a/examples/avr/gpio/button_group/project.xml b/examples/avr/gpio/button_group/project.xml
index 6d5d088c01..613fdfc8ed 100644
--- a/examples/avr/gpio/button_group/project.xml
+++ b/examples/avr/gpio/button_group/project.xml
@@ -2,7 +2,6 @@
-
modm:architecture:interrupt
diff --git a/examples/avr/logger/project.xml b/examples/avr/logger/project.xml
index 31b21ecd9b..73efafd8a8 100644
--- a/examples/avr/logger/project.xml
+++ b/examples/avr/logger/project.xml
@@ -2,7 +2,6 @@
-
modm:debug
diff --git a/examples/avr/mega_pro/project.xml b/examples/avr/mega_pro/project.xml
index 4e1c2afb34..a40cdd1007 100644
--- a/examples/avr/mega_pro/project.xml
+++ b/examples/avr/mega_pro/project.xml
@@ -1,8 +1,5 @@
modm:mega-2560-pro
-
-
-
modm:build:scons
diff --git a/examples/avr/ports/project.xml b/examples/avr/ports/project.xml
index dd4e9e7755..39bdc96a71 100644
--- a/examples/avr/ports/project.xml
+++ b/examples/avr/ports/project.xml
@@ -1,7 +1,6 @@
modm:al-avreb-can
-
diff --git a/examples/avr/protothread/project.xml b/examples/avr/protothread/project.xml
index 1dd52d5caf..322d1d30f9 100644
--- a/examples/avr/protothread/project.xml
+++ b/examples/avr/protothread/project.xml
@@ -2,7 +2,6 @@
-
modm:platform:core
diff --git a/examples/avr/pwm/pca9685/project.xml b/examples/avr/pwm/pca9685/project.xml
index 9b51df4892..30dd56be87 100644
--- a/examples/avr/pwm/pca9685/project.xml
+++ b/examples/avr/pwm/pca9685/project.xml
@@ -2,7 +2,6 @@
-
modm:driver:pca9685
diff --git a/examples/avr/qmc5883l/project.xml b/examples/avr/qmc5883l/project.xml
index dd13835c4f..2d56cce1c8 100644
--- a/examples/avr/qmc5883l/project.xml
+++ b/examples/avr/qmc5883l/project.xml
@@ -1,8 +1,5 @@
modm:mega-2560-pro
-
-
-
modm:platform:i2c
modm:driver:qmc5883l
diff --git a/examples/avr/sab/master/project.xml b/examples/avr/sab/master/project.xml
index 1bc58715d2..9c87e67442 100644
--- a/examples/avr/sab/master/project.xml
+++ b/examples/avr/sab/master/project.xml
@@ -2,7 +2,6 @@
-
modm:communication:sab
diff --git a/examples/avr/sab/slave/project.xml b/examples/avr/sab/slave/project.xml
index a8f6a2c30a..8f598542e5 100644
--- a/examples/avr/sab/slave/project.xml
+++ b/examples/avr/sab/slave/project.xml
@@ -2,7 +2,6 @@
-
modm:communication:sab
diff --git a/examples/avr/timeout/project.xml b/examples/avr/timeout/project.xml
index db4026f3a8..af353aa0a2 100644
--- a/examples/avr/timeout/project.xml
+++ b/examples/avr/timeout/project.xml
@@ -2,7 +2,6 @@
-
modm:architecture:interrupt
diff --git a/examples/avr/timer/project.xml b/examples/avr/timer/project.xml
index 7c98a2c676..7bfaa951eb 100644
--- a/examples/avr/timer/project.xml
+++ b/examples/avr/timer/project.xml
@@ -1,7 +1,6 @@
modm:arduino-nano
-
diff --git a/examples/avr/uart/basic/project.xml b/examples/avr/uart/basic/project.xml
index a879efd609..4df1958dc2 100644
--- a/examples/avr/uart/basic/project.xml
+++ b/examples/avr/uart/basic/project.xml
@@ -2,7 +2,6 @@
-
modm:platform:clock
diff --git a/examples/avr/uart/extended/project.xml b/examples/avr/uart/extended/project.xml
index a744f63a23..7f318489a0 100644
--- a/examples/avr/uart/extended/project.xml
+++ b/examples/avr/uart/extended/project.xml
@@ -2,7 +2,6 @@
-
modm:io
diff --git a/examples/avr/xpcc/receiver/project.xml b/examples/avr/xpcc/receiver/project.xml
index 6cf803d986..d0f3f432cf 100644
--- a/examples/avr/xpcc/receiver/project.xml
+++ b/examples/avr/xpcc/receiver/project.xml
@@ -3,7 +3,6 @@
-
diff --git a/examples/avr/xpcc/sender/project.xml b/examples/avr/xpcc/sender/project.xml
index 541f5698bc..6e39b03602 100644
--- a/examples/avr/xpcc/sender/project.xml
+++ b/examples/avr/xpcc/sender/project.xml
@@ -3,7 +3,6 @@
-
diff --git a/examples/black_pill_f103/blink/main.cpp b/examples/black_pill_f103/blink/main.cpp
deleted file mode 100644
index ddedac3bb7..0000000000
--- a/examples/black_pill_f103/blink/main.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2016, Sascha Schade
- * Copyright (c) 2017, Niklas Hauser
- *
- * 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;
-
-/*
- * Blinks the green user LED with 1 Hz.
- * It is on for 90% of the time and off for 10% of the time.
- */
-
-int
-main()
-{
- Board::initialize();
-
- LedGreen::set();
-
- while (true)
- {
- LedGreen::set();
- modm::delay(900ms);
-
- LedGreen::reset();
- modm::delay(100ms);
- }
-
- return 0;
-}
diff --git a/examples/black_pill_f103/blink/project.xml b/examples/black_pill_f103/blink/project.xml
deleted file mode 100644
index 99e4bc5564..0000000000
--- a/examples/black_pill_f103/blink/project.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
- modm:black-pill-f103
-
-
-
-
-
- modm:build:scons
-
-
diff --git a/examples/black_pill_f401/blink/main.cpp b/examples/black_pill_f401/blink/main.cpp
deleted file mode 100644
index a075feac8c..0000000000
--- a/examples/black_pill_f401/blink/main.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2016, Sascha Schade
- * Copyright (c) 2017, Niklas Hauser
- * Copyright (c) 2019, Raphael Lehmann
- *
- * 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;
-
-/*
- * Blinks the user LED with 1 Hz
- * or 5 Hz is the user button is pressed.
- */
-
-int
-main()
-{
- Board::initialize();
-
- while (true)
- {
- Led::toggle();
- modm::delay(Button::read() ? 100ms : 500ms);
- }
-
- return 0;
-}
diff --git a/examples/black_pill_f401/blink/project.xml b/examples/black_pill_f401/blink/project.xml
deleted file mode 100644
index 0eb3c1b1e9..0000000000
--- a/examples/black_pill_f401/blink/project.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
- modm:black-pill-f401
-
-
-
-
- modm:build:scons
-
-
diff --git a/examples/black_pill_f411/blink/main.cpp b/examples/black_pill_f411/blink/main.cpp
deleted file mode 100644
index 41a72dfeed..0000000000
--- a/examples/black_pill_f411/blink/main.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2016, Sascha Schade
- * Copyright (c) 2017, Niklas Hauser
- * Copyright (c) 2019, Raphael Lehmann
- *
- * 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;
-
-/*
- * Blinks the user LED with 1 Hz
- * or 5 Hz is the user button is pressed.
- */
-
-int
-main()
-{
- Board::initialize();
-
- Led::set();
-
- while (true)
- {
- Led::toggle();
- modm::delay(Button::read() ? 100ms : 500ms);
- }
-
- return 0;
-}
diff --git a/examples/black_pill_f411/blink/project.xml b/examples/black_pill_f411/blink/project.xml
deleted file mode 100644
index 08d866fea7..0000000000
--- a/examples/black_pill_f411/blink/project.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
- modm:black-pill-f411
-
-
-
-
- modm:build:scons
-
-
diff --git a/examples/blue_pill_f103/adns_9800/project.xml b/examples/blue_pill_f103/adns_9800/project.xml
index 4f54e9196d..bcaed737cc 100644
--- a/examples/blue_pill_f103/adns_9800/project.xml
+++ b/examples/blue_pill_f103/adns_9800/project.xml
@@ -1,7 +1,6 @@
modm:blue-pill-f103
-
diff --git a/examples/blue_pill_f103/blink/main.cpp b/examples/blue_pill_f103/blink/main.cpp
deleted file mode 100644
index ddedac3bb7..0000000000
--- a/examples/blue_pill_f103/blink/main.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2016, Sascha Schade
- * Copyright (c) 2017, Niklas Hauser
- *
- * 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;
-
-/*
- * Blinks the green user LED with 1 Hz.
- * It is on for 90% of the time and off for 10% of the time.
- */
-
-int
-main()
-{
- Board::initialize();
-
- LedGreen::set();
-
- while (true)
- {
- LedGreen::set();
- modm::delay(900ms);
-
- LedGreen::reset();
- modm::delay(100ms);
- }
-
- return 0;
-}
diff --git a/examples/blue_pill_f103/blink/openocd.cfg b/examples/blue_pill_f103/blink/openocd.cfg
deleted file mode 100644
index b157e7e432..0000000000
--- a/examples/blue_pill_f103/blink/openocd.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-# Replace this with your custom programmer
-source [find interface/stlink-v2.cfg]
diff --git a/examples/blue_pill_f103/blink/project.xml b/examples/blue_pill_f103/blink/project.xml
deleted file mode 100644
index 1bfb056e4e..0000000000
--- a/examples/blue_pill_f103/blink/project.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
- modm:blue-pill-f103
-
-
-
-
-
- modm:build:scons
-
-
diff --git a/examples/blue_pill_f103/can/project.xml b/examples/blue_pill_f103/can/project.xml
index 9864f5d235..b2fdf203a2 100644
--- a/examples/blue_pill_f103/can/project.xml
+++ b/examples/blue_pill_f103/can/project.xml
@@ -1,7 +1,6 @@
modm:blue-pill-f103
-
diff --git a/examples/blue_pill_f103/encoder_input/project.xml b/examples/blue_pill_f103/encoder_input/project.xml
index 34707ffb99..74b0510455 100644
--- a/examples/blue_pill_f103/encoder_input/project.xml
+++ b/examples/blue_pill_f103/encoder_input/project.xml
@@ -1,7 +1,6 @@
modm:blue-pill-f103
-
diff --git a/examples/blue_pill_f103/encoder_input_bitbang/project.xml b/examples/blue_pill_f103/encoder_input_bitbang/project.xml
index 717a9f9d8d..e587558141 100644
--- a/examples/blue_pill_f103/encoder_input_bitbang/project.xml
+++ b/examples/blue_pill_f103/encoder_input_bitbang/project.xml
@@ -1,7 +1,6 @@
modm:blue-pill-f103
-
diff --git a/examples/blue_pill_f103/environment/project.xml b/examples/blue_pill_f103/environment/project.xml
index a679f45f7c..33c4019884 100644
--- a/examples/blue_pill_f103/environment/project.xml
+++ b/examples/blue_pill_f103/environment/project.xml
@@ -1,7 +1,6 @@
modm:blue-pill-f103
-
diff --git a/examples/blue_pill_f103/flash/openocd.cfg b/examples/blue_pill_f103/flash/openocd.cfg
deleted file mode 100644
index b157e7e432..0000000000
--- a/examples/blue_pill_f103/flash/openocd.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-# Replace this with your custom programmer
-source [find interface/stlink-v2.cfg]
diff --git a/examples/blue_pill_f103/flash/project.xml b/examples/blue_pill_f103/flash/project.xml
deleted file mode 100644
index 31b1ba5de2..0000000000
--- a/examples/blue_pill_f103/flash/project.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
- modm:blue-pill-f103
-
-
-
-
-
- modm:platform:gpio
- modm:platform:flash
- modm:debug
- modm:platform:uart:2
- modm:processing:timer
- modm:build:scons
- modm:build:compilation_db
-
-
diff --git a/examples/blue_pill_f103/graphics/project.xml b/examples/blue_pill_f103/graphics/project.xml
index bacef55085..37752979c8 100644
--- a/examples/blue_pill_f103/graphics/project.xml
+++ b/examples/blue_pill_f103/graphics/project.xml
@@ -1,7 +1,6 @@
modm:blue-pill-f103
-
diff --git a/examples/blue_pill_f103/itm/main.cpp b/examples/blue_pill_f103/itm/main.cpp
deleted file mode 100644
index 6d1a262261..0000000000
--- a/examples/blue_pill_f103/itm/main.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2016, 2021, Sascha Schade
- * Copyright (c) 2017, Niklas Hauser
- *
- * 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
-#include
-#include
-
-using namespace Board;
-
-modm::IODeviceWrapper itm_device;
-modm::IOStream stream(itm_device);
-
-/*
- * Blinks the green user LED with 1 Hz and outputs the loop counter over ITM.
- * SWO pin is PB3. openocd > 0.11.0 is required. Receive data with:
- * scons log-itm fcpu=72000000
- */
-
-int
-main()
-{
- Board::initialize();
- Itm::initialize();
-
- stream << "Hello from the SWO." << modm::endl;
- stream << "debug" << modm::endl;
- stream << "info" << modm::endl;
- stream << "warning" << modm::endl;
- stream << "error" << modm::endl;
-
- LedGreen::set();
-
- while (true)
- {
- static modm::PeriodicTimer tmr{500ms};
-
- if (tmr.execute())
- {
- LedGreen::toggle();
-
- static uint32_t counter{0};
- stream << "loop: " << counter++ << modm::endl;
- }
- Itm::update();
- }
-
- return 0;
-}
diff --git a/examples/blue_pill_f103/itm/openocd.cfg b/examples/blue_pill_f103/itm/openocd.cfg
deleted file mode 100644
index b157e7e432..0000000000
--- a/examples/blue_pill_f103/itm/openocd.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-# Replace this with your custom programmer
-source [find interface/stlink-v2.cfg]
diff --git a/examples/blue_pill_f103/itm/project.xml b/examples/blue_pill_f103/itm/project.xml
deleted file mode 100644
index b231234f6e..0000000000
--- a/examples/blue_pill_f103/itm/project.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
- modm:blue-pill-f103
-
-
-
-
-
-
- modm:build:scons
- modm:debug
- modm:platform:itm
- modm:processing:timer
-
-
diff --git a/examples/blue_pill_f103/logger/project.xml b/examples/blue_pill_f103/logger/project.xml
index 04550dbc87..13a5fa0fe3 100644
--- a/examples/blue_pill_f103/logger/project.xml
+++ b/examples/blue_pill_f103/logger/project.xml
@@ -1,7 +1,6 @@
modm:blue-pill-f103
-
diff --git a/examples/blue_pill_f103/rtt/main.cpp b/examples/blue_pill_f103/rtt/main.cpp
deleted file mode 100644
index dccf0da86e..0000000000
--- a/examples/blue_pill_f103/rtt/main.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2021, Niklas Hauser
- * Edited by Steven Macias
- *
- * 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
-#include
-#include
-
-using namespace Board;
-
-Rtt rtt(0);
-modm::IODeviceObjectWrapper< Rtt, modm::IOBuffer::DiscardIfFull > rtt_device(rtt);
-// Set all four logger streams to use RTT
-modm::log::Logger modm::log::debug(rtt_device);
-modm::log::Logger modm::log::info(rtt_device);
-modm::log::Logger modm::log::warning(rtt_device);
-modm::log::Logger modm::log::error(rtt_device);
-
-#undef MODM_LOG_LEVEL
-#define MODM_LOG_LEVEL modm::log::INFO
-
-/*
-
- $ scons log-rtt
-╭───OpenOCD───> Real Time Transfer
-╰─────RTT────── stm32f303vct6
-Info : STLINK V2J16S0 (API v2) VID:PID 0483:3748
-Info : stm32f3x.cpu: hardware has 6 breakpoints, 4 watchpoints
-Info : rtt: Searching for control block 'SEGGER RTT'
-Info : rtt: Control block found at 0x20000c04
-Info : Listening on port 9090 for rtt connections
-Info
-Warning
-Error
-loop: 0
-loop: 1
-loop: 2
-loop: 3
-loop: 4
-loop: 5
-
-
-Type number 0-9, then press enter to send.
-The LED should blink slower or faster.
-
-Ctrl+D to exit
-
-*/
-
-// ----------------------------------------------------------------------------
-int
-main()
-{
- Board::initialize();
-
- MODM_LOG_DEBUG << "Debug" << modm::endl;
- MODM_LOG_INFO << "Info" << modm::endl;
- MODM_LOG_WARNING << "Warning" << modm::endl;
- MODM_LOG_ERROR << "Error" << modm::endl;
-
- uint32_t counter(0);
- modm::PeriodicTimer tmr(100ms);
-
- char data;
- while (true)
- {
- MODM_LOG_INFO.get(data);
- switch(data)
- {
- case '0':
- tmr.restart(1s);
- break;
- case '1'...'9':
- tmr.restart(std::chrono::milliseconds((data - '0') * 100));
- break;
- }
- if (tmr.execute())
- {
- LedGreen::toggle();
-
- MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
- }
- }
-
- return 0;
-}
diff --git a/examples/blue_pill_f103/rtt/openocd.cfg b/examples/blue_pill_f103/rtt/openocd.cfg
deleted file mode 100644
index 2edce20b3d..0000000000
--- a/examples/blue_pill_f103/rtt/openocd.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-# Replace this with your custom programmer
-source [find interface/stlink.cfg]
diff --git a/examples/blue_pill_f103/rtt/project.xml b/examples/blue_pill_f103/rtt/project.xml
deleted file mode 100644
index b4e74223df..0000000000
--- a/examples/blue_pill_f103/rtt/project.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
- modm:blue-pill-f103
-
-
-
-
-
-
- modm:platform:rtt
- modm:processing:timer
- modm:build:scons
- modm:debug
-
-
diff --git a/examples/blue_pill_f103/servo_pwm/project.xml b/examples/blue_pill_f103/servo_pwm/project.xml
index c62c69654f..067398fca6 100644
--- a/examples/blue_pill_f103/servo_pwm/project.xml
+++ b/examples/blue_pill_f103/servo_pwm/project.xml
@@ -1,7 +1,6 @@
modm:blue-pill-f103
-
diff --git a/examples/blue_pill_f103/weight_scale_hx711/project.xml b/examples/blue_pill_f103/weight_scale_hx711/project.xml
index 7858b9c500..0f0a3cf0b6 100644
--- a/examples/blue_pill_f103/weight_scale_hx711/project.xml
+++ b/examples/blue_pill_f103/weight_scale_hx711/project.xml
@@ -1,7 +1,6 @@
modm:blue-pill-f103
-
diff --git a/examples/generic/delay/main.cpp b/examples/core/delay/main.cpp
similarity index 100%
rename from examples/generic/delay/main.cpp
rename to examples/core/delay/main.cpp
diff --git a/examples/generic/delay/project.xml b/examples/core/delay/project.xml
similarity index 88%
rename from examples/generic/delay/project.xml
rename to examples/core/delay/project.xml
index f839f46a81..d61d826ad1 100644
--- a/examples/generic/delay/project.xml
+++ b/examples/core/delay/project.xml
@@ -13,20 +13,21 @@
- modm:nucleo-l152re
+
-
+
-
+
modm:build:scons
modm:debug
modm:driver:cycle_counter
+
diff --git a/examples/generic/fiber/main.cpp b/examples/core/fiber/main.cpp
similarity index 100%
rename from examples/generic/fiber/main.cpp
rename to examples/core/fiber/main.cpp
diff --git a/examples/core/fiber/project.xml b/examples/core/fiber/project.xml
new file mode 100644
index 0000000000..debfabacef
--- /dev/null
+++ b/examples/core/fiber/project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+ modm:nucleo-f072rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ modm:build:scons
+ modm:processing:timer
+ modm:processing:fiber
+ modm:driver:cycle_counter
+
+
diff --git a/examples/blue_pill_f103/flash/main.cpp b/examples/core/flash/main.cpp
similarity index 88%
rename from examples/blue_pill_f103/flash/main.cpp
rename to examples/core/flash/main.cpp
index 27a4ebac51..40b9b99957 100644
--- a/examples/blue_pill_f103/flash/main.cpp
+++ b/examples/core/flash/main.cpp
@@ -9,25 +9,15 @@
*/
#include
-#include
#include
using namespace std::chrono_literals;
-modm::IODeviceWrapper< Usart2, modm::IOBuffer::BlockIfFull > loggerDevice;
-modm::log::Logger modm::log::info(loggerDevice);
-
-// Set the log level
-#undef MODM_LOG_LEVEL
-#define MODM_LOG_LEVEL modm::log::INFO
-
// ----------------------------------------------------------------------------
int
main()
{
Board::initialize();
- Usart2::connect();
- Usart2::initialize();
MODM_LOG_INFO << "\n\nReboot\n";
if (not Flash::unlock()) {
@@ -46,7 +36,7 @@ main()
{
uint32_t err{0};
- const uint8_t sector_start = Flash::getSector(Flash::Size / 2);
+ const uint8_t sector_start = Flash::getSector(Flash::Size/2);
const uint8_t sector_end = Flash::getSector(Flash::Size);
MODM_LOG_INFO << "Erasing sectors [" << sector_start << ", " << sector_end << ")" << modm::endl;
MODM_LOG_INFO.flush();
@@ -54,9 +44,8 @@ main()
const modm::PreciseTimestamp start = modm::PreciseClock::now();
- for (uint8_t sector{sector_start}; sector < sector_end; sector++){
+ for (uint8_t sector{sector_start}; sector < sector_end; sector++)
err |= Flash::erase(sector);
- }
const auto diff = (modm::PreciseClock::now() - start);
MODM_LOG_INFO << "Erasing done in " << diff << " with errors: " << err << modm::endl;
diff --git a/examples/nucleo_f446re/flash/project.xml b/examples/core/flash/project.xml
similarity index 51%
rename from examples/nucleo_f446re/flash/project.xml
rename to examples/core/flash/project.xml
index 69f785966e..93750a1e98 100644
--- a/examples/nucleo_f446re/flash/project.xml
+++ b/examples/core/flash/project.xml
@@ -1,10 +1,10 @@
modm:nucleo-f446re
-
-
-
+
+
+
+
- modm:platform:gpio
modm:platform:flash
modm:processing:timer
modm:build:scons
diff --git a/examples/nucleo_f103rb/hard_fault/main.cpp b/examples/core/hard_fault/main.cpp
similarity index 94%
rename from examples/nucleo_f103rb/hard_fault/main.cpp
rename to examples/core/hard_fault/main.cpp
index ebe6c9b4d1..d7c028bdac 100644
--- a/examples/nucleo_f103rb/hard_fault/main.cpp
+++ b/examples/core/hard_fault/main.cpp
@@ -19,8 +19,6 @@ void function1(uint32_t bla)
if (Button::read()) {
// execute undefined instructed
- // the hard fault handler will blink the blue LED
- // or, if the debugger is connected, will trigger a breakpoint
asm volatile (".short 0xde00");
}
}
@@ -69,9 +67,11 @@ main()
MODM_LOG_INFO << "Hold Button to cause a Hardfault!" << modm::endl;
+#ifdef CoreDebug_DHCSR_C_DEBUGEN_Msk
if (CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk) {
MODM_LOG_INFO << "Debugger connected!" << modm::endl;
}
+#endif
while (true)
{
diff --git a/examples/core/hard_fault/project.xml b/examples/core/hard_fault/project.xml
new file mode 100644
index 0000000000..3a8ce88cfe
--- /dev/null
+++ b/examples/core/hard_fault/project.xml
@@ -0,0 +1,15 @@
+
+ modm:nucleo-f072rb
+
+
+
+
+
+
+
+
+ modm:platform:fault
+ modm:platform:heap
+ modm:build:scons
+
+
diff --git a/examples/nucleo_l476rg/itm/main.cpp b/examples/core/itm/main.cpp
similarity index 84%
rename from examples/nucleo_l476rg/itm/main.cpp
rename to examples/core/itm/main.cpp
index d46fc8fabc..ce87336e34 100644
--- a/examples/nucleo_l476rg/itm/main.cpp
+++ b/examples/core/itm/main.cpp
@@ -15,6 +15,7 @@
using namespace Board;
modm::IODeviceWrapper itm_device;
+// Set all four logger streams to use ITM
modm::IOStream stream(itm_device);
int
@@ -22,13 +23,9 @@ main()
{
Board::initialize();
Itm::initialize();
+ Leds::setOutput();
stream << "Hello from the SWO." << modm::endl;
- stream << "debug" << modm::endl;
- stream << "info" << modm::endl;
- stream << "warning" << modm::endl;
- stream << "error" << modm::endl;
-
while (true)
{
@@ -36,7 +33,7 @@ main()
if (tmr.execute())
{
tmr.restart(Button::read() ? 100ms : 500ms);
- LedGreen::toggle();
+ Leds::toggle();
static uint32_t counter{0};
stream << "loop: " << counter++ << modm::endl;
diff --git a/examples/nucleo_f303re/itm/project.xml b/examples/core/itm/project.xml
similarity index 74%
rename from examples/nucleo_f303re/itm/project.xml
rename to examples/core/itm/project.xml
index 244fd58fb7..11ca1823d9 100644
--- a/examples/nucleo_f303re/itm/project.xml
+++ b/examples/core/itm/project.xml
@@ -1,7 +1,8 @@
modm:nucleo-f303re
+
+
-
diff --git a/examples/generic/resumable/main.cpp b/examples/core/resumable/main.cpp
similarity index 100%
rename from examples/generic/resumable/main.cpp
rename to examples/core/resumable/main.cpp
diff --git a/examples/generic/resumable/project.xml b/examples/core/resumable/project.xml
similarity index 74%
rename from examples/generic/resumable/project.xml
rename to examples/core/resumable/project.xml
index c04c67c333..0fdd398093 100644
--- a/examples/generic/resumable/project.xml
+++ b/examples/core/resumable/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-l476rg
-
-
-
modm:architecture:delay
modm:processing:protothread
diff --git a/examples/stm32f3_discovery/rtt/main.cpp b/examples/core/rtt/main.cpp
similarity index 98%
rename from examples/stm32f3_discovery/rtt/main.cpp
rename to examples/core/rtt/main.cpp
index 2a4a6d4368..7aee27242f 100644
--- a/examples/stm32f3_discovery/rtt/main.cpp
+++ b/examples/core/rtt/main.cpp
@@ -59,6 +59,7 @@ int
main()
{
Board::initialize();
+ Leds::setOutput();
MODM_LOG_DEBUG << "Debug" << modm::endl;
MODM_LOG_INFO << "Info" << modm::endl;
@@ -83,7 +84,7 @@ main()
}
if (tmr.execute())
{
- LedNorth::toggle();
+ Leds::toggle();
MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
}
diff --git a/examples/stm32f3_discovery/rtt/project.xml b/examples/core/rtt/project.xml
similarity index 50%
rename from examples/stm32f3_discovery/rtt/project.xml
rename to examples/core/rtt/project.xml
index 1964b37101..dc89d74f1b 100644
--- a/examples/stm32f3_discovery/rtt/project.xml
+++ b/examples/core/rtt/project.xml
@@ -1,8 +1,12 @@
modm:disco-f303vc
+
+
-
+
+
+
modm:platform:rtt
diff --git a/examples/generic/rtc_ds1302/main.cpp b/examples/driver/ds1302/main.cpp
similarity index 100%
rename from examples/generic/rtc_ds1302/main.cpp
rename to examples/driver/ds1302/main.cpp
diff --git a/examples/generic/rtc_ds1302/project.xml b/examples/driver/ds1302/project.xml
similarity index 65%
rename from examples/generic/rtc_ds1302/project.xml
rename to examples/driver/ds1302/project.xml
index 1591ad83b1..3e2e453174 100644
--- a/examples/generic/rtc_ds1302/project.xml
+++ b/examples/driver/ds1302/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-l476rg
-
-
-
modm:driver:ds1302
modm:processing:timer
diff --git a/examples/generic/i2c_multiplex/main.cpp b/examples/driver/i2c_multiplex/main.cpp
similarity index 100%
rename from examples/generic/i2c_multiplex/main.cpp
rename to examples/driver/i2c_multiplex/main.cpp
diff --git a/examples/generic/i2c_multiplex/project.xml b/examples/driver/i2c_multiplex/project.xml
similarity index 100%
rename from examples/generic/i2c_multiplex/project.xml
rename to examples/driver/i2c_multiplex/project.xml
diff --git a/examples/nucleo_f042k6/lis3mdl/main.cpp b/examples/driver/lis3mdl/main.cpp
similarity index 65%
rename from examples/nucleo_f042k6/lis3mdl/main.cpp
rename to examples/driver/lis3mdl/main.cpp
index 461a11c476..8885aab86b 100644
--- a/examples/nucleo_f042k6/lis3mdl/main.cpp
+++ b/examples/driver/lis3mdl/main.cpp
@@ -14,48 +14,35 @@
using namespace Board;
using namespace std::chrono_literals;
-using I2cSda = GpioA10;
-using I2cScl = GpioA9;
+// Create a sensor object with the address of the sensor built onto the Pololu AltIMU-10 v5
+modm::Lis3mdl sensor(0x1E);
int
main()
{
Board::initialize();
- LedD13::setOutput();
+ Board::initializeI2c();
MODM_LOG_INFO << "LIS3MDL demo" << modm::endl;
- I2cMaster1::connect();
- I2cMaster1::initialize();
-
- // Create a sensor object with the adress of the sensor built onto the Pololu AltIMU-10 v5
- modm::Lis3mdl sensor(0x1E);
-
// Turn on and configure the magnetometer
- bool success = RF_CALL_BLOCKING(sensor.configure(modm::lis3mdl::DataRate::Rate_5_Hz,
- modm::lis3mdl::Scale::Scale_8_gauss));
-
-
- if(!success)
+ if(!RF_CALL_BLOCKING(sensor.configure(modm::lis3mdl::DataRate::Rate_5_Hz,
+ modm::lis3mdl::Scale::Scale_8_gauss)))
{
MODM_LOG_INFO << "Sensor could not be configured!" << modm::endl;
}
// Set the sensor to continous acquistion and turn on the temperature sensing
- success = RF_CALL_BLOCKING(sensor.setMode(modm::lis3mdl::OperationMode::Continous));
- if(!success)
+ if(!RF_CALL_BLOCKING(sensor.setMode(modm::lis3mdl::OperationMode::Continous)))
{
MODM_LOG_INFO << "Sensor could not be started!" << modm::endl;
}
modm::Vector3f magVector;
-
while (true)
{
- //Read the sensor data and print it out
- success = RF_CALL_BLOCKING(sensor.readMagnetometer(magVector));
-
- if(success)
+ // Read the sensor data and print it out
+ if(RF_CALL_BLOCKING(sensor.readMagnetometer(magVector)))
{
MODM_LOG_INFO << "Magnetic Vector:" << modm::endl;
MODM_LOG_INFO << "X: "<< magVector.x << " gauss" << modm::endl;
diff --git a/examples/driver/lis3mdl/project.xml b/examples/driver/lis3mdl/project.xml
new file mode 100644
index 0000000000..c6d7012776
--- /dev/null
+++ b/examples/driver/lis3mdl/project.xml
@@ -0,0 +1,27 @@
+
+ modm:nucleo-f031k6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ modm:build:scons
+ modm:driver:lis3mdl
+
+
diff --git a/examples/nucleo_f031k6/sk6812/main.cpp b/examples/driver/sk6812/main.cpp
similarity index 88%
rename from examples/nucleo_f031k6/sk6812/main.cpp
rename to examples/driver/sk6812/main.cpp
index a1285b7db3..f9b66b18be 100644
--- a/examples/nucleo_f031k6/sk6812/main.cpp
+++ b/examples/driver/sk6812/main.cpp
@@ -16,15 +16,15 @@
using namespace Board;
-using Output = Board::D11;
-modm::Sk6812w leds;
+using Output = Board::spi::Sdo;
+modm::Sk6812w leds;
modm::ShortPeriodicTimer tmr{33ms};
int
main()
{
Board::initialize();
- LedD13::setOutput();
+ Leds::setOutput();
leds.initialize();
constexpr uint8_t max = 62;
@@ -45,7 +45,7 @@ main()
leds.write();
while(not tmr.execute()) ;
- LedD13::toggle();
+ Leds::toggle();
}
return 0;
diff --git a/examples/driver/sk6812/project.xml b/examples/driver/sk6812/project.xml
new file mode 100644
index 0000000000..a482ff206c
--- /dev/null
+++ b/examples/driver/sk6812/project.xml
@@ -0,0 +1,14 @@
+
+
+ modm:nucleo-f031k6
+
+
+
+
+
+
+ modm:build:scons
+ modm:driver:sk6812
+ modm:ui:led
+
+
diff --git a/examples/generic/etl/main.cpp b/examples/ext/etl/main.cpp
similarity index 100%
rename from examples/generic/etl/main.cpp
rename to examples/ext/etl/main.cpp
diff --git a/examples/generic/etl/project.xml b/examples/ext/etl/project.xml
similarity index 60%
rename from examples/generic/etl/project.xml
rename to examples/ext/etl/project.xml
index 6292a7cbb4..6d5ef7118d 100644
--- a/examples/generic/etl/project.xml
+++ b/examples/ext/etl/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f439zi
-
-
-
modm:etl
modm:build:scons
diff --git a/examples/nucleo_f303re/rtos/main.cpp b/examples/ext/freertos/main.cpp
similarity index 73%
rename from examples/nucleo_f303re/rtos/main.cpp
rename to examples/ext/freertos/main.cpp
index 359c3301a2..ff52a2f5da 100644
--- a/examples/nucleo_f303re/rtos/main.cpp
+++ b/examples/ext/freertos/main.cpp
@@ -15,7 +15,6 @@
#include
using namespace modm::platform;
-using namespace modm::literals;
/**
* This example uses four threads to check if task switching works correctly.
@@ -36,23 +35,24 @@ using namespace modm::literals;
*/
// ----------------------------------------------------------------------------
-template
-class P: modm::rtos::Thread
+class BlinkThread: modm::rtos::Thread
{
char c;
+ uint8_t position;
+ uint16_t delay;
uint8_t i = 0;
volatile float a = 10.f;
public:
- P(char c): Thread(2,1<<10), c(c) {}
+ BlinkThread(char c, uint16_t delay, uint8_t position)
+ : Thread(2, 1024), c{c}, position{position}, delay{delay} {}
void run()
{
- Gpio::setOutput();
while (true)
{
- sleep(SleepTime * MILLISECONDS);
+ sleep(delay * MILLISECONDS);
- Gpio::toggle();
+ Board::Leds::write((1ul << position) ^ Board::Leds::read());
{
static modm::rtos::Mutex lm;
modm::rtos::MutexGuard m(lm);
@@ -64,10 +64,10 @@ class P: modm::rtos::Thread
}
};
-P< Board::LedD13, 260 > p1('0');
-P< Board::LedD13, 260 + 10 > p2('a');
-P< Board::LedD13, 260 + 20 > p3('A');
-P< Board::LedD13, 260 + 30 > p4('!');
+BlinkThread p1('0', 260 , 0);
+BlinkThread p2('a', 260 + 10, 1);
+BlinkThread p3('A', 260 + 20, 2);
+BlinkThread p4('!', 260 + 30, 3);
// ----------------------------------------------------------------------------
@@ -75,6 +75,10 @@ int
main()
{
Board::initialize();
+ Board::Leds::setOutput();
+
+ MODM_LOG_INFO << "\n\nReboot: FreeRTOS blink example" << modm::endl;
+
modm::rtos::Scheduler::schedule();
return 0;
}
diff --git a/examples/ext/freertos/project.xml b/examples/ext/freertos/project.xml
new file mode 100644
index 0000000000..d08f59b4f4
--- /dev/null
+++ b/examples/ext/freertos/project.xml
@@ -0,0 +1,21 @@
+
+
+ modm:nucleo-f072rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+ modm:processing:rtos
+ modm:platform:heap
+ modm:build:scons
+
+
diff --git a/examples/generic/ros/README.md b/examples/ext/ros/README.md
similarity index 100%
rename from examples/generic/ros/README.md
rename to examples/ext/ros/README.md
diff --git a/examples/generic/ros/can_bridge/README.md b/examples/ext/ros/can_bridge/README.md
similarity index 100%
rename from examples/generic/ros/can_bridge/README.md
rename to examples/ext/ros/can_bridge/README.md
diff --git a/examples/generic/ros/can_bridge/main.cpp b/examples/ext/ros/can_bridge/main.cpp
similarity index 100%
rename from examples/generic/ros/can_bridge/main.cpp
rename to examples/ext/ros/can_bridge/main.cpp
diff --git a/examples/black_pill_f103/blink/openocd.cfg b/examples/ext/ros/can_bridge/openocd.cfg
similarity index 100%
rename from examples/black_pill_f103/blink/openocd.cfg
rename to examples/ext/ros/can_bridge/openocd.cfg
diff --git a/examples/generic/ros/can_bridge/project.xml b/examples/ext/ros/can_bridge/project.xml
similarity index 85%
rename from examples/generic/ros/can_bridge/project.xml
rename to examples/ext/ros/can_bridge/project.xml
index 336bed37db..977293b5f5 100644
--- a/examples/generic/ros/can_bridge/project.xml
+++ b/examples/ext/ros/can_bridge/project.xml
@@ -1,7 +1,6 @@
modm:blue-pill-f103
-
diff --git a/examples/generic/ros/environment/hardware.hpp b/examples/ext/ros/environment/hardware.hpp
similarity index 100%
rename from examples/generic/ros/environment/hardware.hpp
rename to examples/ext/ros/environment/hardware.hpp
diff --git a/examples/generic/ros/environment/main.cpp b/examples/ext/ros/environment/main.cpp
similarity index 100%
rename from examples/generic/ros/environment/main.cpp
rename to examples/ext/ros/environment/main.cpp
diff --git a/examples/generic/ros/environment/project.xml b/examples/ext/ros/environment/project.xml
similarity index 86%
rename from examples/generic/ros/environment/project.xml
rename to examples/ext/ros/environment/project.xml
index 67bb72a1d0..b5beeff593 100644
--- a/examples/generic/ros/environment/project.xml
+++ b/examples/ext/ros/environment/project.xml
@@ -1,7 +1,6 @@
modm:nucleo-l476rg
-
diff --git a/examples/generic/ros/environment/thread_bme280.cpp b/examples/ext/ros/environment/thread_bme280.cpp
similarity index 100%
rename from examples/generic/ros/environment/thread_bme280.cpp
rename to examples/ext/ros/environment/thread_bme280.cpp
diff --git a/examples/generic/ros/environment/thread_bme280.hpp b/examples/ext/ros/environment/thread_bme280.hpp
similarity index 100%
rename from examples/generic/ros/environment/thread_bme280.hpp
rename to examples/ext/ros/environment/thread_bme280.hpp
diff --git a/examples/generic/ros/environment/thread_display.cpp b/examples/ext/ros/environment/thread_display.cpp
similarity index 100%
rename from examples/generic/ros/environment/thread_display.cpp
rename to examples/ext/ros/environment/thread_display.cpp
diff --git a/examples/generic/ros/environment/thread_display.hpp b/examples/ext/ros/environment/thread_display.hpp
similarity index 100%
rename from examples/generic/ros/environment/thread_display.hpp
rename to examples/ext/ros/environment/thread_display.hpp
diff --git a/examples/generic/ros/sub_pub/main.cpp b/examples/ext/ros/sub_pub/main.cpp
similarity index 100%
rename from examples/generic/ros/sub_pub/main.cpp
rename to examples/ext/ros/sub_pub/main.cpp
diff --git a/examples/generic/ros/sub_pub/project.xml b/examples/ext/ros/sub_pub/project.xml
similarity index 85%
rename from examples/generic/ros/sub_pub/project.xml
rename to examples/ext/ros/sub_pub/project.xml
index b988021959..0ef4d550ca 100644
--- a/examples/generic/ros/sub_pub/project.xml
+++ b/examples/ext/ros/sub_pub/project.xml
@@ -1,7 +1,6 @@
modm:nucleo-l476rg
-
diff --git a/examples/generic/usb/main.cpp b/examples/ext/usb/main.cpp
similarity index 100%
rename from examples/generic/usb/main.cpp
rename to examples/ext/usb/main.cpp
diff --git a/examples/generic/usb/msc_disk.c b/examples/ext/usb/msc_disk.c
similarity index 100%
rename from examples/generic/usb/msc_disk.c
rename to examples/ext/usb/msc_disk.c
diff --git a/examples/generic/usb/project.xml b/examples/ext/usb/project.xml
similarity index 76%
rename from examples/generic/usb/project.xml
rename to examples/ext/usb/project.xml
index 4abc6e9b9f..75c0338892 100644
--- a/examples/generic/usb/project.xml
+++ b/examples/ext/usb/project.xml
@@ -11,14 +11,19 @@
+
+
+
+
+
-
-
+
+
@@ -35,6 +40,7 @@
modm:io
+
diff --git a/examples/black_pill_f411/usbfatfs/ffconf_local.h b/examples/ext/usbfatfs/ffconf_local.h
similarity index 100%
rename from examples/black_pill_f411/usbfatfs/ffconf_local.h
rename to examples/ext/usbfatfs/ffconf_local.h
diff --git a/examples/black_pill_f411/usbfatfs/main.cpp b/examples/ext/usbfatfs/main.cpp
similarity index 99%
rename from examples/black_pill_f411/usbfatfs/main.cpp
rename to examples/ext/usbfatfs/main.cpp
index 0747979138..edb1115373 100644
--- a/examples/black_pill_f411/usbfatfs/main.cpp
+++ b/examples/ext/usbfatfs/main.cpp
@@ -93,7 +93,7 @@ check_for_update()
{
if (is_valid(&fil, fno.fsize))
{
- Board::Led::set();
+ Board::Leds::write(1);
// We first copy the file into the last Flash section of 128kB.
// It's not guaranteed that the file is stored in FatFs in *one*
// continous chunk and we cannot access FatFs code in ram_apply!!!
diff --git a/examples/black_pill_f411/usbfatfs/project.xml b/examples/ext/usbfatfs/project.xml
similarity index 54%
rename from examples/black_pill_f411/usbfatfs/project.xml
rename to examples/ext/usbfatfs/project.xml
index fe63d5aac3..023dfc8a55 100644
--- a/examples/black_pill_f411/usbfatfs/project.xml
+++ b/examples/ext/usbfatfs/project.xml
@@ -1,7 +1,7 @@
modm:black-pill-f411
+
-
@@ -11,5 +11,11 @@
modm:platform:flash
modm:build:scons
modm:math:utils
+
+
+
+
+
+
diff --git a/examples/black_pill_f411/usbfatfs/ramdisk.cpp b/examples/ext/usbfatfs/ramdisk.cpp
similarity index 100%
rename from examples/black_pill_f411/usbfatfs/ramdisk.cpp
rename to examples/ext/usbfatfs/ramdisk.cpp
diff --git a/examples/feather_m4/blink/main.cpp b/examples/feather_m4/blink/main.cpp
deleted file mode 100644
index e7c6a21108..0000000000
--- a/examples/feather_m4/blink/main.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2016-2017, Niklas Hauser
- *
- * 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()
-{
- initialize();
-
- // Use the logging streams to print some messages.
- // Change MODM_LOG_LEVEL above to enable or disable these messages
- MODM_LOG_DEBUG << "debug" << modm::endl;
- MODM_LOG_INFO << "info" << modm::endl;
- MODM_LOG_WARNING << "warning" << modm::endl;
- MODM_LOG_ERROR << "error" << modm::endl;
-
- uint32_t counter(0);
-
- while (true)
- {
- Led::toggle();
- modm::delay(500ms);
-
- MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
- }
-
- return 0;
-}
-
diff --git a/examples/feather_m4/blink/project.xml b/examples/feather_m4/blink/project.xml
deleted file mode 100644
index 96e9674f07..0000000000
--- a/examples/feather_m4/blink/project.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
- modm:feather-m4
-
-
-
-
- modm:build:scons
- modm:architecture:delay
-
-
diff --git a/examples/feather_m4/neopixel/project.xml b/examples/feather_m4/neopixel/project.xml
index be177c7bb7..927e24bc23 100644
--- a/examples/feather_m4/neopixel/project.xml
+++ b/examples/feather_m4/neopixel/project.xml
@@ -1,8 +1,5 @@
modm:feather-m4
-
-
-
modm:build:scons
modm:architecture:delay
diff --git a/examples/feather_m4/usbserial/main.cpp b/examples/feather_m4/usbserial/main.cpp
deleted file mode 100644
index 55d917ca77..0000000000
--- a/examples/feather_m4/usbserial/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2016-2017, Niklas Hauser
- * Copyright (c) 2022, Christopher Durand
- * Copyright (c) 2023, Thomas Rush
- *
- * 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
-#include
-
-using namespace Board;
-
-modm::IODeviceWrapper usb_io_device;
-modm::IOStream usb_stream(usb_io_device);
-
-int
-main()
-{
- initialize();
- initializeUsbFs();
-
- tusb_init();
-
- uint32_t counter(0);
-
- modm::PeriodicTimer timer{500ms};
-
- while (not timer.execute()) {
- tud_task();
- }
-
- // it can be hard to catch this without the preceding delay
- usb_stream << "Hello from USB" << modm::endl;
-
- while (true)
- {
- tud_task();
- if (timer.execute()) {
- Led::toggle();
- usb_stream << "loop: " << counter++ << modm::endl;
- }
- }
-
- return 0;
-}
diff --git a/examples/feather_m4/usbserial/project.xml b/examples/feather_m4/usbserial/project.xml
deleted file mode 100644
index ccf9dc7e8b..0000000000
--- a/examples/feather_m4/usbserial/project.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
- modm:feather-m4
-
-
-
-
-
- modm:tinyusb
- modm:build:scons
- modm:processing:timer
-
-
diff --git a/examples/feather_rp2040/blink/main.cpp b/examples/feather_rp2040/blink/main.cpp
deleted file mode 100644
index eece38f216..0000000000
--- a/examples/feather_rp2040/blink/main.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2016, Sascha Schade
- * Copyright (c) 2017, Niklas Hauser
- *
- * 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;
-
-/*
- * Blinks the green user LED with 1 Hz.
- * It is on for 90% of the time and off for 10% of the time.
- */
-
-int
-main()
-{
- Board::initialize();
-
- Led::setOutput();
-
- while (true)
- {
- Led::set();
- modm::delay(900ms);
-
- Led::reset();
- modm::delay(100ms);
- }
-
- return 0;
-}
diff --git a/examples/feather_rp2040/blink/project.xml b/examples/feather_rp2040/blink/project.xml
deleted file mode 100644
index 91b87ef5a4..0000000000
--- a/examples/feather_rp2040/blink/project.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
- modm:feather-rp2040
-
-
-
-
- modm:build:scons
-
-
diff --git a/examples/generic/README.md b/examples/generic/README.md
deleted file mode 100644
index 3e8db68453..0000000000
--- a/examples/generic/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Generic Examples for modm
-
-Over time many examples have been duplicated to many different dev boards.
-
-Up-to-date examples which run on different boards shall be consolidated
-in this folder. Typically, only the dev board in project.cfg should be
-replaced. A good example is blinky from
-https://github.com/roboterclubaachen/getting-started-with-modm
-
-# List of examples
-
-| Example | External Hardware | Nucleo L476RG | Arduino Uno |
-|:-------------------|:------------------------|:-----------------|:------------|
-| Blinky( + Logger) | None | ✅ | ✅ |
-| RTC DS1302 | RTC Module DS1302 | ✅ | ✅ |
diff --git a/examples/generic/blinky/project.xml b/examples/generic/blinky/project.xml
deleted file mode 100644
index ca7b76e203..0000000000
--- a/examples/generic/blinky/project.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
- modm:nucleo-l476rg
-
-
-
-
- modm:architecture:delay
- modm:build:scons
-
-
diff --git a/examples/generic/fiber/project.xml b/examples/generic/fiber/project.xml
deleted file mode 100644
index 6ba23ab424..0000000000
--- a/examples/generic/fiber/project.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
- modm:nucleo-f429zi
-
-
-
-
-
-
- modm:build:scons
- modm:processing:timer
- modm:processing:fiber
- modm:driver:cycle_counter
-
-
diff --git a/examples/generic/ros/can_bridge/openocd.cfg b/examples/generic/ros/can_bridge/openocd.cfg
deleted file mode 100644
index b157e7e432..0000000000
--- a/examples/generic/ros/can_bridge/openocd.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-# Replace this with your custom programmer
-source [find interface/stlink-v2.cfg]
diff --git a/examples/generic/usb/openocd.cfg b/examples/generic/usb/openocd.cfg
deleted file mode 100644
index b157e7e432..0000000000
--- a/examples/generic/usb/openocd.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-# Replace this with your custom programmer
-source [find interface/stlink-v2.cfg]
diff --git a/examples/generic/blinky/main.cpp b/examples/gpio/blinky/main.cpp
similarity index 80%
rename from examples/generic/blinky/main.cpp
rename to examples/gpio/blinky/main.cpp
index 8aed4ca6fd..8224512741 100644
--- a/examples/generic/blinky/main.cpp
+++ b/examples/gpio/blinky/main.cpp
@@ -10,18 +10,19 @@
*/
#include
-int main()
+int
+main()
{
Board::initialize();
Board::Leds::setOutput();
+ static uint32_t counter(0);
while (true)
{
- Board::Leds::toggle();
+ Board::Leds::write(counter);
modm::delay(Board::Button::read() ? 250ms : 500ms);
#ifdef MODM_BOARD_HAS_LOGGER
- static uint32_t counter(0);
- MODM_LOG_INFO << "Loop counter: " << (counter++) << modm::endl;
+ MODM_LOG_INFO << "Loop counter: " << counter << modm::endl;
#endif
}
return 0;
diff --git a/examples/gpio/blinky/project.xml b/examples/gpio/blinky/project.xml
new file mode 100644
index 0000000000..bfb2e19e9b
--- /dev/null
+++ b/examples/gpio/blinky/project.xml
@@ -0,0 +1,75 @@
+
+ modm:nucleo-l476rg
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ modm:architecture:delay
+ modm:build:scons
+
+
diff --git a/examples/linux/assert/project.xml b/examples/linux/assert/project.xml
index bc713408ef..8c942372bb 100644
--- a/examples/linux/assert/project.xml
+++ b/examples/linux/assert/project.xml
@@ -2,7 +2,6 @@
-
modm:platform:core
diff --git a/examples/linux/block_device/file/project.xml b/examples/linux/block_device/file/project.xml
index 92e8d87d5f..1261579c7a 100644
--- a/examples/linux/block_device/file/project.xml
+++ b/examples/linux/block_device/file/project.xml
@@ -2,7 +2,6 @@
-
modm:platform:core
diff --git a/examples/linux/block_device/mirror/project.xml b/examples/linux/block_device/mirror/project.xml
index 9f4224d5a9..c49d5d2a7e 100644
--- a/examples/linux/block_device/mirror/project.xml
+++ b/examples/linux/block_device/mirror/project.xml
@@ -2,7 +2,6 @@
-
modm:platform:core
diff --git a/examples/linux/block_device/ram/project.xml b/examples/linux/block_device/ram/project.xml
index a7c25d2089..e0575c0ae3 100644
--- a/examples/linux/block_device/ram/project.xml
+++ b/examples/linux/block_device/ram/project.xml
@@ -2,7 +2,6 @@
-
modm:platform:core
diff --git a/examples/linux/build_info/project.xml b/examples/linux/build_info/project.xml
index e093490cdb..03ee799822 100644
--- a/examples/linux/build_info/project.xml
+++ b/examples/linux/build_info/project.xml
@@ -2,7 +2,6 @@
-
diff --git a/examples/linux/can_debugger/project.xml b/examples/linux/can_debugger/project.xml
index 04f6279842..4c2090cc30 100644
--- a/examples/linux/can_debugger/project.xml
+++ b/examples/linux/can_debugger/project.xml
@@ -1,7 +1,6 @@
-
modm:debug
diff --git a/examples/linux/etl/project.xml b/examples/linux/etl/project.xml
index d776773bbc..7cde194225 100644
--- a/examples/linux/etl/project.xml
+++ b/examples/linux/etl/project.xml
@@ -2,7 +2,6 @@
-
modm:etl
diff --git a/examples/linux/fiber/project.xml b/examples/linux/fiber/project.xml
index 3933a79854..0ef6763fd1 100644
--- a/examples/linux/fiber/project.xml
+++ b/examples/linux/fiber/project.xml
@@ -2,7 +2,6 @@
-
modm:debug
diff --git a/examples/linux/git/project.xml b/examples/linux/git/project.xml
index 1fb1b22f28..52904e84ae 100644
--- a/examples/linux/git/project.xml
+++ b/examples/linux/git/project.xml
@@ -2,7 +2,6 @@
-
diff --git a/examples/linux/logger/project.xml b/examples/linux/logger/project.xml
index 6075c7d2db..a1ede4258d 100644
--- a/examples/linux/logger/project.xml
+++ b/examples/linux/logger/project.xml
@@ -2,7 +2,6 @@
-
modm:debug
diff --git a/examples/linux/printf/project.xml b/examples/linux/printf/project.xml
index 70094dfa15..e0edaeb94e 100644
--- a/examples/linux/printf/project.xml
+++ b/examples/linux/printf/project.xml
@@ -2,7 +2,6 @@
-
diff --git a/examples/linux/serial_interface/project.xml b/examples/linux/serial_interface/project.xml
index 43c4a55f5c..4ef6941352 100644
--- a/examples/linux/serial_interface/project.xml
+++ b/examples/linux/serial_interface/project.xml
@@ -1,7 +1,6 @@
-
modm:platform:core
diff --git a/examples/linux/static_serial_interface/project.xml b/examples/linux/static_serial_interface/project.xml
index 5a9490b51e..4ef6941352 100644
--- a/examples/linux/static_serial_interface/project.xml
+++ b/examples/linux/static_serial_interface/project.xml
@@ -1,7 +1,6 @@
-
modm:platform:core
diff --git a/examples/linux/threads/project.xml b/examples/linux/threads/project.xml
index 9554854329..2f5bfe5f9d 100644
--- a/examples/linux/threads/project.xml
+++ b/examples/linux/threads/project.xml
@@ -1,7 +1,6 @@
-
modm:platform:core
diff --git a/examples/nucleo_f031k6/blink/main.cpp b/examples/nucleo_f031k6/blink/main.cpp
deleted file mode 100644
index 27b5693d5a..0000000000
--- a/examples/nucleo_f031k6/blink/main.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2016-2017, Niklas Hauser
- * Copyright (c) 2017, Nick Sarten
- *
- * 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();
- LedD13::setOutput();
-
- // Use the logging streams to print some messages.
- // Change MODM_LOG_LEVEL above to enable or disable these messages
- MODM_LOG_DEBUG << "debug" << modm::endl;
- MODM_LOG_INFO << "info" << modm::endl;
- MODM_LOG_WARNING << "warning" << modm::endl;
- MODM_LOG_ERROR << "error" << modm::endl;
-
- uint32_t counter(0);
-
- while (true)
- {
- LedD13::toggle();
- modm::delay(Button::read() ? 100ms : 500ms);
-
- MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
- }
-
- return 0;
-}
diff --git a/examples/nucleo_f031k6/blink/project.xml b/examples/nucleo_f031k6/blink/project.xml
deleted file mode 100644
index b54736503f..0000000000
--- a/examples/nucleo_f031k6/blink/project.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
- modm:nucleo-f031k6
-
-
-
-
- modm:build:scons
-
-
diff --git a/examples/nucleo_f031k6/sk6812/project.xml b/examples/nucleo_f031k6/sk6812/project.xml
deleted file mode 100644
index 376998bffb..0000000000
--- a/examples/nucleo_f031k6/sk6812/project.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
- modm:nucleo-f031k6
-
-
-
-
- modm:build:scons
- modm:driver:sk6812
- modm:platform:spi:1
- modm:ui:led
-
-
diff --git a/examples/nucleo_f042k6/blink/main.cpp b/examples/nucleo_f042k6/blink/main.cpp
deleted file mode 100644
index 27b5693d5a..0000000000
--- a/examples/nucleo_f042k6/blink/main.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2016-2017, Niklas Hauser
- * Copyright (c) 2017, Nick Sarten
- *
- * 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();
- LedD13::setOutput();
-
- // Use the logging streams to print some messages.
- // Change MODM_LOG_LEVEL above to enable or disable these messages
- MODM_LOG_DEBUG << "debug" << modm::endl;
- MODM_LOG_INFO << "info" << modm::endl;
- MODM_LOG_WARNING << "warning" << modm::endl;
- MODM_LOG_ERROR << "error" << modm::endl;
-
- uint32_t counter(0);
-
- while (true)
- {
- LedD13::toggle();
- modm::delay(Button::read() ? 100ms : 500ms);
-
- MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
- }
-
- return 0;
-}
diff --git a/examples/nucleo_f042k6/blink/project.xml b/examples/nucleo_f042k6/blink/project.xml
deleted file mode 100644
index 454d51723b..0000000000
--- a/examples/nucleo_f042k6/blink/project.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
- modm:nucleo-f042k6
-
-
-
-
- modm:build:scons
-
-
diff --git a/examples/nucleo_f042k6/lis3mdl/project.xml b/examples/nucleo_f042k6/lis3mdl/project.xml
deleted file mode 100644
index e03311dcad..0000000000
--- a/examples/nucleo_f042k6/lis3mdl/project.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
- modm:nucleo-f042k6
-
-
-
-
- modm:build:scons
- modm:driver:lis3mdl
- modm:platform:i2c:1
-
-
diff --git a/examples/nucleo_f042k6/lp503x/project.xml b/examples/nucleo_f042k6/lp503x/project.xml
index c0e3195964..2b036d0568 100644
--- a/examples/nucleo_f042k6/lp503x/project.xml
+++ b/examples/nucleo_f042k6/lp503x/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f042k6
-
-
-
modm:build:scons
modm:driver:lp503x
diff --git a/examples/nucleo_f042k6/lsm6ds33/project.xml b/examples/nucleo_f042k6/lsm6ds33/project.xml
index d2766324d6..22049af9fc 100644
--- a/examples/nucleo_f042k6/lsm6ds33/project.xml
+++ b/examples/nucleo_f042k6/lsm6ds33/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f042k6
-
-
-
modm:build:scons
modm:driver:lsm6ds33
diff --git a/examples/nucleo_f042k6/ms5837/project.xml b/examples/nucleo_f042k6/ms5837/project.xml
index 68067ab3ab..6199777ba5 100644
--- a/examples/nucleo_f042k6/ms5837/project.xml
+++ b/examples/nucleo_f042k6/ms5837/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f042k6
-
-
-
modm:build:scons
modm:driver:ms5837
diff --git a/examples/nucleo_f042k6/spi_dma/project.xml b/examples/nucleo_f042k6/spi_dma/project.xml
index ce0fc964be..c3fae910e4 100644
--- a/examples/nucleo_f042k6/spi_dma/project.xml
+++ b/examples/nucleo_f042k6/spi_dma/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f042k6
-
-
-
modm:platform:gpio
modm:platform:dma
diff --git a/examples/nucleo_f042k6/tmp12x/project.xml b/examples/nucleo_f042k6/tmp12x/project.xml
index 040aca166d..6d3b7784bc 100644
--- a/examples/nucleo_f042k6/tmp12x/project.xml
+++ b/examples/nucleo_f042k6/tmp12x/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f042k6
-
-
-
modm:build:scons
modm:driver:tmp12x
diff --git a/examples/nucleo_f042k6/vector_table_ram/project.xml b/examples/nucleo_f042k6/vector_table_ram/project.xml
index 49051a08fe..56d8122756 100644
--- a/examples/nucleo_f042k6/vector_table_ram/project.xml
+++ b/examples/nucleo_f042k6/vector_table_ram/project.xml
@@ -1,7 +1,6 @@
modm:nucleo-f042k6
-
diff --git a/examples/nucleo_f072rb/blink/main.cpp b/examples/nucleo_f072rb/blink/main.cpp
deleted file mode 100644
index e7f726844d..0000000000
--- a/examples/nucleo_f072rb/blink/main.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2021, Thomas Sommer
- *
- * 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
-#include
-
-using namespace Board;
-
-int
-main()
-{
- Board::initialize();
- LedD13::setOutput();
-
- // Use the logging streams to print some messages.
- // Change MODM_LOG_LEVEL above to enable or disable these messages
- MODM_LOG_DEBUG << "debug" << modm::endl;
- MODM_LOG_INFO << "info" << modm::endl;
- MODM_LOG_WARNING << "warning" << modm::endl;
- MODM_LOG_ERROR << "error" << modm::endl;
-
- uint32_t counter(0);
- modm::ShortPeriodicTimer timer(1s);
-
- while (true)
- {
- if (timer.execute())
- {
- LedD13::toggle();
-
- MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
- }
- }
-
- return 0;
-}
diff --git a/examples/nucleo_f072rb/blink/project.xml b/examples/nucleo_f072rb/blink/project.xml
deleted file mode 100644
index 24d8c0704c..0000000000
--- a/examples/nucleo_f072rb/blink/project.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
- modm:nucleo-f072rb
-
-
-
-
- modm:build:scons
- modm:processing:timer
-
-
diff --git a/examples/nucleo_f072rb/iwdg/project.xml b/examples/nucleo_f072rb/iwdg/project.xml
index b75648896d..f69d630c8f 100644
--- a/examples/nucleo_f072rb/iwdg/project.xml
+++ b/examples/nucleo_f072rb/iwdg/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f072rb
-
-
-
modm:build:scons
modm:platform:iwdg
diff --git a/examples/nucleo_f091rc/blink/main.cpp b/examples/nucleo_f091rc/blink/main.cpp
deleted file mode 100644
index f10affaca2..0000000000
--- a/examples/nucleo_f091rc/blink/main.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2021, Niklas Hauser
- *
- * 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
-#include
-
-using namespace Board;
-
-int
-main()
-{
- Board::initialize();
- LedD13::setOutput();
-
- // Use the logging streams to print some messages.
- // Change MODM_LOG_LEVEL above to enable or disable these messages
- MODM_LOG_DEBUG << "debug" << modm::endl;
- MODM_LOG_INFO << "info" << modm::endl;
- MODM_LOG_WARNING << "warning" << modm::endl;
- MODM_LOG_ERROR << "error" << modm::endl;
-
- uint32_t counter(0);
- modm::ShortPeriodicTimer timer(1s);
-
- while (true)
- {
- if (timer.execute())
- {
- LedD13::toggle();
-
- MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
- }
- }
-
- return 0;
-}
diff --git a/examples/nucleo_f091rc/blink/project.xml b/examples/nucleo_f091rc/blink/project.xml
deleted file mode 100644
index f47f080786..0000000000
--- a/examples/nucleo_f091rc/blink/project.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
- modm:nucleo-f091rc
-
-
-
-
- modm:build:scons
- modm:processing:timer
-
-
diff --git a/examples/nucleo_f103rb/blink/main.cpp b/examples/nucleo_f103rb/blink/main.cpp
deleted file mode 100644
index 53ea9b38b8..0000000000
--- a/examples/nucleo_f103rb/blink/main.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2016-2017, Niklas Hauser
- *
- * 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
-#include
-
-using namespace Board;
-
-int
-main()
-{
- Board::initialize();
- LedD13::setOutput();
-
- // Use the logging streams to print some messages.
- // Change MODM_LOG_LEVEL above to enable or disable these messages
- MODM_LOG_DEBUG << "debug" << modm::endl;
- MODM_LOG_INFO << "info" << modm::endl;
- MODM_LOG_WARNING << "warning" << modm::endl;
- MODM_LOG_ERROR << "error" << modm::endl;
-
- uint32_t counter(0);
- modm::PrecisePeriodicTimer tmr(1.23456789s);
-
- while (true)
- {
- if (tmr.execute())
- {
- LedD13::toggle();
-
- MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
- }
- }
-
- return 0;
-}
diff --git a/examples/nucleo_f103rb/blink/project.xml b/examples/nucleo_f103rb/blink/project.xml
deleted file mode 100644
index 8dcd3f3a7e..0000000000
--- a/examples/nucleo_f103rb/blink/project.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
- modm:nucleo-f103rb
-
-
-
-
- ../generated/blink
-
- modm:build:scons
- modm:build:make
- modm:processing:timer
-
-
diff --git a/examples/nucleo_f103rb/hard_fault/project.xml b/examples/nucleo_f103rb/hard_fault/project.xml
deleted file mode 100644
index c07698d07f..0000000000
--- a/examples/nucleo_f103rb/hard_fault/project.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
- modm:nucleo-f103rb
-
-
-
-
- modm:platform:fault
- modm:platform:heap
- modm:build:scons
- modm:build:make
-
-
diff --git a/examples/nucleo_f103rb/itm/main.cpp b/examples/nucleo_f103rb/itm/main.cpp
deleted file mode 100644
index a157d348a6..0000000000
--- a/examples/nucleo_f103rb/itm/main.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2019, Niklas Hauser
- *
- * 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
-#include
-
-using namespace Board;
-
-modm::IODeviceWrapper itm_device;
-modm::IOStream stream(itm_device);
-
-int
-main()
-{
- Board::initialize();
- Itm::initialize();
- LedD13::setOutput();
-
- stream << "Hello from the SWO." << modm::endl;
- stream << "debug" << modm::endl;
- stream << "info" << modm::endl;
- stream << "warning" << modm::endl;
- stream << "error" << modm::endl;
-
-
- while (true)
- {
- static modm::PeriodicTimer tmr{500ms};
- if (tmr.execute())
- {
- tmr.restart(Button::read() ? 100ms : 500ms);
- LedD13::toggle();
-
- static uint32_t counter{0};
- stream << "loop: " << counter++ << modm::endl;
- }
- Itm::update();
- }
-
- return 0;
-}
diff --git a/examples/nucleo_f103rb/itm/project.xml b/examples/nucleo_f103rb/itm/project.xml
deleted file mode 100644
index 5c24d6899e..0000000000
--- a/examples/nucleo_f103rb/itm/project.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
- modm:nucleo-f103rb
-
-
-
-
-
- modm:build:scons
- modm:build:make
- modm:platform:itm
- modm:processing:timer
-
-
diff --git a/examples/nucleo_f103rb/rtos/main.cpp b/examples/nucleo_f103rb/rtos/main.cpp
deleted file mode 100644
index 85ceacb538..0000000000
--- a/examples/nucleo_f103rb/rtos/main.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2014, Georgi Grinshpun
- * Copyright (c) 2014, Sascha Schade
- * Copyright (c) 2015-2017, 2019 Niklas Hauser
- *
- * 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
-#include
-
-using namespace modm::platform;
-
-/**
- * This example uses four threads to check if task switching works correctly.
- *
- * What to expect?
- * ---------------
- * - All our LEDs blinking at different rates, about 3 to 4 Hz
- * - A string at 115200 baud
- *
- * 0aA!1bB"2cC#3dD$4eE%5fF&6gG'7hH(8iI9)jJ0*aA1!bB2"cC
- *
- * Each thread prints out a sequence
- * 0123456789
- * abcdefghij
- * ABCDEFGHIJ
- * !"#$%&'()*
- * respectivly.
- */
-
-// ----------------------------------------------------------------------------
-template
-class P: modm::rtos::Thread
-{
- char c;
- uint8_t i = 0;
- volatile float a = 10.f;
-public:
- P(char c): Thread(2,1<<10), c(c) {}
-
- void run()
- {
- Gpio::setOutput();
- while (true)
- {
- sleep(SleepTime * MILLISECONDS);
-
- Gpio::toggle();
- {
- static modm::rtos::Mutex lm;
- modm::rtos::MutexGuard m(lm);
- MODM_LOG_INFO << char(i + c);
- }
- i = (i+1)%10;
- a *= 3.141f;
- }
- }
-};
-
-P< Board::LedD13, 260 > p1('0');
-P< Board::LedD13, 260 + 10 > p2('a');
-P< Board::LedD13, 260 + 20 > p3('A');
-P< Board::LedD13, 260 + 30 > p4('!');
-
-
-// ----------------------------------------------------------------------------
-int
-main()
-{
- Board::initialize();
- modm::rtos::Scheduler::schedule();
- return 0;
-}
diff --git a/examples/nucleo_f103rb/rtos/project.xml b/examples/nucleo_f103rb/rtos/project.xml
deleted file mode 100644
index 6223a9a004..0000000000
--- a/examples/nucleo_f103rb/rtos/project.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
- modm:nucleo-f103rb
-
-
-
-
- modm:processing:rtos
- modm:platform:heap
- modm:build:scons
-
-
diff --git a/examples/nucleo_f103rb/stts22h/project.xml b/examples/nucleo_f103rb/stts22h/project.xml
index 71d25370ae..d5f08e8966 100644
--- a/examples/nucleo_f103rb/stts22h/project.xml
+++ b/examples/nucleo_f103rb/stts22h/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f103rb
-
-
-
modm:build:scons
modm:processing:timer
diff --git a/examples/nucleo_f103rb/undefined_irq/project.xml b/examples/nucleo_f103rb/undefined_irq/project.xml
index bc5fc6421b..5457542781 100644
--- a/examples/nucleo_f103rb/undefined_irq/project.xml
+++ b/examples/nucleo_f103rb/undefined_irq/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f103rb
-
-
-
modm:build:scons
modm:build:make
diff --git a/examples/nucleo_f303k8/blink/main.cpp b/examples/nucleo_f303k8/blink/main.cpp
deleted file mode 100644
index f7a7bcef2e..0000000000
--- a/examples/nucleo_f303k8/blink/main.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2016-2017, Niklas Hauser
- *
- * 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();
- LedD13::setOutput();
-
- // Use the logging streams to print some messages.
- // Change MODM_LOG_LEVEL above to enable or disable these messages
- MODM_LOG_DEBUG << "debug" << modm::endl;
- MODM_LOG_INFO << "info" << modm::endl;
- MODM_LOG_WARNING << "warning" << modm::endl;
- MODM_LOG_ERROR << "error" << modm::endl;
-
- uint32_t counter(0);
-
- while (true)
- {
- LedD13::toggle();
- modm::delay(Button::read() ? 100ms : 500ms);
-
- MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
- }
-
- return 0;
-}
diff --git a/examples/nucleo_f303k8/blink/project.xml b/examples/nucleo_f303k8/blink/project.xml
deleted file mode 100644
index 0a8e79cb76..0000000000
--- a/examples/nucleo_f303k8/blink/project.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
- modm:nucleo-f303k8
-
-
-
-
- modm:build:scons
-
-
diff --git a/examples/nucleo_f303k8/rtos/main.cpp b/examples/nucleo_f303k8/rtos/main.cpp
deleted file mode 100644
index 85ceacb538..0000000000
--- a/examples/nucleo_f303k8/rtos/main.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2014, Georgi Grinshpun
- * Copyright (c) 2014, Sascha Schade
- * Copyright (c) 2015-2017, 2019 Niklas Hauser
- *
- * 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
-#include
-
-using namespace modm::platform;
-
-/**
- * This example uses four threads to check if task switching works correctly.
- *
- * What to expect?
- * ---------------
- * - All our LEDs blinking at different rates, about 3 to 4 Hz
- * - A string at 115200 baud
- *
- * 0aA!1bB"2cC#3dD$4eE%5fF&6gG'7hH(8iI9)jJ0*aA1!bB2"cC
- *
- * Each thread prints out a sequence
- * 0123456789
- * abcdefghij
- * ABCDEFGHIJ
- * !"#$%&'()*
- * respectivly.
- */
-
-// ----------------------------------------------------------------------------
-template
-class P: modm::rtos::Thread
-{
- char c;
- uint8_t i = 0;
- volatile float a = 10.f;
-public:
- P(char c): Thread(2,1<<10), c(c) {}
-
- void run()
- {
- Gpio::setOutput();
- while (true)
- {
- sleep(SleepTime * MILLISECONDS);
-
- Gpio::toggle();
- {
- static modm::rtos::Mutex lm;
- modm::rtos::MutexGuard m(lm);
- MODM_LOG_INFO << char(i + c);
- }
- i = (i+1)%10;
- a *= 3.141f;
- }
- }
-};
-
-P< Board::LedD13, 260 > p1('0');
-P< Board::LedD13, 260 + 10 > p2('a');
-P< Board::LedD13, 260 + 20 > p3('A');
-P< Board::LedD13, 260 + 30 > p4('!');
-
-
-// ----------------------------------------------------------------------------
-int
-main()
-{
- Board::initialize();
- modm::rtos::Scheduler::schedule();
- return 0;
-}
diff --git a/examples/nucleo_f303k8/rtos/project.xml b/examples/nucleo_f303k8/rtos/project.xml
deleted file mode 100644
index fbd693ec83..0000000000
--- a/examples/nucleo_f303k8/rtos/project.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
- modm:nucleo-f303k8
-
-
-
-
- modm:processing:rtos
- modm:platform:heap
- modm:build:scons
- modm:build:make
-
-
diff --git a/examples/nucleo_f303re/blink/main.cpp b/examples/nucleo_f303re/blink/main.cpp
deleted file mode 100644
index 2c38798a25..0000000000
--- a/examples/nucleo_f303re/blink/main.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2016-2017, Niklas Hauser
- *
- * 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();
- LedD13::setOutput();
-
- // Use the logging streams to print some messages.
- // Change MODM_LOG_LEVEL above to enable or disable these messages
- MODM_LOG_DEBUG << "debug" << modm::endl;
- MODM_LOG_INFO << "info" << modm::endl;
- MODM_LOG_WARNING << "warning" << modm::endl;
- MODM_LOG_ERROR << "error" << modm::endl;
-
- uint32_t counter(0);
-
- while (true)
- {
- LedD13::toggle();
- modm::delay_ms(Button::read() ? 100 : 500);
-
- MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
- }
-
- return 0;
-}
diff --git a/examples/nucleo_f303re/blink/project.xml b/examples/nucleo_f303re/blink/project.xml
deleted file mode 100644
index 0be0b70754..0000000000
--- a/examples/nucleo_f303re/blink/project.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
- modm:nucleo-f303re
-
-
-
-
- modm:build:scons
-
-
diff --git a/examples/nucleo_f303re/itm/main.cpp b/examples/nucleo_f303re/itm/main.cpp
deleted file mode 100644
index a157d348a6..0000000000
--- a/examples/nucleo_f303re/itm/main.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2019, Niklas Hauser
- *
- * 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
-#include
-
-using namespace Board;
-
-modm::IODeviceWrapper itm_device;
-modm::IOStream stream(itm_device);
-
-int
-main()
-{
- Board::initialize();
- Itm::initialize();
- LedD13::setOutput();
-
- stream << "Hello from the SWO." << modm::endl;
- stream << "debug" << modm::endl;
- stream << "info" << modm::endl;
- stream << "warning" << modm::endl;
- stream << "error" << modm::endl;
-
-
- while (true)
- {
- static modm::PeriodicTimer tmr{500ms};
- if (tmr.execute())
- {
- tmr.restart(Button::read() ? 100ms : 500ms);
- LedD13::toggle();
-
- static uint32_t counter{0};
- stream << "loop: " << counter++ << modm::endl;
- }
- Itm::update();
- }
-
- return 0;
-}
diff --git a/examples/nucleo_f303re/rtos/project.xml b/examples/nucleo_f303re/rtos/project.xml
deleted file mode 100644
index 4045801884..0000000000
--- a/examples/nucleo_f303re/rtos/project.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
- modm:nucleo-f303re
-
-
-
-
- modm:processing:rtos
- modm:platform:heap
- modm:build:scons
-
-
diff --git a/examples/nucleo_f303re/spi_dma/project.xml b/examples/nucleo_f303re/spi_dma/project.xml
index c7b7f33399..29a138ca18 100644
--- a/examples/nucleo_f303re/spi_dma/project.xml
+++ b/examples/nucleo_f303re/spi_dma/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f303re
-
-
-
modm:platform:gpio
modm:platform:dma
diff --git a/examples/nucleo_f303re/temperature_mcp990x/project.xml b/examples/nucleo_f303re/temperature_mcp990x/project.xml
index e78b5159d8..c35fcd1ca2 100644
--- a/examples/nucleo_f303re/temperature_mcp990x/project.xml
+++ b/examples/nucleo_f303re/temperature_mcp990x/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f303re
-
-
-
modm:build:scons
modm:platform:i2c:2
diff --git a/examples/nucleo_f334r8/blink/main.cpp b/examples/nucleo_f334r8/blink/main.cpp
deleted file mode 100644
index 57453d9948..0000000000
--- a/examples/nucleo_f334r8/blink/main.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2020, Raphael Lehmann
- *
- * 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();
- LedD13::setOutput();
-
- // Use the logging streams to print some messages.
- // Change MODM_LOG_LEVEL above to enable or disable these messages
- MODM_LOG_DEBUG << "debug" << modm::endl;
- MODM_LOG_INFO << "info" << modm::endl;
- MODM_LOG_WARNING << "warning" << modm::endl;
- MODM_LOG_ERROR << "error" << modm::endl;
-
- uint32_t counter(0);
-
- while (true)
- {
- LedD13::toggle();
- modm::delay_ms(Button::read() ? 100 : 500);
-
- MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
- }
-
- return 0;
-}
diff --git a/examples/nucleo_f334r8/blink/project.xml b/examples/nucleo_f334r8/blink/project.xml
deleted file mode 100644
index a0c57d491d..0000000000
--- a/examples/nucleo_f334r8/blink/project.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
- modm:nucleo-f334r8
-
-
-
-
- modm:build:scons
-
-
diff --git a/examples/nucleo_f401re/adc_dma/project.xml b/examples/nucleo_f401re/adc_dma/project.xml
index 4b9b76268b..b59fd4c062 100644
--- a/examples/nucleo_f401re/adc_dma/project.xml
+++ b/examples/nucleo_f401re/adc_dma/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f401re
-
-
-
modm:build:scons
modm:platform:timer:1
diff --git a/examples/nucleo_f401re/blink/main.cpp b/examples/nucleo_f401re/blink/main.cpp
deleted file mode 100644
index a350d65468..0000000000
--- a/examples/nucleo_f401re/blink/main.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2016-2017, Niklas Hauser
- * Copyright (c) 2017, Sascha Schade
- *
- * 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();
- LedD13::setOutput();
-
- // Use the logging streams to print some messages.
- // Change MODM_LOG_LEVEL above to enable or disable these messages
- MODM_LOG_DEBUG << "debug" << modm::endl;
- MODM_LOG_INFO << "info" << modm::endl;
- MODM_LOG_WARNING << "warning" << modm::endl;
- MODM_LOG_ERROR << "error" << modm::endl;
-
- uint32_t counter(0);
-
- while (true)
- {
- LedD13::toggle();
- modm::delay(Button::read() ? 100ms : 500ms);
-
- MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
- }
-
- return 0;
-}
diff --git a/examples/nucleo_f401re/blink/project.xml b/examples/nucleo_f401re/blink/project.xml
deleted file mode 100644
index bfaa013a3b..0000000000
--- a/examples/nucleo_f401re/blink/project.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
- modm:nucleo-f401re
-
-
-
-
- modm:build:scons
-
-
diff --git a/examples/nucleo_f401re/distance_vl53l0/project.xml b/examples/nucleo_f401re/distance_vl53l0/project.xml
index e06a51f19f..6adccc000e 100644
--- a/examples/nucleo_f401re/distance_vl53l0/project.xml
+++ b/examples/nucleo_f401re/distance_vl53l0/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f401re
-
-
-
modm:debug
modm:driver:vl53l0
diff --git a/examples/nucleo_f401re/timer_register_count/project.xml b/examples/nucleo_f401re/timer_register_count/project.xml
index e6736e3c3f..8089eec588 100644
--- a/examples/nucleo_f401re/timer_register_count/project.xml
+++ b/examples/nucleo_f401re/timer_register_count/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f401re
-
-
-
modm:build:scons
modm:platform:timer:1
diff --git a/examples/nucleo_f411re/blink/main.cpp b/examples/nucleo_f411re/blink/main.cpp
deleted file mode 100644
index f7a7bcef2e..0000000000
--- a/examples/nucleo_f411re/blink/main.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2016-2017, Niklas Hauser
- *
- * 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();
- LedD13::setOutput();
-
- // Use the logging streams to print some messages.
- // Change MODM_LOG_LEVEL above to enable or disable these messages
- MODM_LOG_DEBUG << "debug" << modm::endl;
- MODM_LOG_INFO << "info" << modm::endl;
- MODM_LOG_WARNING << "warning" << modm::endl;
- MODM_LOG_ERROR << "error" << modm::endl;
-
- uint32_t counter(0);
-
- while (true)
- {
- LedD13::toggle();
- modm::delay(Button::read() ? 100ms : 500ms);
-
- MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
- }
-
- return 0;
-}
diff --git a/examples/nucleo_f411re/blink/project.xml b/examples/nucleo_f411re/blink/project.xml
deleted file mode 100644
index 7f112cbbc6..0000000000
--- a/examples/nucleo_f411re/blink/project.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
- modm:nucleo-f411re
-
-
-
-
- modm:build:scons
-
-
diff --git a/examples/nucleo_f411re/imu_bno055/project.xml b/examples/nucleo_f411re/imu_bno055/project.xml
index 146a01add6..0963ab3c03 100644
--- a/examples/nucleo_f411re/imu_bno055/project.xml
+++ b/examples/nucleo_f411re/imu_bno055/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f411re
-
-
-
modm:debug
modm:driver:bno055
diff --git a/examples/nucleo_f411re/radio/nrf24-basic-comm/project.xml b/examples/nucleo_f411re/radio/nrf24-basic-comm/project.xml
index 8cce1d3add..76dcf82240 100644
--- a/examples/nucleo_f411re/radio/nrf24-basic-comm/project.xml
+++ b/examples/nucleo_f411re/radio/nrf24-basic-comm/project.xml
@@ -1,7 +1,4 @@
-
-
-
modm:build:scons
diff --git a/examples/nucleo_f411re/radio/nrf24-data/project.xml b/examples/nucleo_f411re/radio/nrf24-data/project.xml
index 2aa29628d4..76dcf82240 100644
--- a/examples/nucleo_f411re/radio/nrf24-data/project.xml
+++ b/examples/nucleo_f411re/radio/nrf24-data/project.xml
@@ -1,7 +1,4 @@
-
-
-
modm:build:scons
diff --git a/examples/nucleo_f411re/radio/nrf24-phy-test/project.xml b/examples/nucleo_f411re/radio/nrf24-phy-test/project.xml
index ef5818a8b1..76dcf82240 100644
--- a/examples/nucleo_f411re/radio/nrf24-phy-test/project.xml
+++ b/examples/nucleo_f411re/radio/nrf24-phy-test/project.xml
@@ -1,7 +1,4 @@
-
-
-
modm:build:scons
diff --git a/examples/nucleo_f411re/radio/nrf24-scanner/project.xml b/examples/nucleo_f411re/radio/nrf24-scanner/project.xml
index 671be131c7..76dcf82240 100644
--- a/examples/nucleo_f411re/radio/nrf24-scanner/project.xml
+++ b/examples/nucleo_f411re/radio/nrf24-scanner/project.xml
@@ -1,7 +1,4 @@
-
-
-
modm:build:scons
diff --git a/examples/nucleo_f411re/rtos/main.cpp b/examples/nucleo_f411re/rtos/main.cpp
deleted file mode 100644
index 85ceacb538..0000000000
--- a/examples/nucleo_f411re/rtos/main.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2014, Georgi Grinshpun
- * Copyright (c) 2014, Sascha Schade
- * Copyright (c) 2015-2017, 2019 Niklas Hauser
- *
- * 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
-#include
-
-using namespace modm::platform;
-
-/**
- * This example uses four threads to check if task switching works correctly.
- *
- * What to expect?
- * ---------------
- * - All our LEDs blinking at different rates, about 3 to 4 Hz
- * - A string at 115200 baud
- *
- * 0aA!1bB"2cC#3dD$4eE%5fF&6gG'7hH(8iI9)jJ0*aA1!bB2"cC
- *
- * Each thread prints out a sequence
- * 0123456789
- * abcdefghij
- * ABCDEFGHIJ
- * !"#$%&'()*
- * respectivly.
- */
-
-// ----------------------------------------------------------------------------
-template
-class P: modm::rtos::Thread
-{
- char c;
- uint8_t i = 0;
- volatile float a = 10.f;
-public:
- P(char c): Thread(2,1<<10), c(c) {}
-
- void run()
- {
- Gpio::setOutput();
- while (true)
- {
- sleep(SleepTime * MILLISECONDS);
-
- Gpio::toggle();
- {
- static modm::rtos::Mutex lm;
- modm::rtos::MutexGuard m(lm);
- MODM_LOG_INFO << char(i + c);
- }
- i = (i+1)%10;
- a *= 3.141f;
- }
- }
-};
-
-P< Board::LedD13, 260 > p1('0');
-P< Board::LedD13, 260 + 10 > p2('a');
-P< Board::LedD13, 260 + 20 > p3('A');
-P< Board::LedD13, 260 + 30 > p4('!');
-
-
-// ----------------------------------------------------------------------------
-int
-main()
-{
- Board::initialize();
- modm::rtos::Scheduler::schedule();
- return 0;
-}
diff --git a/examples/nucleo_f411re/rtos/project.xml b/examples/nucleo_f411re/rtos/project.xml
deleted file mode 100644
index 3d7de69fcd..0000000000
--- a/examples/nucleo_f411re/rtos/project.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
- modm:nucleo-f411re
-
-
-
-
- modm:processing:rtos
- modm:platform:heap
- modm:build:scons
-
-
diff --git a/examples/nucleo_f411re/sx1276_rx/project.xml b/examples/nucleo_f411re/sx1276_rx/project.xml
index 7fc65465b5..c6ec9649df 100644
--- a/examples/nucleo_f411re/sx1276_rx/project.xml
+++ b/examples/nucleo_f411re/sx1276_rx/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f411re
-
-
-
modm:build:scons
modm:platform:spi:1
diff --git a/examples/nucleo_f411re/sx1276_tx/project.xml b/examples/nucleo_f411re/sx1276_tx/project.xml
index 571712fbc8..c6ec9649df 100644
--- a/examples/nucleo_f411re/sx1276_tx/project.xml
+++ b/examples/nucleo_f411re/sx1276_tx/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f411re
-
-
-
modm:build:scons
modm:platform:spi:1
diff --git a/examples/nucleo_f429zi/adc_ads816x/project.xml b/examples/nucleo_f429zi/adc_ads816x/project.xml
index 9b74055737..56985d2fa2 100644
--- a/examples/nucleo_f429zi/adc_ads816x/project.xml
+++ b/examples/nucleo_f429zi/adc_ads816x/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f429zi
-
-
-
modm:build:scons
modm:platform:spi:1
diff --git a/examples/nucleo_f429zi/blink/main.cpp b/examples/nucleo_f429zi/blink/main.cpp
deleted file mode 100644
index 205bc44743..0000000000
--- a/examples/nucleo_f429zi/blink/main.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2016-2017, Niklas Hauser
- *
- * 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();
- Leds::setOutput();
-
- // Use the logging streams to print some messages.
- // Change MODM_LOG_LEVEL above to enable or disable these messages
- MODM_LOG_DEBUG << "debug" << modm::endl;
- MODM_LOG_INFO << "info" << modm::endl;
- MODM_LOG_WARNING << "warning" << modm::endl;
- MODM_LOG_ERROR << "error" << modm::endl;
-
- uint32_t counter(0);
-
- while (true)
- {
- Leds::write(1 << (counter % (Leds::width+1) ));
- modm::delay(Button::read() ? 100ms : 500ms);
-
- MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
- }
-
- return 0;
-}
diff --git a/examples/nucleo_f429zi/blink/project.xml b/examples/nucleo_f429zi/blink/project.xml
deleted file mode 100644
index ae5ada81c8..0000000000
--- a/examples/nucleo_f429zi/blink/project.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
- modm:nucleo-f429zi
-
-
-
-
- modm:build:scons
-
-
diff --git a/examples/nucleo_f429zi/cmsis_dsp/bayes/project.xml b/examples/nucleo_f429zi/cmsis_dsp/bayes/project.xml
index 998cc284f6..4176e369f5 100644
--- a/examples/nucleo_f429zi/cmsis_dsp/bayes/project.xml
+++ b/examples/nucleo_f429zi/cmsis_dsp/bayes/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f429zi
-
-
-
modm:build:scons
modm:cmsis:dsp:bayes
diff --git a/examples/nucleo_f429zi/cmsis_dsp/class_marks/project.xml b/examples/nucleo_f429zi/cmsis_dsp/class_marks/project.xml
index 9c18398010..06e38524a0 100644
--- a/examples/nucleo_f429zi/cmsis_dsp/class_marks/project.xml
+++ b/examples/nucleo_f429zi/cmsis_dsp/class_marks/project.xml
@@ -1,7 +1,6 @@
modm:nucleo-f429zi
-
diff --git a/examples/nucleo_f429zi/cmsis_dsp/convolution/project.xml b/examples/nucleo_f429zi/cmsis_dsp/convolution/project.xml
index 42dca23bc6..946bc17c8e 100644
--- a/examples/nucleo_f429zi/cmsis_dsp/convolution/project.xml
+++ b/examples/nucleo_f429zi/cmsis_dsp/convolution/project.xml
@@ -1,7 +1,6 @@
modm:nucleo-f429zi
-
diff --git a/examples/nucleo_f429zi/cmsis_dsp/dotproduct/project.xml b/examples/nucleo_f429zi/cmsis_dsp/dotproduct/project.xml
index 8e699c709e..0576c94f12 100644
--- a/examples/nucleo_f429zi/cmsis_dsp/dotproduct/project.xml
+++ b/examples/nucleo_f429zi/cmsis_dsp/dotproduct/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f429zi
-
-
-
modm:build:scons
modm:build:make
diff --git a/examples/nucleo_f429zi/cmsis_dsp/fft_bin/project.xml b/examples/nucleo_f429zi/cmsis_dsp/fft_bin/project.xml
index 7ef92ce942..01b5890f3f 100644
--- a/examples/nucleo_f429zi/cmsis_dsp/fft_bin/project.xml
+++ b/examples/nucleo_f429zi/cmsis_dsp/fft_bin/project.xml
@@ -1,7 +1,6 @@
modm:nucleo-f429zi
-
diff --git a/examples/nucleo_f429zi/cmsis_dsp/fir/project.xml b/examples/nucleo_f429zi/cmsis_dsp/fir/project.xml
index 9cb314f1e2..5de24274f4 100644
--- a/examples/nucleo_f429zi/cmsis_dsp/fir/project.xml
+++ b/examples/nucleo_f429zi/cmsis_dsp/fir/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f429zi
-
-
-
modm:build:scons
modm:cmsis:dsp:filtering
diff --git a/examples/nucleo_f429zi/cmsis_dsp/graphic_equalizer/project.xml b/examples/nucleo_f429zi/cmsis_dsp/graphic_equalizer/project.xml
index 6ae108ce9b..fbc9d893eb 100644
--- a/examples/nucleo_f429zi/cmsis_dsp/graphic_equalizer/project.xml
+++ b/examples/nucleo_f429zi/cmsis_dsp/graphic_equalizer/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f429zi
-
-
-
modm:build:scons
modm:cmsis:dsp:filtering
diff --git a/examples/nucleo_f429zi/cmsis_dsp/linear_interp/project.xml b/examples/nucleo_f429zi/cmsis_dsp/linear_interp/project.xml
index 4a0c8fbe2f..6a8dd4a2df 100644
--- a/examples/nucleo_f429zi/cmsis_dsp/linear_interp/project.xml
+++ b/examples/nucleo_f429zi/cmsis_dsp/linear_interp/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f429zi
-
-
-
modm:build:scons
modm:build:make
diff --git a/examples/nucleo_f429zi/cmsis_dsp/matrix/project.xml b/examples/nucleo_f429zi/cmsis_dsp/matrix/project.xml
index 3d6c6a3b6d..65e80c4dbd 100644
--- a/examples/nucleo_f429zi/cmsis_dsp/matrix/project.xml
+++ b/examples/nucleo_f429zi/cmsis_dsp/matrix/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f429zi
-
-
-
modm:build:scons
modm:cmsis:dsp:matrix
diff --git a/examples/nucleo_f429zi/cmsis_dsp/signal_converge/project.xml b/examples/nucleo_f429zi/cmsis_dsp/signal_converge/project.xml
index b81de0017a..f5f00cda7f 100644
--- a/examples/nucleo_f429zi/cmsis_dsp/signal_converge/project.xml
+++ b/examples/nucleo_f429zi/cmsis_dsp/signal_converge/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f429zi
-
-
-
modm:build:scons
modm:cmsis:dsp:filtering
diff --git a/examples/nucleo_f429zi/cmsis_dsp/sin_cos/project.xml b/examples/nucleo_f429zi/cmsis_dsp/sin_cos/project.xml
index 6bc9a45a48..55d03d30ca 100644
--- a/examples/nucleo_f429zi/cmsis_dsp/sin_cos/project.xml
+++ b/examples/nucleo_f429zi/cmsis_dsp/sin_cos/project.xml
@@ -1,7 +1,6 @@
modm:nucleo-f429zi
-
diff --git a/examples/nucleo_f429zi/cmsis_dsp/svm/project.xml b/examples/nucleo_f429zi/cmsis_dsp/svm/project.xml
index 38b0a20647..a9c68b962b 100644
--- a/examples/nucleo_f429zi/cmsis_dsp/svm/project.xml
+++ b/examples/nucleo_f429zi/cmsis_dsp/svm/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f429zi
-
-
-
modm:build:scons
modm:cmsis:dsp:svm
diff --git a/examples/nucleo_f429zi/cmsis_dsp/variance/project.xml b/examples/nucleo_f429zi/cmsis_dsp/variance/project.xml
index 15ac691b6c..b14e3d2f46 100644
--- a/examples/nucleo_f429zi/cmsis_dsp/variance/project.xml
+++ b/examples/nucleo_f429zi/cmsis_dsp/variance/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f429zi
-
-
-
modm:build:scons
modm:cmsis:dsp:basic_math
diff --git a/examples/nucleo_f429zi/ethernet/project.xml b/examples/nucleo_f429zi/ethernet/project.xml
index f661e8ab60..0bce1ab910 100755
--- a/examples/nucleo_f429zi/ethernet/project.xml
+++ b/examples/nucleo_f429zi/ethernet/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f429zi
-
-
-
modm:build:scons
modm:freertos:tcp:lan8720a
diff --git a/examples/nucleo_f429zi/freertos_static/project.xml b/examples/nucleo_f429zi/freertos_static/project.xml
index 1d82f7d8a5..7ac20e87d4 100644
--- a/examples/nucleo_f429zi/freertos_static/project.xml
+++ b/examples/nucleo_f429zi/freertos_static/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f429zi
-
-
-
modm:freertos
modm:build:scons
diff --git a/examples/nucleo_f429zi/imu_adis16470/project.xml b/examples/nucleo_f429zi/imu_adis16470/project.xml
index 5692204e28..c8ecb940a6 100644
--- a/examples/nucleo_f429zi/imu_adis16470/project.xml
+++ b/examples/nucleo_f429zi/imu_adis16470/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f429zi
-
-
-
modm:build:scons
modm:platform:spi:1
diff --git a/examples/nucleo_f429zi/nanopb/project.xml b/examples/nucleo_f429zi/nanopb/project.xml
index aef80dfb2f..fa06c5819d 100644
--- a/examples/nucleo_f429zi/nanopb/project.xml
+++ b/examples/nucleo_f429zi/nanopb/project.xml
@@ -1,7 +1,6 @@
modm:nucleo-f429zi
-
diff --git a/examples/nucleo_f429zi/pat9125el/project.xml b/examples/nucleo_f429zi/pat9125el/project.xml
index e0cc9fc9f0..0545305110 100644
--- a/examples/nucleo_f429zi/pat9125el/project.xml
+++ b/examples/nucleo_f429zi/pat9125el/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f429zi
-
-
-
modm:driver:pat9125el
modm:io
diff --git a/examples/nucleo_f429zi/rtc_mcp7941x/project.xml b/examples/nucleo_f429zi/rtc_mcp7941x/project.xml
index 7369a82fa4..ff3c8d3e76 100644
--- a/examples/nucleo_f429zi/rtc_mcp7941x/project.xml
+++ b/examples/nucleo_f429zi/rtc_mcp7941x/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f429zi
-
-
-
modm:driver:mcp7941x
modm:io
diff --git a/examples/nucleo_f429zi/spi_flash/project.xml b/examples/nucleo_f429zi/spi_flash/project.xml
index 0f64d47b3b..3fb0c28828 100644
--- a/examples/nucleo_f429zi/spi_flash/project.xml
+++ b/examples/nucleo_f429zi/spi_flash/project.xml
@@ -1,8 +1,5 @@
modm:nucleo-f429zi
-
-
-
modm:driver:block.device:spi.flash
modm:platform:spi:1
diff --git a/examples/nucleo_f429zi/spi_flash_fatfs/project.xml b/examples/nucleo_f429zi/spi_flash_fatfs/project.xml
index ba04e1a17d..2a6a9ec447 100644
--- a/examples/nucleo_f429zi/spi_flash_fatfs/project.xml
+++ b/examples/nucleo_f429zi/spi_flash_fatfs/project.xml
@@ -1,7 +1,6 @@
modm:nucleo-f429zi
-
diff --git a/examples/nucleo_f429zi/spistack_flash/project.xml b/examples/nucleo_f429zi/spistack_flash/project.xml
index 29980df508..4cf81601d7 100644
--- a/examples/nucleo_f429zi/spistack_flash/project.xml
+++ b/examples/nucleo_f429zi/spistack_flash/project.xml
@@ -1,12 +1,9 @@
modm:nucleo-f429zi
-
-
-
modm:driver:block.device:spi.flash
modm:driver:block.device:spi.stack.flash
modm:platform:spi:1
modm:build:scons
-
\ No newline at end of file
+
diff --git a/examples/nucleo_f429zi/usb_freertos/project.xml b/examples/nucleo_f429zi/usb_freertos/project.xml
index 1fca26d0fc..b90728245c 100644
--- a/examples/nucleo_f429zi/usb_freertos/project.xml
+++ b/examples/nucleo_f429zi/usb_freertos/project.xml
@@ -1,7 +1,6 @@
modm:nucleo-f429zi
-
diff --git a/examples/nucleo_f429zi/usbfatfs/ffconf_local.h b/examples/nucleo_f429zi/usbfatfs/ffconf_local.h
deleted file mode 100644
index f68a42ef41..0000000000
--- a/examples/nucleo_f429zi/usbfatfs/ffconf_local.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2021, Niklas Hauser
- *
- * 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/.
- */
-
-#ifndef FFCONF_DEF
-# error "Don't include this file directly, use 'ffconf.h' instead!"
-#endif
-
-// Enable directory filtering: f_findfirst(), f_findnext()
-#define FF_USE_FIND 1
-
-// Enable Volume Formatting: f_mkfs()
-#define FF_USE_MKFS 1
-
-// Enable Volume Label: f_setlabel(), f_getlabel()
-#define FF_USE_LABEL 1
-
-// Enable tiny sector buffers
-#define FF_FS_TINY 1
diff --git a/examples/nucleo_f429zi/usbfatfs/main.cpp b/examples/nucleo_f429zi/usbfatfs/main.cpp
deleted file mode 100644
index be15abb772..0000000000
--- a/examples/nucleo_f429zi/usbfatfs/main.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 2020, Niklas Hauser
- *
- * 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
-#include
-#include
-#include
-#include
-
-/* You can test this by updating this firmware with itself:
-
-If you want to use the sanity check:
-
- scons bin && \
- cp ../../../build/nucleo_f429zi/usb_fatfs/scons-release/usbfatfs.bin . && \
- echo -n "F429" >> usbfatfs.bin && \
- crc32 usbfatfs.bin | xxd -r -p - >> usbfatfs.bin && \
- mv usbfatfs.bin /Volumes/MODM_USB
-
-Otherwise just copy the file as is and `#define WITH_SANITY_CHECK 0`
-
- scons bin && \
- cp ../../../build/nucleo_f429zi/usb_fatfs/scons-release/usbfatfs.bin /Volumes/MODM_USB
-
-*/
-
-#define WITH_SANITY_CHECK 1
-
-// ----------------------------------------------------------------------------
-modm_ramcode
-void ram_apply(uint8_t pages, const uint8_t *image, uint32_t length)
-{
- modm::atomic::Lock l;
- // ONLY RAMCODE FROM HERE ON!!!
- for (auto page{0u}; page <= pages; page++)
- Flash::erase(page);
- for (uintptr_t ptr{0}; ptr < length; ptr += sizeof(Flash::MaxWordType))
- Flash::program(Flash::OriginAddr + ptr, *(Flash::MaxWordType*)(image + ptr));
- NVIC_SystemReset();
-}
-
-bool is_valid(FIL *fil, size_t size)
-{
-#if WITH_SANITY_CHECK
- UINT read;
- // Validate processor type string:
- f_lseek(fil, size-8);
- char type[5];
- f_read(fil, type, 4, &read);
- if (memcmp(type, "F429", 4))
- return false;
- // Validate CRC32 of the entire image
- uint32_t file_crc;
- f_read(fil, &file_crc, 4, &read);
- file_crc = modm::swap(file_crc);
- f_rewind(fil);
- uint32_t crc{modm::math::crc32_init};
- for (FSIZE_t offset{0}; offset < size-4; offset++)
- {
- uint8_t data;
- f_read(fil, &data, 1, &read);
- crc = modm::math::crc32_update(crc, data);
- }
- f_rewind(fil);
- return (~crc == file_crc);
-#else
- return true;
-#endif
-}
-
-void
-check_for_update()
-{
- // FAT12 max filename length is 8.3, so this is the max:
- static const char *firmware_name = "USBFATFS.BIN";
- static constexpr uint8_t buffer_sector{7};
- // Note: This allocates all FatFs buffers *ON THE STACK*!
- // It may be desirable to allocate them statically for your code!
- if (FATFS fs; f_mount(&fs, "", 0) == FR_OK)
- {
- DIR dj;
- if (FILINFO fno; f_findfirst(&dj, &fno, "", firmware_name) == FR_OK and fno.fname[0])
- {
- if (FIL fil; f_open(&fil, firmware_name, FA_READ) == FR_OK)
- {
- if (is_valid(&fil, fno.fsize))
- {
- Board::LedBlue::set();
- // We first copy the file into the middle of the flash.
- // It's not guaranteed that the file is stored in FatFs in *one*
- // continous chunk and we cannot access FatFs code in ram_apply!!!
- Flash::unlock();
- uint32_t dst_addr{Flash::Size/2};
- for (auto page{Flash::getPage(dst_addr)};
- page <= Flash::getPage(dst_addr+fno.fsize);
- page++) Flash::erase(page);
- for (FSIZE_t offset{0}; offset < fno.fsize;
- offset += sizeof(Flash::MaxWordType),
- dst_addr += sizeof(Flash::MaxWordType))
- {
- Flash::MaxWordType buffer; UINT read;
- f_read(&fil, &buffer, sizeof(Flash::MaxWordType), &read);
- Flash::program(dst_addr, buffer);
- }
- // Jump into RAM and copy from last flash page to first pages
- ram_apply(Flash::getPage(fno.fsize), Flash::Origin + Flash::Size/2, fno.fsize);
- }
- f_close(&fil);
- }
- }
- f_closedir(&dj);
- f_mount(NULL, "", 1);
- }
-}
-
-void
-initializeFatFs()
-{
- FATFS fs;
- uint8_t fatfs_buffer[FF_MAX_SS];
- f_mount(&fs, "", 0);
-
- // initialize ramdisk with Fat12 file system
- MKFS_PARM param{FM_FAT | FM_SFD, 0, 0, 0, 0};
- f_mkfs("", ¶m, fatfs_buffer, sizeof(fatfs_buffer));
- f_setlabel("MODM_USB");
-
- f_mount(NULL, "", 1);
-}
-
-// ----------------------------------------------------------------------------
-int
-main()
-{
- Board::initialize();
- Board::initializeUsbFs();
- initializeFatFs();
- tusb_init();
-
- while (true)
- {
- tud_task();
-
- static modm::PeriodicTimer tmr{1s};
- if (tmr.execute()) check_for_update();
- }
- return 0;
-}
diff --git a/examples/nucleo_f429zi/usbfatfs/project.xml b/examples/nucleo_f429zi/usbfatfs/project.xml
deleted file mode 100644
index 95b6c2f49f..0000000000
--- a/examples/nucleo_f429zi/usbfatfs/project.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
- modm:nucleo-f429zi
-
-
-
-
-
- modm:processing:timer
- modm:tinyusb
- modm:fatfs
- modm:platform:flash
- modm:build:scons
- modm:math:utils
-
-
- CFG_TUSB_DEBUG=2
-
-
diff --git a/examples/nucleo_f429zi/usbfatfs/ramdisk.cpp b/examples/nucleo_f429zi/usbfatfs/ramdisk.cpp
deleted file mode 100644
index 99da56a9ff..0000000000
--- a/examples/nucleo_f429zi/usbfatfs/ramdisk.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2020, Niklas Hauser
- *
- * 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
-#include
-#include
-#include
-
-// ----------------------------------------------------------------------------
-static constexpr uint32_t sector_size{512};
-static constexpr uint32_t sector_count{365};
-// Allocate giant array inside the SRAM1 noinit section
-modm_section(".noinit_sram1") uint8_t ram_disk[sector_count * sector_size];
-
-DSTATUS disk_initialize(BYTE pdrv) { return pdrv ? STA_NOINIT : 0; }
-DSTATUS disk_status(BYTE pdrv) { return pdrv ? STA_NOINIT : 0; }
-DRESULT disk_read(BYTE pdrv, BYTE *buff, LBA_t sector, UINT count)
-{
- if (pdrv) return RES_NOTRDY;
- memcpy(buff, ram_disk + sector * sector_size, count * sector_size);
- return RES_OK;
-}
-DRESULT disk_write(BYTE pdrv, const BYTE *buff, LBA_t sector, UINT count)
-{
- if (pdrv) return RES_NOTRDY;
- memcpy(ram_disk + sector * sector_size, buff, count * sector_size);
- return RES_OK;
-}
-DRESULT disk_ioctl(BYTE pdrv, BYTE ctrl, void *buff)
-{
- if (pdrv) return RES_NOTRDY;
- switch (ctrl)
- {
- case CTRL_SYNC: return RES_OK;
- case GET_SECTOR_COUNT: *(LBA_t*)buff = sector_count; return RES_OK;
- case GET_SECTOR_SIZE: *(WORD*) buff = sector_size; return RES_OK;
- case GET_BLOCK_SIZE: *(DWORD*)buff = 64; return RES_OK;
- default: return RES_PARERR;
- }
-}
-
-// ----------------------------------------------------------------------------
-// TinyUSB MSC callbacks also accessing the same RAM disk
-#include
-
-void tud_msc_inquiry_cb(uint8_t, uint8_t vendor_id[8], uint8_t product_id[16], uint8_t product_rev[4])
-{
- const char vid[] = "TinyUSB";
- const char pid[] = "Mass Storage";
- const char rev[] = "1.0";
- memcpy(vendor_id , vid, strlen(vid));
- memcpy(product_id , pid, strlen(pid));
- memcpy(product_rev, rev, strlen(rev));
-}
-bool tud_msc_test_unit_ready_cb(uint8_t) { return true; }
-bool tud_msc_start_stop_cb(uint8_t, uint8_t, bool, bool) { return true; }
-void tud_msc_capacity_cb(uint8_t, uint32_t* block_count, uint16_t* block_size)
-{
- *block_count = sector_count;
- *block_size = sector_size;
-}
-int32_t tud_msc_read10_cb(uint8_t, uint32_t lba, uint32_t offset, void* buffer, uint32_t bufsize)
-{
- uint8_t const* addr = ram_disk + sector_size * lba + offset;
- memcpy(buffer, addr, bufsize);
- return bufsize;
-}
-int32_t tud_msc_write10_cb(uint8_t, uint32_t lba, uint32_t offset, uint8_t* buffer, uint32_t bufsize)
-{
- uint8_t* addr = ram_disk + sector_size * lba + offset;
- memcpy(addr, buffer, bufsize);
- return bufsize;
-}
-
-int32_t tud_msc_scsi_cb (uint8_t lun, uint8_t const scsi_cmd[16], void* buffer, uint16_t bufsize)
-{
- void const* response = NULL;
- uint16_t resplen = 0;
- bool in_xfer = true;
- switch (scsi_cmd[0])
- {
- case SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL:
- resplen = 0;
- break;
-
- default:
- tud_msc_set_sense(lun, SCSI_SENSE_ILLEGAL_REQUEST, 0x20, 0x00);
- resplen = -1;
- break;
- }
- if (resplen > bufsize) resplen = bufsize;
- if (response and (resplen > 0) and in_xfer)
- memcpy(buffer, response, resplen);
- return resplen;
-}
diff --git a/examples/nucleo_f439zi/blink/main.cpp b/examples/nucleo_f439zi/blink/main.cpp
deleted file mode 100644
index 205bc44743..0000000000
--- a/examples/nucleo_f439zi/blink/main.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2016-2017, Niklas Hauser
- *
- * 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();
- Leds::setOutput();
-
- // Use the logging streams to print some messages.
- // Change MODM_LOG_LEVEL above to enable or disable these messages
- MODM_LOG_DEBUG << "debug" << modm::endl;
- MODM_LOG_INFO << "info" << modm::endl;
- MODM_LOG_WARNING << "warning" << modm::endl;
- MODM_LOG_ERROR << "error" << modm::endl;
-
- uint32_t counter(0);
-
- while (true)
- {
- Leds::write(1 << (counter % (Leds::width+1) ));
- modm::delay(Button::read() ? 100ms : 500ms);
-
- MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
- }
-
- return 0;
-}
diff --git a/examples/nucleo_f439zi/blink/project.xml b/examples/nucleo_f439zi/blink/project.xml
deleted file mode 100644
index 51980a818e..0000000000
--- a/examples/nucleo_f439zi/blink/project.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-