diff --git a/.github/workflows/compile-all.yml b/.github/workflows/compile-all.yml index ad8eea95b6..1d8538ffff 100644 --- a/.github/workflows/compile-all.yml +++ b/.github/workflows/compile-all.yml @@ -9,7 +9,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-avr:2022-01-20 + image: ghcr.io/modm-ext/modm-build-avr:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -30,7 +30,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -51,7 +51,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -72,7 +72,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -93,7 +93,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -114,7 +114,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -135,7 +135,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -156,7 +156,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -177,7 +177,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -198,7 +198,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -219,7 +219,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -240,7 +240,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -261,7 +261,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -283,7 +283,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -304,7 +304,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -325,7 +325,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -346,7 +346,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -388,7 +388,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -409,7 +409,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -430,7 +430,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -451,7 +451,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -472,7 +472,7 @@ jobs: if: github.event.label.name == 'ci:hal' runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index fc54c1ec26..103936ef39 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -10,7 +10,7 @@ jobs: build-upload-docs: runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-base:2022-01-20 + image: ghcr.io/modm-ext/modm-build-base:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -43,7 +43,7 @@ jobs: api-docs-all: runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-base:2022-01-20 + image: ghcr.io/modm-ext/modm-build-base:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index cc38aa995c..b9f7f41632 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -6,7 +6,7 @@ jobs: unittests-linux-generic: runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository @@ -98,7 +98,7 @@ jobs: stm32-examples: runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -153,7 +153,7 @@ jobs: stm32f4-examples-1: runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -168,7 +168,7 @@ jobs: stm32f4-examples-2: runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -224,7 +224,7 @@ jobs: hal-compile-quick-1: runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -244,7 +244,7 @@ jobs: hal-compile-quick-2: runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -264,7 +264,7 @@ jobs: hal-compile-quick-3: runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -284,7 +284,7 @@ jobs: hal-compile-quick-4: runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-cortex-m:2022-01-20 + image: ghcr.io/modm-ext/modm-build-cortex-m:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 @@ -304,7 +304,7 @@ jobs: build-docs-test: runs-on: ubuntu-20.04 container: - image: ghcr.io/modm-ext/modm-build-base:2022-01-20 + image: ghcr.io/modm-ext/modm-build-base:2022-03-28 steps: - name: Check out repository uses: actions/checkout@v2 diff --git a/.mailmap b/.mailmap index d5ba06d6c9..1e5f8fbbb5 100644 --- a/.mailmap +++ b/.mailmap @@ -62,6 +62,7 @@ Pavel Pletenev Philipp Graf Raphael Lehmann Raphael Lehmann +Rasmus Kleist Sascha Schade Sascha Schade Sascha Schade diff --git a/CHANGELOG.md b/CHANGELOG.md index a74fb54c75..589359dbfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,150 @@ pay attention to. Medium impact changes are also worth looking at. +## 2022-04-01: 2022q1 release + +This release covers everything from 2022-01-01 and has been tested with avr-gcc +v11.2.0 from upstream and arm-none-eabi-gcc 10.3-2021.10 from Arm. + +Breaking changes: + +- Removed all functions marked deprecated for >1 year. + +Features: + +- STM32L5 support. +- Raspberry Pi PR2040 support. +- Microchip SAM timer driver. +- Improved project and Doxygen documentation. +- STM32G4 internal flash driver. +- TinyUSB on STM32G4. + +Integrated Projects: + +- ETL upgraded to v20.27.1. +- TinyUSB upgraded to v0.13.0. +- LVGL upgraded to v8.2.0. + +Fixes: + +- Issues when using TinyUSB and FreeRTOS together solved. +- Fix TinyUSB crash when reading device descriptor. +- TinyUSB correctly chooses fullspeed port on STM32 by default. +- Fix SPI bug in handling of CPHA/CPOL on Microchip SAM. +- Read unique ID correctly on SAMG55. +- Fix GPIO peripheral connect method on Microchip SAM. +- Heap allocator defaults to Newlib on devices with one continuous RAM section. +- FreeRTOS now always supports static allocation. + +New development boards: + +- Support for newer revision (B-03) of the DISCO-F469NI development board + as [`modm:disco-f469ni:b-03`][]. +- Nucleo-L552ZE-Q as [`modm:board:nucleo-l552ze-q`][]. +- RP-PICO as [`modm:board:rp-pico`][]. + +New device drivers: + +- ADIS16470 inertial measurement unit driver as [`modm:driver:adis16470`][]. + +Known bugs: + +- Cannot set breakpoints on specific lines in debug profile. See [#777][]. +- C++20 is not fully implemented by GCC10 yet, however modm does not use all + features yet anyways. See [#326][]. +- STM32F7: D-Cache not enabled by default. See [#485][]. +- `lbuild build` and `lbuild clean` do not remove all previously generated files + when the configuration changes. See [#285][]. +- Generating modm on Windows creates paths with `\` that are not compatible with + Unix. See [#310][]. +- `arm-none-eabi-gdb` TUI and GDBGUI interfaces are not supported on Windows. + See [#591][]. + +Many thanks to all our contributors. +A special thank you to our first timers 🎉: + +- Andrey Kunitsyn ([@andryblack][]) +- Christopher Durand ([@chris-durand][]) +- Jeff McBride ([@mcbridejc][]) +- Kaelin Laundry ([@WasabiFan][]) +- Niklas Hauser ([@salkinium][]) +- Raphael Lehmann ([@rleh][]) +- Rasmus Kleist ([@rasmuskleist][]) 🎉 +- Steven Macías ([@StevenMacias][]) +- Thomas Sommer ([@TomSaw][]) + +PR [#842][] -> [2022q1][]. + +
+Detailed changelog + +#### 2022-03-17: Enable flash driver for STM32G4 + +PR [#838][] -> [f7dff92][]. +Tested in hardware by [@rasmuskleist][]. + +#### 2022-02-28: I²C driver for RP2040 + +PR [#830][] -> [21ba120][]. +Tested in hardware by [@andryblack][] and [@rleh][]. + +#### 2022-02-14: Add configuration version for DISCO-F469NI + +PR [#819][] -> [b18385c][]. + +#### 2022-02-09: Add driver for SAMG timer channels + +PR [#823][] -> [f5cdf6a][]. +Tested in hardware by [@mcbridejc][]. + +#### 2022-02-09: Fix GPIO peripheral connect method on Atmel SAM + +PR [#822][] -> [c868f59][]. +Tested in hardware by [@mcbridejc][]. + +#### 2022-02-08: Read unique ID correctly for SAMG55 + +PR [#824][] -> [845840e][]. +Tested in hardware by [@mcbridejc][]. + +#### 2022-02-08: Fix SPI bug in handling of CPHA/CPOL + +PR [#821][] -> [ac46099][]. +Tested in hardware by [@mcbridejc][]. + +#### 2022-01-31: Fix issues when using TinyUSB and FreeRTOS together + +PR [#816][] -> [3f3ff3d][]. +Tested in hardware by [@rleh][]. + +#### 2022-01-24: Add ADIS16470 inertial measurement unit driver + +PR [#805][] -> [b153186][]. +Tested in hardware by [@rleh][]. + +#### 2022-01-24: Add Raspberry Pi RP2040 support + +Support for the Raspberry Pi microcontroller RP2040 with two ARM Cortex M0+ +cores. +This includes support platform drivers for clock, DMA, GPIO, UART, SPI, +USB (TinyUSB) and a board support package for the Raspberry Pi _Pico_ +development board. + +PR [#806][] -> [1c9c0b6][]. +Tested in hardware by [@andryblack][], [@rleh][] and [@salkinium][]. + +#### 2022-01-19: Add STM32L5 support + +Support for all devices of the new STM32L5 family with Cortex-M33 core. +ADC, DMA, FreeRTOS and RCC platform drivers are adapted and a BSP for the +Nucleo-L552ZE-Q is also included. + +PR [#800][] -> [187ddd8][]. +Tested in hardware by [@chris-durand][]. + +
+ + ## 2022-01-01: 2021q4 release This release covers everything from 2021-10-01 and has been tested with avr-gcc @@ -1748,6 +1892,7 @@ Please note that contributions from xpcc were continuously ported to modm. [2021q2]: https://github.com/modm-io/modm/releases/tag/2021q2 [2021q3]: https://github.com/modm-io/modm/releases/tag/2021q3 [2021q4]: https://github.com/modm-io/modm/releases/tag/2021q4 +[2022q1]: https://github.com/modm-io/modm/releases/tag/2022q1 [@19joho66]: https://github.com/19joho66 [@ASMfreaK]: https://github.com/ASMfreaK @@ -1784,6 +1929,7 @@ Please note that contributions from xpcc were continuously ported to modm. [@nicoBruhn]: https://github.com/nicoBruhn [@odinthenerd]: https://github.com/odinthenerd [@patrick--]: https://github.com/patrick-- +[@rasmuskleist]: https://github.com/rasmuskleist [@rleh]: https://github.com/rleh [@salkinium]: https://github.com/salkinium [@se-bi]: https://github.com/se-bi @@ -1813,11 +1959,15 @@ Please note that contributions from xpcc were continuously ported to modm. [`modm:board:nucleo-l053r8`]: https://modm.io/reference/module/modm-board-nucleo-l053r8 [`modm:board:nucleo-l452re`]: https://modm.io/reference/module/modm-board-nucleo-l452re [`modm:board:nucleo-l496zg-p`]: https://modm.io/reference/module/modm-board-nucleo-l496zg-p +[`modm:board:nucleo-l552ze-q`]: https://modm.io/reference/module/modm-board-nucleo-l552ze-q [`modm:board:raspberrypi`]: https://modm.io/reference/module/modm-board-raspberrypi +[`modm:board:rp-pico`]: https://modm.io/reference/module/modm-board-rp-pico [`modm:board:samd21-mini`]: https://modm.io/reference/module/modm-board-samd21-mini [`modm:board:samg55-xplained-pro`]: https://modm.io/reference/module/modm-board-samg55-xplained-pro [`modm:board:srxe`]: https://modm.io/reference/module/modm-board-srxe [`modm:board:stm32_f32ve`]: https://modm.io/reference/module/modm-board-stm32_f32ve +[`modm:disco-f469ni:b-03`]: https://modm.io/reference/module/modm-disco-f469ni-b-03 +[`modm:driver:adis16470`]: https://modm.io/reference/module/modm-driver-adis16470 [`modm:driver:ads816x`]: https://modm.io/reference/module/modm-driver-ads816x [`modm:driver:apa102`]: https://modm.io/reference/module/modm-driver-apa102 [`modm:driver:bno055`]: https://modm.io/reference/module/modm-driver-bno055 @@ -1984,8 +2134,20 @@ Please note that contributions from xpcc were continuously ported to modm. [#780]: https://github.com/modm-io/modm/pull/780 [#796]: https://github.com/modm-io/modm/pull/796 [#797]: https://github.com/modm-io/modm/pull/797 +[#800]: https://github.com/modm-io/modm/pull/800 +[#805]: https://github.com/modm-io/modm/pull/805 +[#806]: https://github.com/modm-io/modm/pull/806 +[#816]: https://github.com/modm-io/modm/pull/816 +[#819]: https://github.com/modm-io/modm/pull/819 [#81]: https://github.com/modm-io/modm/pull/81 +[#821]: https://github.com/modm-io/modm/pull/821 +[#822]: https://github.com/modm-io/modm/pull/822 +[#823]: https://github.com/modm-io/modm/pull/823 +[#824]: https://github.com/modm-io/modm/pull/824 [#82]: https://github.com/modm-io/modm/pull/82 +[#830]: https://github.com/modm-io/modm/pull/830 +[#838]: https://github.com/modm-io/modm/pull/838 +[#842]: https://github.com/modm-io/modm/pull/842 [#96]: https://github.com/modm-io/modm/pull/96 [00471ca]: https://github.com/modm-io/modm/commit/00471ca @@ -2003,11 +2165,14 @@ Please note that contributions from xpcc were continuously ported to modm. [1375ff1]: https://github.com/modm-io/modm/commit/1375ff1 [141aa71]: https://github.com/modm-io/modm/commit/141aa71 [165adf0]: https://github.com/modm-io/modm/commit/165adf0 +[187ddd8]: https://github.com/modm-io/modm/commit/187ddd8 [195f7e1]: https://github.com/modm-io/modm/commit/195f7e1 [1a11b08]: https://github.com/modm-io/modm/commit/1a11b08 +[1c9c0b6]: https://github.com/modm-io/modm/commit/1c9c0b6 [1f5d06e]: https://github.com/modm-io/modm/commit/1f5d06e [1fc3805]: https://github.com/modm-io/modm/commit/1fc3805 [21af57b]: https://github.com/modm-io/modm/commit/21af57b +[21ba120]: https://github.com/modm-io/modm/commit/21ba120 [22867e0]: https://github.com/modm-io/modm/commit/22867e0 [23ec952]: https://github.com/modm-io/modm/commit/23ec952 [276f5b3]: https://github.com/modm-io/modm/commit/276f5b3 @@ -2022,6 +2187,7 @@ Please note that contributions from xpcc were continuously ported to modm. [399a533]: https://github.com/modm-io/modm/commit/399a533 [3ba71c9]: https://github.com/modm-io/modm/commit/3ba71c9 [3ecad35]: https://github.com/modm-io/modm/commit/3ecad35 +[3f3ff3d]: https://github.com/modm-io/modm/commit/3f3ff3d [43f32e6]: https://github.com/modm-io/modm/commit/43f32e6 [47adfd6]: https://github.com/modm-io/modm/commit/47adfd6 [48d73dc]: https://github.com/modm-io/modm/commit/48d73dc @@ -2056,6 +2222,7 @@ Please note that contributions from xpcc were continuously ported to modm. [80ed738]: https://github.com/modm-io/modm/commit/80ed738 [821677b]: https://github.com/modm-io/modm/commit/821677b [82bc4a9]: https://github.com/modm-io/modm/commit/82bc4a9 +[845840e]: https://github.com/modm-io/modm/commit/845840e [850b554]: https://github.com/modm-io/modm/commit/850b554 [85eec34]: https://github.com/modm-io/modm/commit/85eec34 [8820d6b]: https://github.com/modm-io/modm/commit/8820d6b @@ -2078,10 +2245,13 @@ Please note that contributions from xpcc were continuously ported to modm. [a607613]: https://github.com/modm-io/modm/commit/a607613 [a6b4186]: https://github.com/modm-io/modm/commit/a6b4186 [a8edbe8]: https://github.com/modm-io/modm/commit/a8edbe8 +[ac46099]: https://github.com/modm-io/modm/commit/ac46099 [af2b352]: https://github.com/modm-io/modm/commit/af2b352 [afaea7f]: https://github.com/modm-io/modm/commit/afaea7f [afbd533]: https://github.com/modm-io/modm/commit/afbd533 [b010775]: https://github.com/modm-io/modm/commit/b010775 +[b153186]: https://github.com/modm-io/modm/commit/b153186 +[b18385c]: https://github.com/modm-io/modm/commit/b18385c [b1e5588]: https://github.com/modm-io/modm/commit/b1e5588 [b4eddeb]: https://github.com/modm-io/modm/commit/b4eddeb [b570d07]: https://github.com/modm-io/modm/commit/b570d07 @@ -2093,6 +2263,7 @@ Please note that contributions from xpcc were continuously ported to modm. [c38550a]: https://github.com/modm-io/modm/commit/c38550a [c63a536]: https://github.com/modm-io/modm/commit/c63a536 [c7b35ca]: https://github.com/modm-io/modm/commit/c7b35ca +[c868f59]: https://github.com/modm-io/modm/commit/c868f59 [cb82eec]: https://github.com/modm-io/modm/commit/cb82eec [cbbf3f6]: https://github.com/modm-io/modm/commit/cbbf3f6 [cbce428]: https://github.com/modm-io/modm/commit/cbce428 @@ -2113,6 +2284,8 @@ Please note that contributions from xpcc were continuously ported to modm. [eba68a4]: https://github.com/modm-io/modm/commit/eba68a4 [f4c7492]: https://github.com/modm-io/modm/commit/f4c7492 [f4d5d6c]: https://github.com/modm-io/modm/commit/f4d5d6c +[f5cdf6a]: https://github.com/modm-io/modm/commit/f5cdf6a +[f7dff92]: https://github.com/modm-io/modm/commit/f7dff92 [fb21f62]: https://github.com/modm-io/modm/commit/fb21f62 [fb2ff58]: https://github.com/modm-io/modm/commit/fb2ff58 [fd7b7a3]: https://github.com/modm-io/modm/commit/fd7b7a3 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7c73585f98..621edfa802 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,8 +33,9 @@ CI tests in order to be merged. ## When in doubt, ask -The dedicated maintainers of modm are [@salkinium](https://github.com/salkinium) -and [@rleh](https://github.com/rleh) and you can always ping them. +The dedicated maintainers of modm are [@salkinium](https://github.com/salkinium), +[@rleh](https://github.com/rleh) and [@chris-durand](https://github.com/chris-durand). +You can always ping them. If you want to add a new platform, or other significant functionality, we [ask you to discuss that in a thread first][ideas]. We are very open to diff --git a/README.md b/README.md index 298023a515..d1913692a0 100644 --- a/README.md +++ b/README.md @@ -78,9 +78,9 @@ git clone --recurse-submodules --jobs 8 https://github.com/modm-io/modm.git ## Microcontrollers -modm can create a HAL for 3301 devices of these vendors: +modm can create a HAL for 3287 devices of these vendors: -- STMicroelectronics STM32: 2726 devices. +- STMicroelectronics STM32: 2712 devices. - Microchip SAM: 186 devices. - Microchip AVR: 388 devices. - Raspberry Pi: 1 device. @@ -742,15 +742,15 @@ See [CONTRIBUTING.md][contrib] for our contribution guidelines. The modm project is maintained by -Niklas Hauser ([\@salkinium](https://github.com/salkinium)) and -Raphael Lehmann ([\@rleh](https://github.com/rleh)) with significant contributions from +Niklas Hauser ([\@salkinium](https://github.com/salkinium)), +Raphael Lehmann ([\@rleh](https://github.com/rleh)) and +Christopher Durand ([\@chris-durand](https://github.com/chris-durand)) with significant contributions from Sascha Schade ([\@strongly-typed](https://github.com/strongly-typed)), Fabian Greif ([\@dergraaf](https://github.com/dergraaf)), Kevin Läufer ([\@ekiwi](https://github.com/ekiwi)), Martin Rosekeit ([\@thundernail](https://github.com/thundernail)), Daniel Krebs ([\@daniel-k](https://github.com/daniel-k)), Georgi Grinshpun ([\@georgi-g](https://github.com/georgi-g)), -Christopher Durand ([\@chris-durand](https://github.com/chris-durand)) David Hebbeker ([\@dhebbeker](https://github.com/dhebbeker)), Thorsten Lajewski ([\@TheTh0r](https://github.com/TheTh0r)), Mike Wolfram ([\@mikewolfram](https://github.com/mikewolfram)) diff --git a/docs/release/2022q1.md b/docs/release/2022q1.md new file mode 100644 index 0000000000..6a201fa586 --- /dev/null +++ b/docs/release/2022q1.md @@ -0,0 +1,142 @@ +## 2022-04-01: 2022q1 release + +This release covers everything from 2022-01-01 and has been tested with avr-gcc +v11.2.0 from upstream and arm-none-eabi-gcc 10.3-2021.10 from Arm. + +Breaking changes: + +- Removed all functions marked deprecated for >1 year. + +Features: + +- STM32L5 support. +- Raspberry Pi PR2040 support. +- Microchip SAM timer driver. +- Improved project and Doxygen documentation. +- STM32G4 internal flash driver. +- TinyUSB on STM32G4. + +Integrated Projects: + +- ETL upgraded to v20.27.1. +- TinyUSB upgraded to v0.13.0. +- LVGL upgraded to v8.2.0. + +Fixes: + +- Issues when using TinyUSB and FreeRTOS together solved. +- Fix TinyUSB crash when reading device descriptor. +- TinyUSB correctly chooses fullspeed port on STM32 by default. +- Fix SPI bug in handling of CPHA/CPOL on Microchip SAM. +- Read unique ID correctly on SAMG55. +- Fix GPIO peripheral connect method on Microchip SAM. +- Heap allocator defaults to Newlib on devices with one continuous RAM section. +- FreeRTOS now always supports static allocation. + +New development boards: + +- Support for newer revision (B-03) of the DISCO-F469NI development board + as `modm:disco-f469ni:b-03`. +- Nucleo-L552ZE-Q as `modm:board:nucleo-l552ze-q`. +- RP-PICO as `modm:board:rp-pico`. + +New device drivers: + +- ADIS16470 inertial measurement unit driver as `modm:driver:adis16470`. + +Known bugs: + +- Cannot set breakpoints on specific lines in debug profile. See #777. +- C++20 is not fully implemented by GCC10 yet, however modm does not use all + features yet anyways. See #326. +- STM32F7: D-Cache not enabled by default. See #485. +- `lbuild build` and `lbuild clean` do not remove all previously generated files + when the configuration changes. See #285. +- Generating modm on Windows creates paths with `\` that are not compatible with + Unix. See #310. +- `arm-none-eabi-gdb` TUI and GDBGUI interfaces are not supported on Windows. + See #591. + +Many thanks to all our contributors. +A special thank you to our first timers 🎉: + +- Andrey Kunitsyn (@andryblack) +- Christopher Durand (@chris-durand) +- Jeff McBride (@mcbridejc) +- Kaelin Laundry (@WasabiFan) +- Niklas Hauser (@salkinium) +- Raphael Lehmann (@rleh) +- Rasmus Kleist (@rasmuskleist) 🎉 +- Steven Macías (@StevenMacias) +- Thomas Sommer (@TomSaw) + +PR #842 -> 2022q1. + +
+Detailed changelog + +#### 2022-03-17: Enable flash driver for STM32G4 + +PR #838 -> f7dff92. +Tested in hardware by @rasmuskleist. + +#### 2022-02-28: I²C driver for RP2040 + +PR #830 -> 21ba120. +Tested in hardware by @andryblack and @rleh. + +#### 2022-02-14: Add configuration version for DISCO-F469NI + +PR #819 -> b18385c. + +#### 2022-02-09: Add driver for SAMG timer channels + +PR #823 -> f5cdf6a. +Tested in hardware by @mcbridejc. + +#### 2022-02-09: Fix GPIO peripheral connect method on Atmel SAM + +PR #822 -> c868f59. +Tested in hardware by @mcbridejc. + +#### 2022-02-08: Read unique ID correctly for SAMG55 + +PR #824 -> 845840e. +Tested in hardware by @mcbridejc. + +#### 2022-02-08: Fix SPI bug in handling of CPHA/CPOL + +PR #821 -> ac46099. +Tested in hardware by @mcbridejc. + +#### 2022-01-31: Fix issues when using TinyUSB and FreeRTOS together + +PR #816 -> 3f3ff3d. +Tested in hardware by @rleh. + +#### 2022-01-24: Add ADIS16470 inertial measurement unit driver + +PR #805 -> b153186. +Tested in hardware by @rleh. + +#### 2022-01-24: Add Raspberry Pi RP2040 support + +Support for the Raspberry Pi microcontroller RP2040 with two ARM Cortex M0+ +cores. +This includes support platform drivers for clock, DMA, GPIO, UART, SPI, +USB (TinyUSB) and a board support package for the Raspberry Pi _Pico_ +development board. + +PR #806 -> 1c9c0b6. +Tested in hardware by @andryblack, @rleh and @salkinium. + +#### 2022-01-19: Add STM32L5 support + +Support for all devices of the new STM32L5 family with Cortex-M33 core. +ADC, DMA, FreeRTOS and RCC platform drivers are adapted and a BSP for the +Nucleo-L552ZE-Q is also included. + +PR #800 -> 187ddd8. +Tested in hardware by @chris-durand. + +
diff --git a/examples/generic/i2c_multiplex/main.cpp b/examples/generic/i2c_multiplex/main.cpp index 1c4de04ca2..742007da9c 100644 --- a/examples/generic/i2c_multiplex/main.cpp +++ b/examples/generic/i2c_multiplex/main.cpp @@ -114,9 +114,8 @@ main() modm::platform::I2cMaster1::connect(); modm::platform::I2cMaster1::initialize(); - constexpr uint32_t rate = 1; // Hz - constexpr float interval = 1000.0 / rate; // msec - modm::ShortPeriodicTimer heartbeat(interval); + constexpr std::chrono::milliseconds interval{1000}; + modm::ShortPeriodicTimer heartbeat{interval}; // Main loop DeviceThread deviceThread; diff --git a/examples/generic/resumable/main.cpp b/examples/generic/resumable/main.cpp index d8a4d61635..a8cfec5291 100644 --- a/examples/generic/resumable/main.cpp +++ b/examples/generic/resumable/main.cpp @@ -10,9 +10,12 @@ #include #include +#include using Led = Board::LedGreen; +using namespace std::chrono_literals; + class BlinkingLight : public modm::pt::Protothread, private modm::NestedResumable<2> { public: @@ -31,7 +34,7 @@ class BlinkingLight : public modm::pt::Protothread, private modm::NestedResumabl PT_CALL(waitForTimer()); Led::reset(); - PT_CALL(setTimer(200)); + PT_CALL(setTimer(200ms)); PT_WAIT_UNTIL(timeout.isExpired()); } @@ -45,7 +48,7 @@ class BlinkingLight : public modm::pt::Protothread, private modm::NestedResumabl RF_BEGIN(); // nested calling is allowed - if (RF_CALL(setTimer(100))) + if (RF_CALL(setTimer(100ms))) { RF_WAIT_UNTIL(timeout.isExpired()); RF_RETURN(true); @@ -55,7 +58,7 @@ class BlinkingLight : public modm::pt::Protothread, private modm::NestedResumabl } modm::ResumableResult - setTimer(uint16_t new_timeout) + setTimer(std::chrono::milliseconds new_timeout) { RF_BEGIN(); @@ -78,7 +81,7 @@ BlinkingLight light; int main(void) { - while (true) { - light.run(); - } + while (true) { + light.run(); + } } diff --git a/examples/generic/rtc_ds1302/main.cpp b/examples/generic/rtc_ds1302/main.cpp index 2fdc1ea193..fff50bc2ea 100644 --- a/examples/generic/rtc_ds1302/main.cpp +++ b/examples/generic/rtc_ds1302/main.cpp @@ -12,6 +12,9 @@ #include #include #include +#include + +using namespace std::chrono_literals; struct ds1302_config : public modm::ds1302::Config { @@ -77,9 +80,9 @@ main() // Side effect: set seconds to 0 ds1302::enableOscillator(); - uint16_t tt = 9995; // Milliseconds + auto tt = 9995ms; modm::Timeout timeout; - timeout.restart(std::chrono::milliseconds(tt)); + timeout.restart(tt); // Periodically report progress modm::PeriodicTimer blinkTimer(250ms); @@ -102,9 +105,9 @@ main() ds1302::readRtc(rtc_data); uint8_t seconds = rtc_data.getSeconds(); - MODM_LOG_DEBUG.printf("\b* %2d.%03d seconds from CPU are %2d seconds from RTC.\n", - tt / 1000, - tt % 1000, + MODM_LOG_DEBUG.printf("\b* %2lld.%03lld seconds from CPU are %2d seconds from RTC.\n", + tt.count() / 1000, + tt.count() % 1000, seconds); // Reset seconds to 0 @@ -112,9 +115,9 @@ main() // Adjust timeout time by some milliseconds to match RTC time. if (seconds >= 10) { - tt -= 20; + tt -= 20ms; } else { - tt += 1; + tt += 1ms; } timeout.restart(tt); diff --git a/ext/etlcpp/etl b/ext/etlcpp/etl index dd9c02acd9..88affe9839 160000 --- a/ext/etlcpp/etl +++ b/ext/etlcpp/etl @@ -1 +1 @@ -Subproject commit dd9c02acd988da4d34c290a4842f68326b0d124a +Subproject commit 88affe9839d0d48e3926454878c2202b1c0857c1 diff --git a/ext/gcc/libstdc++ b/ext/gcc/libstdc++ index fa1722e680..d289637d14 160000 --- a/ext/gcc/libstdc++ +++ b/ext/gcc/libstdc++ @@ -1 +1 @@ -Subproject commit fa1722e6802783b737e389e77dd41ff56110f1f1 +Subproject commit d289637d14cb9928a3690be4f2934aa2920f0f38 diff --git a/ext/hathach/module.lb b/ext/hathach/module.lb index aa2ae4fb53..085eaf4bf0 100644 --- a/ext/hathach/module.lb +++ b/ext/hathach/module.lb @@ -92,7 +92,7 @@ def build(env): if target.platform == "stm32": tusb_config["CFG_TUSB_MCU"] = "OPT_MCU_STM32{}".format(target.family.upper()) # TODO: use modm-devices driver type for this - fs_dev = (target.family in ["f0", "f3", "l0"] or + fs_dev = (target.family in ["f0", "f3", "l0", "g4"] or (target.family == "f1" and target.name <= "03")) if fs_dev: # PMA buffer size: 512B or 1024B diff --git a/ext/hathach/tinyusb b/ext/hathach/tinyusb index 6a3450ec4b..05410758f2 160000 --- a/ext/hathach/tinyusb +++ b/ext/hathach/tinyusb @@ -1 +1 @@ -Subproject commit 6a3450ec4ba9598136c1df345e1eaa1c62cc0f52 +Subproject commit 05410758f24f67285b71b34b874024e06b282815 diff --git a/ext/lvgl/lvgl b/ext/lvgl/lvgl index c5f086d7b3..73f52f1c76 160000 --- a/ext/lvgl/lvgl +++ b/ext/lvgl/lvgl @@ -1 +1 @@ -Subproject commit c5f086d7b325b7c4e16672f244556f36e6ae6bfb +Subproject commit 73f52f1c76bbb72b4ebefc610d15ecaa422f1940 diff --git a/ext/modm-devices b/ext/modm-devices index 76c5025686..c0022f2eaa 160000 --- a/ext/modm-devices +++ b/ext/modm-devices @@ -1 +1 @@ -Subproject commit 76c5025686a95f3ceb97f658f0ddf1cd4ebdfc6f +Subproject commit c0022f2eaaf0fb66b18f93e0113bd35264c171e6 diff --git a/ext/rp/pico.h b/ext/rp/pico.h index b7e26d9641..6fe0d68830 100644 --- a/ext/rp/pico.h +++ b/ext/rp/pico.h @@ -27,9 +27,14 @@ extern "C" { /* override expensive assert implementation */ #undef assert #define assert(X) modm_assert((X), "pico", __FILE__ ":" MODM_STRINGIFY(__LINE__) " -> \"" #X "\"") + +#ifndef hard_assert +#define hard_assert assert +#endif + void -panic(const char *fmt, ...); +panic(const char* /*fmt*/, ...); #ifdef __cplusplus } -#endif \ No newline at end of file +#endif diff --git a/ext/st/stm32 b/ext/st/stm32 index 64a48c8394..b9223525af 160000 --- a/ext/st/stm32 +++ b/ext/st/stm32 @@ -1 +1 @@ -Subproject commit 64a48c8394dd0a7d545f9d95cb1e9c5f58b2db99 +Subproject commit b9223525af85d5c729feb4f5279eb1e1187d3a68 diff --git a/repo.lb b/repo.lb index ec56f9b135..857cfa571a 100644 --- a/repo.lb +++ b/repo.lb @@ -238,16 +238,6 @@ def init(repo): config = {v.strip(): (module.parent / "board.xml") for v in versions} repo.add_configuration(Configuration(name, description, config, versions[0].strip())) - # DEPRECATE: 2022q1 - repo.add_alias(Alias(name="blue-pill", destination=":blue-pill-f103", - description="Renamed for clarity.")) - repo.add_alias(Alias(name="black-pill", destination=":black-pill-f103", - description="Renamed for clarity.")) - repo.add_alias(Alias(name="mini-f401", destination=":black-pill-f401", - description="Renamed for clarity.")) - repo.add_alias(Alias(name="mini-f411", destination=":black-pill-f411", - description="Renamed for clarity.")) - # Add Jinja2 filters commonly used in this repository if 'Windows' in platform.platform(): def windowsify(path, escape_level): diff --git a/src/modm/architecture/interface/delay.hpp b/src/modm/architecture/interface/delay.hpp index aa95fa6108..6564304901 100644 --- a/src/modm/architecture/interface/delay.hpp +++ b/src/modm/architecture/interface/delay.hpp @@ -96,17 +96,6 @@ template inline void delay(std::chrono::duration time) { delay(std::chrono::duration_cast(time)); } -// The old methods are deprecated -// DEPRECATE: 2022q1 -[[deprecated("Use `modm::delay_ns(uint32_t ns)` instead!")]] -inline void delayNanoseconds(uint32_t ns) { delay_ns(ns); } - -[[deprecated("Use `modm::delay_us(uint32_t us)` instead!")]] -inline void delayMicroseconds(uint32_t us) { delay_us(us); } - -[[deprecated("Use `modm::delay_ms(uint32_t ms)` instead!")]] -inline void delayMilliseconds(uint32_t ms) { delay_ms(ms); } - using namespace ::std::chrono_literals; } // namespace modm diff --git a/src/modm/architecture/interface/i2c.hpp b/src/modm/architecture/interface/i2c.hpp index 86e73f5f22..46310ed066 100644 --- a/src/modm/architecture/interface/i2c.hpp +++ b/src/modm/architecture/interface/i2c.hpp @@ -112,12 +112,11 @@ struct I2c * * @tparam Scl The clock pin of the bus to be reset. */ - template< class Scl, uint32_t baudrate = 100'000 > + template< class Scl > static void - resetDevices() + resetDevices(uint32_t baudrate = 100'000) { - static_assert(baudrate <= 500'000ul, "I2c::resetDevices() can only do max. 500kHz!"); - constexpr auto delay = 500'000ul / baudrate; + const auto delay = 500'000ul / baudrate; for (uint_fast8_t ii = 0; ii < 9; ++ii) { Scl::reset(); diff --git a/src/modm/architecture/interface/i2c_master.hpp b/src/modm/architecture/interface/i2c_master.hpp index cc2e64b17c..9e76f09522 100644 --- a/src/modm/architecture/interface/i2c_master.hpp +++ b/src/modm/architecture/interface/i2c_master.hpp @@ -81,14 +81,14 @@ class I2cMaster : public ::modm::PeripheralDriver, public ::modm::I2c * * @tparam Signals * One Scl and one Sda signal are required and can be passed out-of-order. - * @tparam reset - * Choose a speed to reset the I2C devices with. Can be disabled with `ResetDevices::NoReset`. * @param pullups * Use external or weak internal pullups. + * @param reset + * Choose a speed to reset the I2C devices with. Can be disabled with `ResetDevices::NoReset`. */ - template< class... Signals, ResetDevices reset = ResetDevices::Standard > + template< class... Signals > static void - connect(PullUps pullups = PullUps::External); + connect(PullUps pullups = PullUps::External, ResetDevices reset = ResetDevices::Standard); /** * Initializes the hardware and sets the datarate. diff --git a/src/modm/board/board.hpp b/src/modm/board/board.hpp index e9564f8eda..7f89fa4cea 100644 --- a/src/modm/board/board.hpp +++ b/src/modm/board/board.hpp @@ -15,8 +15,3 @@ using namespace modm::literals; using namespace std::chrono_literals; #endif - -namespace Board { - // DEPRECATE: 2022q1 - using systemClock [[deprecated("Use `Board::SystemClock` instead!")]] = SystemClock; -} diff --git a/src/modm/board/module.lb b/src/modm/board/module.lb index 29a2e3dc34..2c3876c439 100644 --- a/src/modm/board/module.lb +++ b/src/modm/board/module.lb @@ -18,15 +18,6 @@ def prepare(module, options): # The modm_abandon function uses delay functions module.depends(":architecture:delay", ":architecture:assert") - # Backwards compatible move, DEPRECATE: 2022q1 - module.add_alias(Alias(name="blue-pill", destination="blue-pill-f103", - description="Renamed for clarity.")) - module.add_alias(Alias(name="black-pill", destination="black-pill-f103", - description="Renamed for clarity.")) - module.add_alias(Alias(name="mini-f401", destination="black-pill-f401", - description="Renamed for clarity.")) - module.add_alias(Alias(name="mini-f411", destination="black-pill-f411", - description="Renamed for clarity.")) return True def build(env): diff --git a/src/modm/debug/logger/imp/std.hpp b/src/modm/debug/logger/imp/std.hpp deleted file mode 100644 index b563c74b59..0000000000 --- a/src/modm/debug/logger/imp/std.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) 2009-2010, Martin Rosekeit - * Copyright (c) 2009-2011, Fabian Greif - * Copyright (c) 2012, 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 - -// DEPRECATE: 2022q1 -#warning "Inclusion of 'modm/debug/logger/imp/std.hpp' is deprecated! Only include 'modm/debug/logger.hpp' and remove '.../imp/std.hpp'." diff --git a/src/modm/driver/encoder/bitbang_encoder_output.hpp b/src/modm/driver/encoder/bitbang_encoder_output.hpp index cf455ce4f5..47fe29f650 100644 --- a/src/modm/driver/encoder/bitbang_encoder_output.hpp +++ b/src/modm/driver/encoder/bitbang_encoder_output.hpp @@ -32,10 +32,10 @@ namespace modm * encoder frequencies above 1kHz by a class that offers * time steps less than 1ms, e.g. `modm::PrecisePeriodicTimer`. * @tparam period Timebase for the output signal. This limits the maximal - * frequency of the encoder signal. Defaults to `1`. + * frequency of the encoder signal. Defaults to 1000us (1ms). */ template + class PeriodicTimer = modm::PeriodicTimer, uint32_t period = 1000> class BitBangEncoderOutput { public: diff --git a/src/modm/driver/encoder/bitbang_encoder_output_impl.hpp b/src/modm/driver/encoder/bitbang_encoder_output_impl.hpp index e38b955348..c80a4aa465 100644 --- a/src/modm/driver/encoder/bitbang_encoder_output_impl.hpp +++ b/src/modm/driver/encoder/bitbang_encoder_output_impl.hpp @@ -18,7 +18,7 @@ template modm::BitBangEncoderOutput::BitBangEncoderOutput(PositionType initialValue) - : setpoint(initialValue), actualValue(initialValue), timer(period), state(State::State0) + : setpoint(initialValue), actualValue(initialValue), timer(std::chrono::microseconds{period}), state(State::State0) { SignalA::setOutput(); SignalB::setOutput(); diff --git a/src/modm/math/utils/arithmetic_traits.hpp b/src/modm/math/utils/arithmetic_traits.hpp index b41d735608..bb66b01a9c 100644 --- a/src/modm/math/utils/arithmetic_traits.hpp +++ b/src/modm/math/utils/arithmetic_traits.hpp @@ -5,6 +5,7 @@ * Copyright (c) 2013, 2015, Sascha Schade * Copyright (c) 2015, Kevin Läufer * Copyright (c) 2018, Christopher Durand + * Copyright (c) 2022, Raphael Lehmann * * This file is part of the modm project. * @@ -79,7 +80,7 @@ namespace detail // ------------------------------------------------------------------------ - // implement ArithmeticTraits::WideType + // implement WideType template struct WideType { using type = T; }; @@ -156,54 +157,32 @@ using UnsignedType = typename detail::MakeUnsigned::type; /** * Arithmetic Traits * - * Traits to give numbers more information then they have by - * default in C++ + * Previously, some of the functionalities of and were + * implemented here, when they were not yet available in the C++ standard + * library. Only isInteger and decimalDigits are left, for all others please + * use the C++ standard library in the future. * * @section provides Values provided by these traits * - * - `WideType` Type that can holds the doubled length of data. - * May be used to hold the result of a multiplication. - * - `SignedType` Signed type for the given type. It applies - * `T == SignedType` if `T` is already signed. - * - `UnsignedType Some as SignedType only for unsigned types - * - `min` smallest value. - * - `max` biggest value - * - `isSigned` is this a signed or unsigned type - * - `isFloatingPoint` is this a floating point type * - `isInteger` is this a integer type * - `decimalDigits` count of digits to display this type in decimal * * @section usage Usage * @code - * typedef typename modm::ArithmeticTraits::WideType T_DOUBLE; + * if (modm::ArithmeticTraits::isInteger) + * // ... * - * T min = modm::ArithmeticTraits::min; - * T max = modm::ArithmeticTraits::max; + * constexpr unsigned char digits = modm::ArithmeticTraits::decimalDigits; * @endcode - * - * @author Martin Rosekeit - * @author Fabian Greif - * @author Niklas Hauser - * @author Christopher Durand */ template struct ArithmeticTraits { - // DEPRECATE: 2022q1 - static constexpr bool isFloatingPoint [[deprecated("use std::is_floating_point_v instead!")]] = std::is_floating_point_v; static constexpr bool isInteger = std::is_integral_v && !std::is_same_v, bool>; - using WideType [[deprecated("use modm::WideType instead!")]] = modm::WideType; - using SignedType [[deprecated("use modm::SignedType instead!")]] = modm::SignedType ; - using UnsignedType [[deprecated("use modm::UnsignedType instead!")]] = modm::UnsignedType; - static constexpr unsigned char decimalDigits = std::ceil(std::numeric_limits::digits * log10(2)) + (std::is_signed_v ? 1 : 0); - - static constexpr T min [[deprecated("use std::numeric_limits::min() instead!")]] = std::numeric_limits::min(); - static constexpr T max [[deprecated("use std::numeric_limits::max() instead!")]] = std::numeric_limits::max(); - static constexpr T epsilon [[deprecated("use std::numeric_limits::epsilon() instead!")]] = std::numeric_limits::epsilon(); }; /// @} diff --git a/src/modm/platform/adc/stm32f0/adc.hpp.in b/src/modm/platform/adc/stm32f0/adc.hpp.in index 778014283f..aece0ff1e9 100644 --- a/src/modm/platform/adc/stm32f0/adc.hpp.in +++ b/src/modm/platform/adc/stm32f0/adc.hpp.in @@ -314,14 +314,6 @@ public: static inline void acknowledgeInterruptFlags(InterruptFlag_t flags); - // DEPRECATE: 2022q1 - [[deprecated("Use `acknowledgeInterruptFlags(InterruptFlag_t flags)` instead!")]] - static inline void - acknowledgeInterruptFlag(InterruptFlag_t flags) - { - acknowledgeInterruptFlags(flags); - } - public: static constexpr uint8_t TS_CAL1_TEMP{30}; %% if target.family in ["f0"] diff --git a/src/modm/platform/clock/stm32/rcc.hpp.in b/src/modm/platform/clock/stm32/rcc.hpp.in index cea2de4a83..a3389bcc5e 100644 --- a/src/modm/platform/clock/stm32/rcc.hpp.in +++ b/src/modm/platform/clock/stm32/rcc.hpp.in @@ -593,91 +593,6 @@ public: enablePllSai(const PllSaiFactors& pllFactors, uint32_t waitCycles = 2048); %% endif - // DEPRECATE: 2022q1 -%% if target.family in ["f2", "f4", "f7", "l4", "g0", "g4"] - /** - * Enable PLL. - * - * \code - * VCO input frequency = PLL input clock frequency / PLLM [with 2 <= PLLM <= 63] - * VCO output frequency = VCO input frequency × PLLN [with 64 <= PLLN <= 432] - * \endcode - * - * \param source - * Source select for PLL and for plli2s. If you are using - * HSE you must enable it first (see enableHse()). - * - * \param pllM - * Division factor for the main PLL (PLL) and - * audio PLL (PLLI2S) input clock (with 2 <= pllM <= 63). - * The software has to set these bits correctly to ensure - * that frequency of selected source divided by pllM - * is in ranges from 1 to 2 MHz. - * - * \param pllN - * Main PLL (PLL) multiplication factor for VCO (with 64 <= pllN <= 432). - * The software has to set these bits correctly to ensure - * that the VCO output frequency is - * - 336 MHz for ST32F4. Core will run at 168 MHz. - * - 240 MHz for ST32F2. Core will run at 120 MHz. - * - * Example: - * - */ - [[deprecated("Use PllFactors as argument instead")]] static bool - enablePll(PllSource source, uint8_t pllM, uint16_t pllN, - %% if target.family in ["l4", "g0", "g4"] - uint8_t pllR, - %% else - uint8_t pllP, - %% endif - uint32_t waitCycles = 2048) - { - PllFactors pllFactors{ - .pllM = pllM, - .pllN = pllN, - %% if target.family in ["l4", "g0", "g4"] - .pllR = pllR, - %% else - .pllP = pllP, - %% endif - }; - return enablePll(source, pllFactors, waitCycles); - } -%% elif target.family in ["l1"] - [[deprecated("Use PllFactors as argument instead")]] static bool - enablePll(PllSource source, PllMultiplier pllMul, uint8_t pllDiv, - uint32_t waitCycles = 2048) - { - PllFactors pllFactors{ - .pllMul = pllMul, - .pllDiv = pllDiv, - }; - return enablePll(source, pllFactors, waitCycles); - } -%% elif target.family in ["f0", "f1", "f3"] - [[deprecated("Use PllFactors as argument instead")]] static bool - enablePll(PllSource source, - uint8_t pllMul, - %% if pllprediv2 - uint8_t pllPrediv, uint8_t pllPrediv2, - %% elif pllprediv - uint8_t pllPrediv, - %% endif - uint32_t waitCycles = 2048) - { - PllFactors pllFactors{ - .pllMul = pllMul, - %% if pllprediv2 - .pllPrediv = pllPrediv, - .pllPrediv2 = pllPrediv2, - %% elif pllprediv - .pllPrediv = pllPrediv, - %% endif - }; - return enablePll(source, pllFactors, waitCycles); - } -%% endif %% if target.family == "l0" static inline bool isHsiPredivider4Active() @@ -951,9 +866,6 @@ private: computeFlashLatency(uint32_t Core_Hz, uint16_t Core_mV); }; -// DEPRECATE: 2022q1 -using ClockControl [[deprecated("Please use `modm::platform:Rcc` instead")]] = Rcc; - } // namespace modm::platform diff --git a/src/modm/platform/clock/systick/systick_timer.hpp.in b/src/modm/platform/clock/systick/systick_timer.hpp.in index 4886c5713f..ef4556eaa5 100644 --- a/src/modm/platform/clock/systick/systick_timer.hpp.in +++ b/src/modm/platform/clock/systick/systick_timer.hpp.in @@ -107,11 +107,4 @@ private: } -namespace modm::cortex -{ - // DEPRECATE: 2022q1 - using SysTickTimer [[deprecated("Use `modm::platform:SysTickTimer` instead!")]] = - ::modm::platform::SysTickTimer; -} - #endif // MODM_STM32_CORTEX_TIMER_HPP diff --git a/src/modm/platform/i2c/at90_tiny_mega/i2c_master.hpp.in b/src/modm/platform/i2c/at90_tiny_mega/i2c_master.hpp.in index df548f4e7f..ed8a9b2984 100644 --- a/src/modm/platform/i2c/at90_tiny_mega/i2c_master.hpp.in +++ b/src/modm/platform/i2c/at90_tiny_mega/i2c_master.hpp.in @@ -39,9 +39,9 @@ namespace platform class I2cMaster : public ::modm::I2cMaster, I2c { public: - template< class... Signals, ResetDevices reset = ResetDevices::Standard> + template static void - connect(PullUps pullups = PullUps::External) + connect(PullUps pullups = PullUps::External, ResetDevices reset = ResetDevices::Standard) { using Connector = GpioConnector; using Scl = typename Connector::template GetSignal; @@ -59,7 +59,7 @@ public: SDA::configure(input); SCL::setOutput(); SDA::setOutput(); - if (reset != ResetDevices::NoReset) resetDevices(); + if (reset != ResetDevices::NoReset) resetDevices(uint32_t(reset)); Connector::connect(); } diff --git a/src/modm/platform/i2c/bitbang/bitbang_i2c_master.hpp.in b/src/modm/platform/i2c/bitbang/bitbang_i2c_master.hpp.in index 0e3c4236ef..8ffe496c42 100644 --- a/src/modm/platform/i2c/bitbang/bitbang_i2c_master.hpp.in +++ b/src/modm/platform/i2c/bitbang/bitbang_i2c_master.hpp.in @@ -51,9 +51,9 @@ class BitBangI2cMaster : public modm::I2cMaster public: // start documentation inherited - template< class... Signals, ResetDevices reset = ResetDevices::Standard > + template< class... Signals > static void - connect(PullUps pullups = PullUps::External); + connect(PullUps pullups = PullUps::External, ResetDevices reset = ResetDevices::Standard); /// Initializes the hardware, with the baudrate limited to about 250kbps. template< class SystemClock, baudrate_t baudrate=kHz(100), percent_t tolerance=pct(5) > diff --git a/src/modm/platform/i2c/bitbang/bitbang_i2c_master_impl.hpp b/src/modm/platform/i2c/bitbang/bitbang_i2c_master_impl.hpp index a85c8098f3..0afc434a8c 100644 --- a/src/modm/platform/i2c/bitbang/bitbang_i2c_master_impl.hpp +++ b/src/modm/platform/i2c/bitbang/bitbang_i2c_master_impl.hpp @@ -59,9 +59,9 @@ modm::platform::BitBangI2cMaster::initialize() } template -template< class... Signals, modm::I2cMaster::ResetDevices reset > +template void -modm::platform::BitBangI2cMaster::connect(PullUps pullups) +modm::platform::BitBangI2cMaster::connect(PullUps pullups, ResetDevices reset) { using Connector = GpioConnector; static_assert(sizeof...(Signals) == 2, "BitBangI2cMaster::connect() requires one Scl and one Sda signal!"); @@ -75,7 +75,7 @@ modm::platform::BitBangI2cMaster::connect(PullUps pullups) SDA::configure(input); SCL::setOutput(SCL::OutputType::OpenDrain); SDA::setOutput(SDA::OutputType::OpenDrain); - if constexpr (reset != ResetDevices::NoReset) resetDevices(); + if (reset != ResetDevices::NoReset) resetDevices(uint32_t(reset)); Connector::connect(); } diff --git a/src/modm/platform/i2c/rp/i2c_master.hpp.in b/src/modm/platform/i2c/rp/i2c_master.hpp.in index 0c3d9cf4c9..2899d02a16 100644 --- a/src/modm/platform/i2c/rp/i2c_master.hpp.in +++ b/src/modm/platform/i2c/rp/i2c_master.hpp.in @@ -31,9 +31,9 @@ class I2cMaster{{ id }} : public ::modm::I2cMaster public: static inline i2c_hw_t& hw() { return *i2c{{ id }}_hw; } public: - template + template static void - connect(PullUps pullups = PullUps::External) + connect(PullUps pullups = PullUps::External, ResetDevices reset = ResetDevices::Standard) { using Connector = GpioConnector; using Scl = typename Connector::template GetSignal; @@ -49,7 +49,7 @@ public: Scl::setSlewRate(Gpio::SlewRate::Slow); Sda::configure(input); Sda::setSlewRate(Gpio::SlewRate::Slow); - if (reset != ResetDevices::NoReset) resetDevices(); + if (reset != ResetDevices::NoReset) resetDevices(uint32_t(reset)); Connector::connect(); } diff --git a/src/modm/platform/i2c/stm32-extended/i2c_master.hpp.in b/src/modm/platform/i2c/stm32-extended/i2c_master.hpp.in index 7b84010883..f7aabf4c2f 100644 --- a/src/modm/platform/i2c/stm32-extended/i2c_master.hpp.in +++ b/src/modm/platform/i2c/stm32-extended/i2c_master.hpp.in @@ -67,9 +67,9 @@ private: } public: - template< class... Signals, ResetDevices reset = ResetDevices::Standard> + template static void - connect(PullUps pullups = PullUps::External) + connect(PullUps pullups = PullUps::External, ResetDevices reset = ResetDevices::Standard) { using Connector = GpioConnector; using Scl = typename Connector::template GetSignal; @@ -85,7 +85,7 @@ public: Sda::configure(input); Scl::setOutput(Gpio::OutputType::OpenDrain); Sda::setOutput(Gpio::OutputType::OpenDrain); - if (reset != ResetDevices::NoReset) resetDevices(); + if (reset != ResetDevices::NoReset) resetDevices(uint32_t(reset)); Connector::connect(); } diff --git a/src/modm/platform/i2c/stm32/i2c_master.hpp.in b/src/modm/platform/i2c/stm32/i2c_master.hpp.in index 8673cf19e1..d88a16d510 100644 --- a/src/modm/platform/i2c/stm32/i2c_master.hpp.in +++ b/src/modm/platform/i2c/stm32/i2c_master.hpp.in @@ -40,9 +40,9 @@ public: static constexpr size_t TransactionBufferSize = {{ options["buffer.transaction"] }}; public: - template + template static void - connect(PullUps pullups = PullUps::External) + connect(PullUps pullups = PullUps::External, ResetDevices reset = ResetDevices::Standard) { using Connector = GpioConnector; using Scl = typename Connector::template GetSignal; @@ -58,7 +58,7 @@ public: Sda::configure(input); Scl::setOutput(Gpio::OutputType::OpenDrain); Sda::setOutput(Gpio::OutputType::OpenDrain); - if (reset != ResetDevices::NoReset) resetDevices(); + if (reset != ResetDevices::NoReset) resetDevices(uint32_t(reset)); Connector::connect(); } diff --git a/src/modm/platform/timer/stm32/general_purpose_base.hpp.in b/src/modm/platform/timer/stm32/general_purpose_base.hpp.in index d8bee60a86..3197b8dcd6 100644 --- a/src/modm/platform/timer/stm32/general_purpose_base.hpp.in +++ b/src/modm/platform/timer/stm32/general_purpose_base.hpp.in @@ -116,9 +116,6 @@ public: ForceInactive = TIM_CCMR1_OC1M_2, /// Output is forced high ForceActive = TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_0, - // DEPRECATE: 2022q1 - ForceLow [[deprecated("Use ForceInactive instead.")]] = ForceInactive, - ForceHigh [[deprecated("Use ForceActive instead.")]] = ForceActive, /** * PWM Mode 1. diff --git a/src/modm/processing/timer/periodic_timer.hpp b/src/modm/processing/timer/periodic_timer.hpp index e8f3e9d33b..3417f711c6 100644 --- a/src/modm/processing/timer/periodic_timer.hpp +++ b/src/modm/processing/timer/periodic_timer.hpp @@ -95,9 +95,5 @@ using ShortPrecisePeriodicTimer = GenericPeriodicTimer< PreciseClock, ShortPreci using PrecisePeriodicTimer = GenericPeriodicTimer< PreciseClock, PreciseDuration >; /// @} -/// @cond -// DEPRECATE: 2022q1 -using PeriodicTimerState [[deprecated("Use `modm::TimerState` instead!")]] = TimerState; -/// @endcond } // namespace diff --git a/src/modm/processing/timer/timeout.hpp b/src/modm/processing/timer/timeout.hpp index 3bb0339a2c..5dad5f118a 100644 --- a/src/modm/processing/timer/timeout.hpp +++ b/src/modm/processing/timer/timeout.hpp @@ -108,18 +108,6 @@ class GenericTimeout bool execute(); - /// @cond - // DEPRECATE: 2022q1 - [[deprecated("Use `std::chrono::{milli,micro}seconds` for interval instead!")]] - GenericTimeout(rep interval) : - GenericTimeout(duration(interval)) {} - [[deprecated("Use `std::chrono::{milli,micro}seconds` for interval instead!")]] - void restart(rep interval) - { restart(duration(interval)); } - [[deprecated("Use `Timeout.state()` instead!")]] - TimerState getState() const { return state(); } - /// @endcond - protected: bool checkExpiration() const; @@ -165,10 +153,6 @@ using ShortPreciseTimeout = GenericTimeout< PreciseClock, ShortPreciseDuration > using PreciseTimeout = GenericTimeout< PreciseClock, PreciseDuration >; /// @} -/// @cond -// DEPRECATE: 2022q1 -using TimeoutState [[deprecated("Use `modm::TimerState` instead!")]] = TimerState; -/// @endcond } // namespace modm diff --git a/tools/scripts/authors.py b/tools/scripts/authors.py index 3835d8d848..317d2af00d 100755 --- a/tools/scripts/authors.py +++ b/tools/scripts/authors.py @@ -14,6 +14,7 @@ import subprocess, locale from collections import defaultdict import argparse +import re author_handles = { "Amar": "fb39ca4", @@ -62,6 +63,7 @@ "Pavel Pletenev": "ASMfreaK", "Philipp Graf": "luxarf", "Raphael Lehmann": "rleh", + "Rasmus Kleist": "rasmuskleist", "Sascha Schade": "strongly-typed", "Sebastian Birke": "se-bi", "Sergiy Yevtushenko": "siy", @@ -93,6 +95,20 @@ def get_author_log(since = None, until = None, handles = False, count = False): commits, author = line.split("\t") shortlog[author] += int(commits) + # get co-authors of the commits + co_author_command = "git log --format='%(trailers:key=Co-authored-by)'" + if since is not None: + co_author_command += " --since=\"{}\"".format(since) + if until is not None: + co_author_command += " --until=\"{}\"".format(until) + co_author_command += " | grep -v '^$' | sed -e 's/Co-authored-by: /\t/g' | sort | uniq -c" + output = subprocess.Popen(co_author_command, shell=True, stdout=subprocess.PIPE)\ + .stdout.read().decode(locale.getpreferredencoding()) + for line in output.splitlines(): + commits, author = line.split("\t") + author = re.findall(r"(?P[^<>]+) <.+>", author)[0] + shortlog[author] += int(commits) + # convert to list of tuples for sorting commit_tuples = [(c, a) for a, c in shortlog.items()] if count: