diff --git a/README.md b/README.md index 1c9e83f4b7..cdf62bbac2 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ git clone --recurse-submodules https://github.com/modm-io/modm.git ## Targets -modm can generate code for 78 AVR and 1158 +modm can generate code for 530 AVR and 1857 STM32 devices, however, there are different levels of support and testing.
diff --git a/examples/avr/1-wire/ds18b20/project.xml b/examples/avr/1-wire/ds18b20/project.xml index 69357a2be2..a1877acd2a 100644 --- a/examples/avr/1-wire/ds18b20/project.xml +++ b/examples/avr/1-wire/ds18b20/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/adc/basic/project.xml b/examples/avr/adc/basic/project.xml index 9cce8fea78..54f51bdb2b 100644 --- a/examples/avr/adc/basic/project.xml +++ b/examples/avr/adc/basic/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/adc/oversample/project.xml b/examples/avr/adc/oversample/project.xml index 6492c335eb..ff96e6136d 100644 --- a/examples/avr/adc/oversample/project.xml +++ b/examples/avr/adc/oversample/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/app_can2usb/project.xml b/examples/avr/app_can2usb/project.xml index 4098c4b8a5..e4bef0481c 100644 --- a/examples/avr/app_can2usb/project.xml +++ b/examples/avr/app_can2usb/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/block_device_mirror/project.xml b/examples/avr/block_device_mirror/project.xml index f83a2b8abc..ff0db135da 100644 --- a/examples/avr/block_device_mirror/project.xml +++ b/examples/avr/block_device_mirror/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/can/mcp2515/project.xml b/examples/avr/can/mcp2515/project.xml index b8763c8eb9..4e7f68a020 100644 --- a/examples/avr/can/mcp2515/project.xml +++ b/examples/avr/can/mcp2515/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/can/mcp2515_uart/project.xml b/examples/avr/can/mcp2515_uart/project.xml index 1ac9a5bc65..02ee9d10b7 100644 --- a/examples/avr/can/mcp2515_uart/project.xml +++ b/examples/avr/can/mcp2515_uart/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/display/dogm128/benchmark/project.xml b/examples/avr/display/dogm128/benchmark/project.xml index 0285e5554b..55b4d4cea0 100644 --- a/examples/avr/display/dogm128/benchmark/project.xml +++ b/examples/avr/display/dogm128/benchmark/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/display/dogm128/caged_ball/project.xml b/examples/avr/display/dogm128/caged_ball/project.xml index 47e7dfdd1b..275e5f6008 100644 --- a/examples/avr/display/dogm128/caged_ball/project.xml +++ b/examples/avr/display/dogm128/caged_ball/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/display/dogm128/draw/project.xml b/examples/avr/display/dogm128/draw/project.xml index 195a57eec4..23e45cea61 100644 --- a/examples/avr/display/dogm128/draw/project.xml +++ b/examples/avr/display/dogm128/draw/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/display/dogm128/image/project.xml b/examples/avr/display/dogm128/image/project.xml index c5c49467e2..a836442361 100644 --- a/examples/avr/display/dogm128/image/project.xml +++ b/examples/avr/display/dogm128/image/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/display/dogm128/text/project.xml b/examples/avr/display/dogm128/text/project.xml index 31be995093..b143806583 100644 --- a/examples/avr/display/dogm128/text/project.xml +++ b/examples/avr/display/dogm128/text/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/display/dogm128/touch/project.xml b/examples/avr/display/dogm128/touch/project.xml index 923d23df98..f3025ef51a 100644 --- a/examples/avr/display/dogm128/touch/project.xml +++ b/examples/avr/display/dogm128/touch/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/display/dogm132/project.xml b/examples/avr/display/dogm132/project.xml index 7303ddf90e..dcbfc116b2 100644 --- a/examples/avr/display/dogm132/project.xml +++ b/examples/avr/display/dogm132/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/display/dogm163/project.xml b/examples/avr/display/dogm163/project.xml index f3ed5ecb7c..23c56530cf 100644 --- a/examples/avr/display/dogm163/project.xml +++ b/examples/avr/display/dogm163/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/display/hd44780/project.xml b/examples/avr/display/hd44780/project.xml index 24404b3b86..bd6e92cf74 100644 --- a/examples/avr/display/hd44780/project.xml +++ b/examples/avr/display/hd44780/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/display/siemens_s65/project.xml b/examples/avr/display/siemens_s65/project.xml index bfe9e2336a..4f8b3578dc 100644 --- a/examples/avr/display/siemens_s65/project.xml +++ b/examples/avr/display/siemens_s65/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/flash/project.xml b/examples/avr/flash/project.xml index 4843ecc340..20abf1dd28 100644 --- a/examples/avr/flash/project.xml +++ b/examples/avr/flash/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/gpio/basic/project.xml b/examples/avr/gpio/basic/project.xml index a002379a09..f1252abe05 100644 --- a/examples/avr/gpio/basic/project.xml +++ b/examples/avr/gpio/basic/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/gpio/blinking/project.xml b/examples/avr/gpio/blinking/project.xml index aebdb29106..8afc1f6cab 100644 --- a/examples/avr/gpio/blinking/project.xml +++ b/examples/avr/gpio/blinking/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/gpio/button_group/project.xml b/examples/avr/gpio/button_group/project.xml index ce92f55c59..6d81ada95b 100644 --- a/examples/avr/gpio/button_group/project.xml +++ b/examples/avr/gpio/button_group/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/logger/project.xml b/examples/avr/logger/project.xml index 182ba0bed4..178938101a 100644 --- a/examples/avr/logger/project.xml +++ b/examples/avr/logger/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/protothread/project.xml b/examples/avr/protothread/project.xml index 0c01770c68..7ce5616c57 100644 --- a/examples/avr/protothread/project.xml +++ b/examples/avr/protothread/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/pwm/pca9685/project.xml b/examples/avr/pwm/pca9685/project.xml index 7971de1162..85df5022d0 100644 --- a/examples/avr/pwm/pca9685/project.xml +++ b/examples/avr/pwm/pca9685/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/sab/master/project.xml b/examples/avr/sab/master/project.xml index d32920af32..72d2a028d2 100644 --- a/examples/avr/sab/master/project.xml +++ b/examples/avr/sab/master/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/sab/slave/project.xml b/examples/avr/sab/slave/project.xml index dab557c3f9..301f60ef82 100644 --- a/examples/avr/sab/slave/project.xml +++ b/examples/avr/sab/slave/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/timeout/project.xml b/examples/avr/timeout/project.xml index 07e6f9de43..3541b5d76e 100644 --- a/examples/avr/timeout/project.xml +++ b/examples/avr/timeout/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/uart/basic/project.xml b/examples/avr/uart/basic/project.xml index 084cb77844..0d4793f203 100644 --- a/examples/avr/uart/basic/project.xml +++ b/examples/avr/uart/basic/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/uart/basic_mega8/project.xml b/examples/avr/uart/basic_mega8/project.xml index 35d664f8a8..1b34f70012 100644 --- a/examples/avr/uart/basic_mega8/project.xml +++ b/examples/avr/uart/basic_mega8/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/uart/extended/project.xml b/examples/avr/uart/extended/project.xml index ef374104a2..9c95203a85 100644 --- a/examples/avr/uart/extended/project.xml +++ b/examples/avr/uart/extended/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/xpcc/receiver/project.xml b/examples/avr/xpcc/receiver/project.xml index 21c391b0a0..8cff056541 100644 --- a/examples/avr/xpcc/receiver/project.xml +++ b/examples/avr/xpcc/receiver/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/avr/xpcc/sender/project.xml b/examples/avr/xpcc/sender/project.xml index 95bc99b025..ef7f904dd6 100644 --- a/examples/avr/xpcc/sender/project.xml +++ b/examples/avr/xpcc/sender/project.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/generic/i2c_multiplex/project.xml b/examples/generic/i2c_multiplex/project.xml index 1b6f2f305c..84fef14ba7 100644 --- a/examples/generic/i2c_multiplex/project.xml +++ b/examples/generic/i2c_multiplex/project.xml @@ -2,8 +2,8 @@ ../../../src/modm/board/nucleo_f303k8/board.xml - - + + diff --git a/examples/nucleo_f103rb/undefined_irq/main.cpp b/examples/nucleo_f103rb/undefined_irq/main.cpp index 3fa5ed8fb6..2c277df565 100644 --- a/examples/nucleo_f103rb/undefined_irq/main.cpp +++ b/examples/nucleo_f103rb/undefined_irq/main.cpp @@ -27,6 +27,7 @@ MODM_ISR(EXTI3) // MODM_ISR(EXTI4) // { MODM_LOG_DEBUG << "EXTI4 called!" << modm::endl; } +[[maybe_unused]] static modm::Abandonment core_assertion_handler(const char * module, const char * /*location*/, diff --git a/ext/modm-devices b/ext/modm-devices index 489c111081..b5071a72d7 160000 --- a/ext/modm-devices +++ b/ext/modm-devices @@ -1 +1 @@ -Subproject commit 489c1110810934249a6f84d4d605a28da96e8699 +Subproject commit b5071a72d75244b1714676bf64044b0374c556dc diff --git a/src/modm/board/al_avreb_can/board.xml b/src/modm/board/al_avreb_can/board.xml index 1b0ed6263f..8c3933b675 100644 --- a/src/modm/board/al_avreb_can/board.xml +++ b/src/modm/board/al_avreb_can/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/al_avreb_can/module.lb b/src/modm/board/al_avreb_can/module.lb index 96225b893c..4d0154932a 100644 --- a/src/modm/board/al_avreb_can/module.lb +++ b/src/modm/board/al_avreb_can/module.lb @@ -20,7 +20,7 @@ https://www.alvidi.de/products/DE/AVR_Entwicklungsboards/avr_modul_avreb_can.php """ def prepare(module, options): - if options[":target"].partname != "at90can128": + if not options[":target"].partname.startswith("at90can128"): return False module.depends( diff --git a/src/modm/board/arduino_nano/board.xml b/src/modm/board/arduino_nano/board.xml index 06b14f349b..a557efcae4 100644 --- a/src/modm/board/arduino_nano/board.xml +++ b/src/modm/board/arduino_nano/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/arduino_nano/module.lb b/src/modm/board/arduino_nano/module.lb index f322d4ea85..e67d46f779 100644 --- a/src/modm/board/arduino_nano/module.lb +++ b/src/modm/board/arduino_nano/module.lb @@ -16,7 +16,7 @@ def init(module): module.description = "Arduino NANO" def prepare(module, options): - if options[":target"].partname != "atmega328p": + if not options[":target"].partname.startswith("atmega328p"): return False module.depends( diff --git a/src/modm/board/arduino_uno/board.xml b/src/modm/board/arduino_uno/board.xml index 0272933afb..3b1ce14345 100644 --- a/src/modm/board/arduino_uno/board.xml +++ b/src/modm/board/arduino_uno/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/arduino_uno/module.lb b/src/modm/board/arduino_uno/module.lb index c0b6048824..b54f21189d 100644 --- a/src/modm/board/arduino_uno/module.lb +++ b/src/modm/board/arduino_uno/module.lb @@ -16,7 +16,7 @@ def init(module): module.description = "Arduino UNO" def prepare(module, options): - if options[":target"].partname != "atmega328p": + if not options[":target"].partname.startswith("atmega328p"): return False module.depends( diff --git a/src/modm/board/black_pill/board.xml b/src/modm/board/black_pill/board.xml index 9d04f3dcc1..d8cb0d3fa1 100644 --- a/src/modm/board/black_pill/board.xml +++ b/src/modm/board/black_pill/board.xml @@ -6,7 +6,7 @@ - + modm:board:black-pill diff --git a/src/modm/board/black_pill/module.lb b/src/modm/board/black_pill/module.lb index 5ab1bf226c..4d47393243 100644 --- a/src/modm/board/black_pill/module.lb +++ b/src/modm/board/black_pill/module.lb @@ -55,7 +55,7 @@ Then include this file in your build options like so: """ def prepare(module, options): - if options[":target"].partname != "stm32f103c8t": + if not options[":target"].partname.startswith("stm32f103c8t"): return False module.depends( diff --git a/src/modm/board/blue_pill/board.xml b/src/modm/board/blue_pill/board.xml index 0d7786fedc..e79285ecea 100644 --- a/src/modm/board/blue_pill/board.xml +++ b/src/modm/board/blue_pill/board.xml @@ -6,7 +6,7 @@ - + modm:board:blue-pill diff --git a/src/modm/board/blue_pill/module.lb b/src/modm/board/blue_pill/module.lb index beadb4358e..5de4f23df4 100644 --- a/src/modm/board/blue_pill/module.lb +++ b/src/modm/board/blue_pill/module.lb @@ -55,7 +55,7 @@ Then include this file in your build options like so: """ def prepare(module, options): - if options[":target"].partname != "stm32f103c8t": + if not options[":target"].partname.startswith("stm32f103c8t"): return False module.depends( diff --git a/src/modm/board/disco_f051r8/board.xml b/src/modm/board/disco_f051r8/board.xml index 1e33f456be..645c3d787a 100644 --- a/src/modm/board/disco_f051r8/board.xml +++ b/src/modm/board/disco_f051r8/board.xml @@ -6,7 +6,7 @@ - + modm:board:disco-f051r8 diff --git a/src/modm/board/disco_f051r8/module.lb b/src/modm/board/disco_f051r8/module.lb index 8c2b900d69..1256f8e88b 100644 --- a/src/modm/board/disco_f051r8/module.lb +++ b/src/modm/board/disco_f051r8/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32f051r8t": + if not options[":target"].partname.startswith("stm32f051r8t"): return False module.depends( diff --git a/src/modm/board/disco_f072rb/board.xml b/src/modm/board/disco_f072rb/board.xml index b16733f86e..5fa7472544 100644 --- a/src/modm/board/disco_f072rb/board.xml +++ b/src/modm/board/disco_f072rb/board.xml @@ -6,7 +6,7 @@ - + modm:board:disco-f072rb diff --git a/src/modm/board/disco_f072rb/module.lb b/src/modm/board/disco_f072rb/module.lb index 8a9853cef0..4ffdc99d93 100644 --- a/src/modm/board/disco_f072rb/module.lb +++ b/src/modm/board/disco_f072rb/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32f072rbt": + if not options[":target"].partname.startswith("stm32f072rbt"): return False module.depends( diff --git a/src/modm/board/disco_f100rb/board.xml b/src/modm/board/disco_f100rb/board.xml index 9986e5b57e..74ec2c7cf2 100644 --- a/src/modm/board/disco_f100rb/board.xml +++ b/src/modm/board/disco_f100rb/board.xml @@ -6,7 +6,7 @@ - + modm:board:disco-f100rb diff --git a/src/modm/board/disco_f100rb/module.lb b/src/modm/board/disco_f100rb/module.lb index 645397c149..87e86895a4 100644 --- a/src/modm/board/disco_f100rb/module.lb +++ b/src/modm/board/disco_f100rb/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32f100rbt": + if not options[":target"].partname.startswith("stm32f100rbt"): return False module.depends( diff --git a/src/modm/board/disco_f303vc/board.xml b/src/modm/board/disco_f303vc/board.xml index 0f9813e28d..cccb8f0c6e 100644 --- a/src/modm/board/disco_f303vc/board.xml +++ b/src/modm/board/disco_f303vc/board.xml @@ -6,7 +6,7 @@ - + modm:board:disco-f303vc diff --git a/src/modm/board/disco_f303vc/module.lb b/src/modm/board/disco_f303vc/module.lb index ce6db1267b..f4ce536fb4 100644 --- a/src/modm/board/disco_f303vc/module.lb +++ b/src/modm/board/disco_f303vc/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32f303vct": + if not options[":target"].partname.startswith("stm32f303vct"): return False module.depends( diff --git a/src/modm/board/disco_f407vg/board.xml b/src/modm/board/disco_f407vg/board.xml index dc001c5a14..d9a4b4f1e8 100644 --- a/src/modm/board/disco_f407vg/board.xml +++ b/src/modm/board/disco_f407vg/board.xml @@ -6,7 +6,7 @@ - + modm:board:disco-f407vg diff --git a/src/modm/board/disco_f407vg/module.lb b/src/modm/board/disco_f407vg/module.lb index 3ecd454f42..d2810e225f 100644 --- a/src/modm/board/disco_f407vg/module.lb +++ b/src/modm/board/disco_f407vg/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32f407vgt": + if not options[":target"].partname.startswith("stm32f407vgt"): return False module.depends( diff --git a/src/modm/board/disco_f429zi/board.xml b/src/modm/board/disco_f429zi/board.xml index e905fa2285..02f196ce0d 100644 --- a/src/modm/board/disco_f429zi/board.xml +++ b/src/modm/board/disco_f429zi/board.xml @@ -6,7 +6,7 @@ - + modm:board:disco-f429zi diff --git a/src/modm/board/disco_f429zi/module.lb b/src/modm/board/disco_f429zi/module.lb index cf59ab2c70..bf42c1f120 100644 --- a/src/modm/board/disco_f429zi/module.lb +++ b/src/modm/board/disco_f429zi/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32f429zit": + if not options[":target"].partname.startswith("stm32f429zit"): return False module.depends( diff --git a/src/modm/board/disco_f469ni/board.xml b/src/modm/board/disco_f469ni/board.xml index e9b50d1f62..8432dc1a3f 100644 --- a/src/modm/board/disco_f469ni/board.xml +++ b/src/modm/board/disco_f469ni/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/disco_f469ni/module.lb b/src/modm/board/disco_f469ni/module.lb index f132e3bdc5..289bcc6630 100644 --- a/src/modm/board/disco_f469ni/module.lb +++ b/src/modm/board/disco_f469ni/module.lb @@ -16,7 +16,7 @@ def init(module): module.description = FileReader("module.md") def prepare(module, options): - if options[":target"].partname != "stm32f469nih": + if not options[":target"].partname.startswith("stm32f469nih"): return False module.depends( diff --git a/src/modm/board/disco_f746ng/board.xml b/src/modm/board/disco_f746ng/board.xml index 21ba7c635b..b6bf88a3d6 100644 --- a/src/modm/board/disco_f746ng/board.xml +++ b/src/modm/board/disco_f746ng/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/disco_f746ng/module.lb b/src/modm/board/disco_f746ng/module.lb index d6944a7a49..ff80279a43 100644 --- a/src/modm/board/disco_f746ng/module.lb +++ b/src/modm/board/disco_f746ng/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32f746ngh": + if not options[":target"].partname.startswith("stm32f746ngh"): return False module.depends( diff --git a/src/modm/board/disco_f769ni/board.xml b/src/modm/board/disco_f769ni/board.xml index 5e6ab66f0a..bf5e0753c6 100644 --- a/src/modm/board/disco_f769ni/board.xml +++ b/src/modm/board/disco_f769ni/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/disco_f769ni/module.lb b/src/modm/board/disco_f769ni/module.lb index c505bece2c..65dca2b0a2 100644 --- a/src/modm/board/disco_f769ni/module.lb +++ b/src/modm/board/disco_f769ni/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32f769nih": + if not options[":target"].partname.startswith("stm32f769nih"): return False module.depends( diff --git a/src/modm/board/disco_l152rc/board.xml b/src/modm/board/disco_l152rc/board.xml index f86037db32..b55149e307 100644 --- a/src/modm/board/disco_l152rc/board.xml +++ b/src/modm/board/disco_l152rc/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/disco_l152rc/module.lb b/src/modm/board/disco_l152rc/module.lb index 432ce282ff..a2711b862b 100644 --- a/src/modm/board/disco_l152rc/module.lb +++ b/src/modm/board/disco_l152rc/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32l152rct": + if not options[":target"].partname.startswith("stm32l152rct"): return False module.depends(":platform:core", ":platform:gpio", ":platform:clock", ":architecture:clock") diff --git a/src/modm/board/disco_l476vg/board.xml b/src/modm/board/disco_l476vg/board.xml index 380766c27b..be0b7ead2c 100644 --- a/src/modm/board/disco_l476vg/board.xml +++ b/src/modm/board/disco_l476vg/board.xml @@ -6,7 +6,7 @@ - + modm:board:disco-l476vg diff --git a/src/modm/board/disco_l476vg/module.lb b/src/modm/board/disco_l476vg/module.lb index 8d58c99acd..7be00eb433 100644 --- a/src/modm/board/disco_l476vg/module.lb +++ b/src/modm/board/disco_l476vg/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32l476vgt": + if not options[":target"].partname.startswith("stm32l476vgt"): return False module.depends(":platform:core", ":platform:gpio", ":platform:clock", ":architecture:clock") diff --git a/src/modm/board/mini_f401/board.xml b/src/modm/board/mini_f401/board.xml index c40e1fe8c0..010183ab5f 100644 --- a/src/modm/board/mini_f401/board.xml +++ b/src/modm/board/mini_f401/board.xml @@ -6,7 +6,7 @@ - + modm:board:mini-f401 diff --git a/src/modm/board/mini_f401/module.lb b/src/modm/board/mini_f401/module.lb index 6679d78620..eaef1967cc 100644 --- a/src/modm/board/mini_f401/module.lb +++ b/src/modm/board/mini_f401/module.lb @@ -56,7 +56,7 @@ Then include this file in your build options like so: """ def prepare(module, options): - if options[":target"].partname != "stm32f401ccu": + if not options[":target"].partname.startswith("stm32f401ccu"): return False module.depends( diff --git a/src/modm/board/mini_f411/board.xml b/src/modm/board/mini_f411/board.xml index 7fe552ebc2..84970a17e2 100644 --- a/src/modm/board/mini_f411/board.xml +++ b/src/modm/board/mini_f411/board.xml @@ -6,7 +6,7 @@ - + modm:board:mini-f411 diff --git a/src/modm/board/mini_f411/module.lb b/src/modm/board/mini_f411/module.lb index 5beee894c5..af38aedc73 100644 --- a/src/modm/board/mini_f411/module.lb +++ b/src/modm/board/mini_f411/module.lb @@ -56,7 +56,7 @@ Then include this file in your build options like so: """ def prepare(module, options): - if options[":target"].partname != "stm32f411ceu": + if not options[":target"].partname.startswith("stm32f411ceu"): return False module.depends( diff --git a/src/modm/board/nucleo_f031k6/board.xml b/src/modm/board/nucleo_f031k6/board.xml index fa06f1d8d5..b29c8accd0 100644 --- a/src/modm/board/nucleo_f031k6/board.xml +++ b/src/modm/board/nucleo_f031k6/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/nucleo_f031k6/module.lb b/src/modm/board/nucleo_f031k6/module.lb index d9713c9b46..100db03f15 100644 --- a/src/modm/board/nucleo_f031k6/module.lb +++ b/src/modm/board/nucleo_f031k6/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32f031k6t": + if not options[":target"].partname.startswith("stm32f031k6t"): return False module.depends(":platform:core", ":platform:gpio", ":platform:clock", ":platform:uart:1", diff --git a/src/modm/board/nucleo_f042k6/board.xml b/src/modm/board/nucleo_f042k6/board.xml index b1524d6403..7b82db59c0 100644 --- a/src/modm/board/nucleo_f042k6/board.xml +++ b/src/modm/board/nucleo_f042k6/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/nucleo_f042k6/module.lb b/src/modm/board/nucleo_f042k6/module.lb index 61dd90c760..ef9fe4d6bc 100644 --- a/src/modm/board/nucleo_f042k6/module.lb +++ b/src/modm/board/nucleo_f042k6/module.lb @@ -21,7 +21,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32f042k6t": + if not options[":target"].partname.startswith("stm32f042k6t"): return False module.depends(":platform:core", ":platform:gpio", ":platform:clock", ":platform:uart:2", diff --git a/src/modm/board/nucleo_f103rb/board.xml b/src/modm/board/nucleo_f103rb/board.xml index 5180ba5a5c..aadaa1dbd8 100644 --- a/src/modm/board/nucleo_f103rb/board.xml +++ b/src/modm/board/nucleo_f103rb/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/nucleo_f103rb/module.lb b/src/modm/board/nucleo_f103rb/module.lb index 584378c030..2d915e7d22 100644 --- a/src/modm/board/nucleo_f103rb/module.lb +++ b/src/modm/board/nucleo_f103rb/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32f103rbt": + if not options[":target"].partname.startswith("stm32f103rbt"): return False module.depends(":platform:core", ":platform:gpio", ":platform:clock", ":platform:uart:2", diff --git a/src/modm/board/nucleo_f303k8/board.xml b/src/modm/board/nucleo_f303k8/board.xml index de09fa3718..e34b698a2f 100644 --- a/src/modm/board/nucleo_f303k8/board.xml +++ b/src/modm/board/nucleo_f303k8/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/nucleo_f303k8/module.lb b/src/modm/board/nucleo_f303k8/module.lb index bb6006f063..b8409cb719 100644 --- a/src/modm/board/nucleo_f303k8/module.lb +++ b/src/modm/board/nucleo_f303k8/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32f303k8t": + if not options[":target"].partname.startswith("stm32f303k8t"): return False module.depends(":platform:core", ":platform:gpio", ":platform:clock", ":platform:uart:2", diff --git a/src/modm/board/nucleo_f401re/board.xml b/src/modm/board/nucleo_f401re/board.xml index 925bc16c3f..77dd270fc3 100644 --- a/src/modm/board/nucleo_f401re/board.xml +++ b/src/modm/board/nucleo_f401re/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/nucleo_f401re/module.lb b/src/modm/board/nucleo_f401re/module.lb index c2d5e6e74c..e862156395 100644 --- a/src/modm/board/nucleo_f401re/module.lb +++ b/src/modm/board/nucleo_f401re/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32f401ret": + if not options[":target"].partname.startswith("stm32f401ret"): return False module.depends(":platform:core", ":platform:gpio", ":platform:clock", ":platform:uart:2", diff --git a/src/modm/board/nucleo_f411re/board.xml b/src/modm/board/nucleo_f411re/board.xml index 4d30f1ba0a..258fbf665c 100644 --- a/src/modm/board/nucleo_f411re/board.xml +++ b/src/modm/board/nucleo_f411re/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/nucleo_f411re/module.lb b/src/modm/board/nucleo_f411re/module.lb index 610b0b0397..3beca27c96 100644 --- a/src/modm/board/nucleo_f411re/module.lb +++ b/src/modm/board/nucleo_f411re/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32f411ret": + if not options[":target"].partname.startswith("stm32f411ret"): return False module.depends(":platform:core", ":platform:gpio", ":platform:clock", ":platform:uart:2", diff --git a/src/modm/board/nucleo_f429zi/board.xml b/src/modm/board/nucleo_f429zi/board.xml index 43fc4a476c..1dd3a65630 100644 --- a/src/modm/board/nucleo_f429zi/board.xml +++ b/src/modm/board/nucleo_f429zi/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/nucleo_f429zi/module.lb b/src/modm/board/nucleo_f429zi/module.lb index bb8dc96cf8..fa110ab366 100644 --- a/src/modm/board/nucleo_f429zi/module.lb +++ b/src/modm/board/nucleo_f429zi/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32f429zit": + if not options[":target"].partname.startswith("stm32f429zit"): return False module.depends(":platform:core", ":platform:gpio", ":platform:clock", ":platform:uart:3", diff --git a/src/modm/board/nucleo_f446re/board.xml b/src/modm/board/nucleo_f446re/board.xml index fc8ad40f6c..12a60dced4 100644 --- a/src/modm/board/nucleo_f446re/board.xml +++ b/src/modm/board/nucleo_f446re/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/nucleo_f446re/module.lb b/src/modm/board/nucleo_f446re/module.lb index bc17427031..17e76819ac 100644 --- a/src/modm/board/nucleo_f446re/module.lb +++ b/src/modm/board/nucleo_f446re/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32f446ret": + if not options[":target"].partname.startswith("stm32f446ret"): return False module.depends(":platform:core", ":platform:gpio", ":platform:clock", ":platform:uart:2", diff --git a/src/modm/board/nucleo_g071rb/board.xml b/src/modm/board/nucleo_g071rb/board.xml index 9b284bc4c2..50a34d7745 100644 --- a/src/modm/board/nucleo_g071rb/board.xml +++ b/src/modm/board/nucleo_g071rb/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/nucleo_g071rb/module.lb b/src/modm/board/nucleo_g071rb/module.lb index 899e1ba359..3ee036008d 100644 --- a/src/modm/board/nucleo_g071rb/module.lb +++ b/src/modm/board/nucleo_g071rb/module.lb @@ -19,7 +19,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32g071rbt": + if not options[":target"].partname.startswith("stm32g071rbt"): return False module.depends(":platform:core", ":platform:gpio", ":platform:clock", ":platform:uart:2", diff --git a/src/modm/board/nucleo_g474re/board.xml b/src/modm/board/nucleo_g474re/board.xml index 769a3a369c..a00cc34a36 100644 --- a/src/modm/board/nucleo_g474re/board.xml +++ b/src/modm/board/nucleo_g474re/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/nucleo_g474re/module.lb b/src/modm/board/nucleo_g474re/module.lb index a2f69c154f..5ccaf40715 100644 --- a/src/modm/board/nucleo_g474re/module.lb +++ b/src/modm/board/nucleo_g474re/module.lb @@ -19,7 +19,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32g474ret": + if not options[":target"].partname.startswith("stm32g474ret"): return False module.depends(":platform:core", ":platform:gpio", ":platform:clock", ":platform:uart:2", diff --git a/src/modm/board/nucleo_l152re/board.xml b/src/modm/board/nucleo_l152re/board.xml index 02469f9e6e..7bed512e65 100644 --- a/src/modm/board/nucleo_l152re/board.xml +++ b/src/modm/board/nucleo_l152re/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/nucleo_l152re/module.lb b/src/modm/board/nucleo_l152re/module.lb index 3f84c76cef..1b3f0e7838 100644 --- a/src/modm/board/nucleo_l152re/module.lb +++ b/src/modm/board/nucleo_l152re/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32l152ret": + if not options[":target"].partname.startswith("stm32l152ret"): return False module.depends(":platform:core", ":platform:gpio", ":platform:clock", ":platform:uart:2", diff --git a/src/modm/board/nucleo_l432kc/board.xml b/src/modm/board/nucleo_l432kc/board.xml index 9386d0dc04..534ae7f1f3 100644 --- a/src/modm/board/nucleo_l432kc/board.xml +++ b/src/modm/board/nucleo_l432kc/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/nucleo_l432kc/module.lb b/src/modm/board/nucleo_l432kc/module.lb index def93f3e92..48c8d24433 100644 --- a/src/modm/board/nucleo_l432kc/module.lb +++ b/src/modm/board/nucleo_l432kc/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32l432kcu": + if not options[":target"].partname.startswith("stm32l432kcu"): return False module.depends(":platform:core", ":platform:gpio", ":platform:clock", ":platform:uart:2", diff --git a/src/modm/board/nucleo_l476rg/board.xml b/src/modm/board/nucleo_l476rg/board.xml index 48bce2f624..11fee7a084 100644 --- a/src/modm/board/nucleo_l476rg/board.xml +++ b/src/modm/board/nucleo_l476rg/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/nucleo_l476rg/module.lb b/src/modm/board/nucleo_l476rg/module.lb index 227caf11d4..e343e9050c 100644 --- a/src/modm/board/nucleo_l476rg/module.lb +++ b/src/modm/board/nucleo_l476rg/module.lb @@ -20,7 +20,7 @@ def init(module): """ def prepare(module, options): - if options[":target"].partname != "stm32l476rgt": + if not options[":target"].partname.startswith("stm32l476rgt"): return False module.depends(":platform:core", ":platform:gpio", ":platform:clock", ":platform:uart:2", diff --git a/src/modm/board/olimexino_stm32/board.xml b/src/modm/board/olimexino_stm32/board.xml index d390687f9f..6efd3ee752 100644 --- a/src/modm/board/olimexino_stm32/board.xml +++ b/src/modm/board/olimexino_stm32/board.xml @@ -6,7 +6,7 @@ - + diff --git a/src/modm/board/olimexino_stm32/module.lb b/src/modm/board/olimexino_stm32/module.lb index f56de95fe1..493812c167 100644 --- a/src/modm/board/olimexino_stm32/module.lb +++ b/src/modm/board/olimexino_stm32/module.lb @@ -21,7 +21,7 @@ https://www.olimex.com/Products/Duino/STM32/OLIMEXINO-STM32/open-source-hardware """ def prepare(module, options): - if options[":target"].partname != "stm32f103rbt": + if not options[":target"].partname.startswith("stm32f103rbt"): return False module.depends(":platform:core", ":platform:gpio", ":platform:clock", ":platform:uart:1", diff --git a/src/modm/board/stm32f030f4p6_demo/board.xml b/src/modm/board/stm32f030f4p6_demo/board.xml index d0bef3d9fc..d62e7c98b1 100644 --- a/src/modm/board/stm32f030f4p6_demo/board.xml +++ b/src/modm/board/stm32f030f4p6_demo/board.xml @@ -6,7 +6,7 @@ - + modm:board:stm32f030_demo diff --git a/src/modm/board/stm32f030f4p6_demo/module.lb b/src/modm/board/stm32f030f4p6_demo/module.lb index fe786571f6..6b4cdf09a3 100644 --- a/src/modm/board/stm32f030f4p6_demo/module.lb +++ b/src/modm/board/stm32f030f4p6_demo/module.lb @@ -53,7 +53,7 @@ Then include this file in your build options like so: """ def prepare(module, options): - if options[":target"].partname != "stm32f030f4p": + if not options[":target"].partname.startswith("stm32f030f4p"): return False module.depends( diff --git a/src/modm/platform/adc/at90_tiny_mega/module.lb b/src/modm/platform/adc/at90_tiny_mega/module.lb index 099ac901c8..a912e1aebb 100644 --- a/src/modm/platform/adc/at90_tiny_mega/module.lb +++ b/src/modm/platform/adc/at90_tiny_mega/module.lb @@ -36,7 +36,7 @@ def build(env): device = env[":target"] driver = device.get_driver("adc") - properties = device.properties + properties = {} properties["target"] = target = device.identifier properties["driver"] = driver @@ -66,7 +66,7 @@ def build(env): if target["name"] in ['8', '16', '32'] and target["type"] in ['hva', 'hvab', 'hvabrevb', 'hvb', 'hvbrevb']: properties["vadc"] = True - if target["name"] in ['8', '128'] and target["type"] in ['a', '']: + if target["name"] in ['8', '128'] and target["type"] in ['a', 'l', '']: properties["adfr"] = True if (target["name"] in ['16', '32'] and target["type"] in ['u4']) or \ @@ -77,11 +77,11 @@ def build(env): if target["name"] in ['8', '48', '88', '168', '328'] and target["type"] in ['a', '', 'p', 'pa']: properties["nomux4"] = True - if target["name"] in ['16', '32', '8535'] and target["type"] in ['a', '']: + if target["name"] in ['16', '32', '8535'] and target["type"] in ['a', 'l', '']: properties["sfior"] = True # ADC High Speed Mode has been removed from some chips - if target["name"] in ['8', '16', '32', '64'] and target["type"] in ['m1', 'u4', 'c1', 'u6']: + if target["name"] in ['8', '16', '32', '64'] and target["type"] in ['m1', 'u4', 'u4rc', 'c1', 'u6']: properties["adhsm"] = True env.substitutions = properties diff --git a/src/modm/platform/gpio/at90_tiny_mega/module.lb b/src/modm/platform/gpio/at90_tiny_mega/module.lb index bebf422544..f267b5012a 100644 --- a/src/modm/platform/gpio/at90_tiny_mega/module.lb +++ b/src/modm/platform/gpio/at90_tiny_mega/module.lb @@ -112,7 +112,7 @@ def validate(env): def build(env): device = env[":target"] driver = device.get_driver("gpio") - properties = device.properties + properties = {} properties["target"] = target = device.identifier properties["driver"] = driver properties.update(bprops) @@ -134,7 +134,7 @@ def build(env): else: properties["eicra"] = "EICRA" - if target["family"] == "mega" and target["name"] in ["8", "16", "32", "8515", "8535"] and target["type"] not in ["u2", "u4"]: + if target["family"] == "mega" and target["name"] in ["8", "16", "32", "8515", "8535"] and target["type"] not in ["u2", "u4", "u4rc"]: properties["isc2"] = "MCUCSR" if target["family"] == "mega" and target["name"] in ["162"]: properties["isc2"] = "EMCUCR" diff --git a/test/all/Makefile b/test/all/Makefile index 76ba96cdfa..b995be949b 100644 --- a/test/all/Makefile +++ b/test/all/Makefile @@ -13,13 +13,7 @@ run-avr: python3 run_all.py at run-stm32: - python3 run_all.py stm32f0 - python3 run_all.py stm32f1 - python3 run_all.py stm32f2 - python3 run_all.py stm32f3 - python3 run_all.py stm32f4 - python3 run_all.py stm32f7 - python3 run_all.py stm32l4 + python3 run_all.py stm32 run-failed: python3 run_all.py failed diff --git a/test/all/ignored.txt b/test/all/ignored.txt index d74b1542c7..44ac365e5a 100644 --- a/test/all/ignored.txt +++ b/test/all/ignored.txt @@ -90,8 +90,11 @@ attiny4 attiny40 attiny5 attiny9 -# FIXME: modm-devices cannot deal with -A/-X variants -stm32l151qch -stm32l151zct -stm32l152qch -stm32l152zct +# FIXME: Missing SPI0 instance +atmega164pa +atmega324pa +# FIXME: cmsis-header issues on this one +stm32l151qch6 +stm32l151zct6 +stm32l152qch6 +stm32l152zct6 diff --git a/test/all/run_all.py b/test/all/run_all.py index ea88c0e59f..9c8085256c 100644 --- a/test/all/run_all.py +++ b/test/all/run_all.py @@ -132,23 +132,39 @@ def build_device(run): def main(): if len(sys.argv) == 2 and sys.argv[1] == "failed": - devices = Path("failed.txt").read_text().strip().split("\n") + raw_devices = Path("failed.txt").read_text().strip().split("\n") else: try: stdout = run_lbuild(["-c", "avr.xml", "discover", "--values", "--name :target"]) - devices = stdout.strip().splitlines() + raw_devices = stdout.strip().splitlines() # filter for only the devices specified for arg in sys.argv[1:]: - devices = [d for d in devices if d.startswith(arg)] + raw_devices = (d for d in raw_devices if d.startswith(arg)) # print(devices) except CommandException as error: print(error) exit(1) ignored_devices = Path("ignored.txt").read_text().strip().split("\n") - ignored_devices = [d for d in ignored_devices if "#" not in d] + ignored_devices = (d for d in ignored_devices if "#" not in d) # filter out non-supported devices - devices = [d for d in devices if d not in ignored_devices] + raw_devices = (d for d in raw_devices if not any(d.startswith(i) for i in ignored_devices)) + + # Filter out the temperature key for STM32, which has no impact on HAL generation + short_devices = set() + devices = [] + for d in raw_devices: + if d.startswith("stm32"): + sd = d[:12] + d[13:] + if sd not in short_devices: + devices.append(d) + short_devices.add(sd) + else: + devices.append(d) + + if not len(devices): + print("No devices found to build! Check your input and 'ignored.txt'.") + exit(1) os.makedirs("log", exist_ok=True) diff --git a/tools/build_script_generator/common.py b/tools/build_script_generator/common.py index fc179c48b2..b51949213e 100644 --- a/tools/build_script_generator/common.py +++ b/tools/build_script_generator/common.py @@ -320,8 +320,14 @@ def common_compiler_flags(compiler, target): ] elif core.startswith("avr"): + # avr-gcc only accepts certain device strings for its -mmcu flag + # See https://gcc.gnu.org/onlinedocs/gcc/AVR-Options.html + mmcu = target.partname.split("-")[0] + for suffix in {"v", "f", "l", "rc"}: + mmcu = mmcu[:-2] + mmcu[-2:].replace(suffix, "") + flags["archflags"] += [ - "-mmcu={}".format(target.partname), + "-mmcu={}".format(mmcu), ] flags["cxxflags"] += [ "-fno-exceptions", diff --git a/tools/scripts/generate_module_docs.py b/tools/scripts/generate_module_docs.py index 10c8c13c4e..2be8fc3620 100755 --- a/tools/scripts/generate_module_docs.py +++ b/tools/scripts/generate_module_docs.py @@ -33,7 +33,28 @@ def get_modules(builder, limit=None): builder._load_repositories(repopath("repo.lb")) option = builder.parser.find_option(":target") - targets = list(set(option.values) - set(d for d in repopath("test/all/ignored.txt").read_text().strip().splitlines() if "#" not in d)) + raw_targets = list(set(option.values) - set(d for d in repopath("test/all/ignored.txt").read_text().strip().splitlines() if "#" not in d)) + + # Reduce device set a little to keep RAM usage in check + # this should ~half the considered devices + short_targets = set() + targets = [] + for d in raw_targets: + if d.startswith("stm32"): + # filter out temperature key + sd = d[:12] + d[13:] + if sd not in short_targets: + targets.append(d) + short_targets.add(sd) + elif d.startswith("at"): + # filter out package + sd = d.split("-")[0] + if sd not in short_targets: + targets.append(d) + short_targets.add(sd) + else: + targets.append(d) + if limit is not None: targets = targets[:limit] targets = sorted(targets)