Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 44 additions & 1 deletion .github/workflows/compile-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ jobs:
- name: Checkout code and update modm tools
run: |
(git submodule sync && git submodule update --init --jobs 8) & pip3 install --upgrade --upgrade-strategy=eager modm & wait
- name: Compile HAL for all STM32F7 Part 1
- name: Compile HAL for all STM32F7 Part 2
run: |
(cd test/all && python3 run_all.py stm32f7 --quick-remaining --split 2 --part 1)
- name: Upload log artifacts
Expand All @@ -236,6 +236,49 @@ jobs:
name: stm32f7-compile-all-2
path: test/all/log

stm32l0-compile-all-1:
if: github.event.label.name == 'ci:hal'
runs-on: ubuntu-20.04
container:
image: ghcr.io/modm-ext/modm-build-cortex-m:latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Checkout code and update modm tools
run: |
(git submodule sync && git submodule update --init --jobs 8) & pip3 install --upgrade --upgrade-strategy=eager modm & wait
- name: Compile HAL for all STM32L0 Part 1
run: |
(cd test/all && python3 run_all.py stm32l0 --quick-remaining --split 2 --part 0)
- name: Upload log artifacts
if: always()
uses: actions/upload-artifact@v2
with:
name: stm32l0-compile-all-1
path: test/all/log

stm32l0-compile-all-2:
if: github.event.label.name == 'ci:hal'
runs-on: ubuntu-20.04
container:
image: ghcr.io/modm-ext/modm-build-cortex-m:latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Checkout code and update modm tools
run: |
(git submodule sync && git submodule update --init --jobs 8) & pip3 install --upgrade --upgrade-strategy=eager modm & wait
- name: Compile HAL for all STM32L0 Part 2
run: |
(cd test/all && python3 run_all.py stm32l0 --quick-remaining --split 2 --part 1)
- name: Upload log artifacts
if: always()
uses: actions/upload-artifact@v2
with:
name: stm32l0-compile-all-2
path: test/all/log


stm32l1-compile-all:
if: github.event.label.name == 'ci:hal'
runs-on: ubuntu-20.04
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ jobs:
if: always()
run: |
(cd examples && ../tools/scripts/examples_compile.py nucleo_g071rb)
- name: Examples STM32L0 Series
if: always()
run: |
(cd examples && ../tools/scripts/examples_compile.py nucleo_l031k6)
- name: Examples STM32L1 Series
if: always()
run: |
Expand Down Expand Up @@ -280,7 +284,7 @@ jobs:
uses: actions/checkout@v2
- name: Update submodules and install lbuild
run: |
(git submodule sync && git submodule update --init --jobs 8) & pip3 --upgrade --upgrade-strategy=eager modm & wait
(git submodule sync && git submodule update --init --jobs 8) & pip3 install --upgrade --upgrade-strategy=eager modm & wait
- name: Test run of docs.modm.io-generator-script
if: always()
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Compile STM32 Examples
run: |
(cd examples && ../tools/scripts/examples_compile.py nucleo_f031k6 nucleo_f103rb nucleo_f303re nucleo_f411re nucleo_f746zg)
(cd examples && ../tools/scripts/examples_compile.py nucleo_g071rb nucleo_l152re nucleo_l476rg nucleo_g474re)
(cd examples && ../tools/scripts/examples_compile.py nucleo_g071rb nucleo_l031k6 nucleo_l152re nucleo_l476rg nucleo_g474re)

- name: Compile AVR Examples
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_armcortexm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
shell: bash
run: |
(cd examples && python ../tools/scripts/examples_compile.py nucleo_f031k6 nucleo_f103rb nucleo_f303re nucleo_f411re nucleo_f746zg)
(cd examples && python ../tools/scripts/examples_compile.py nucleo_g071rb nucleo_l152re nucleo_l476rg nucleo_g474re)
(cd examples && python ../tools/scripts/examples_compile.py nucleo_g071rb nucleo_l031k6 nucleo_l152re nucleo_l476rg nucleo_g474re)

# - name: Compile AVR Examples
# shell: bash
Expand Down
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ git clone --recurse-submodules --jobs 8 https://github.com/modm-io/modm.git

## Microcontrollers

modm can create a HAL for <!--allcount-->2679<!--/allcount--> devices of these vendors:
modm can create a HAL for <!--allcount-->3107<!--/allcount--> devices of these vendors:

- STMicroelectronics STM32: <!--stmcount-->2010<!--/stmcount--> devices.
- STMicroelectronics STM32: <!--stmcount-->2438<!--/stmcount--> devices.
- Microchip SAM: <!--samcount-->163<!--/samcount--> devices.
- Microchip AVR: <!--avrcount-->506<!--/avrcount--> devices.

Expand All @@ -95,7 +95,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<table>
<tr>
<th align="center"></th>
<th align="center" colspan="10">STM32</th>
<th align="center" colspan="11">STM32</th>
<th align="center" colspan="1">SAM</th>
<th align="center" colspan="3">AT</th>
</tr><tr>
Expand All @@ -108,6 +108,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<th align="center">F7</th>
<th align="center">G0</th>
<th align="center">G4</th>
<th align="center">L0</th>
<th align="center">L1</th>
<th align="center">L4</th>
<th align="center">D21</th>
Expand All @@ -124,6 +125,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">○</td>
Expand All @@ -141,6 +143,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✗</td>
<td align="center">○</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✅</td>
<td align="center">✗</td>
<td align="center">○</td>
Expand All @@ -157,6 +160,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">○</td>
Expand All @@ -175,6 +179,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✗</td>
<td align="center">○</td>
<td align="center">✗</td>
Expand All @@ -189,6 +194,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">✗</td>
Expand All @@ -210,6 +216,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
</tr><tr>
<td align="left">External Interrupt</td>
<td align="center">✅</td>
Expand All @@ -226,6 +233,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
</tr><tr>
<td align="left">External Memory</td>
<td align="center">✗</td>
Expand All @@ -237,6 +245,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✗</td>
<td align="center">○</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">○</td>
<td align="center">✗</td>
<td align="center">✗</td>
Expand All @@ -258,6 +267,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
</tr><tr>
<td align="left">I<sup>2</sup>C</td>
<td align="center">✅</td>
Expand All @@ -270,6 +280,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">✅</td>
Expand All @@ -287,6 +298,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
Expand All @@ -300,6 +312,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✗</td>
<td align="center">✅</td>
<td align="center">✗</td>
Expand All @@ -318,6 +331,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">✅</td>
Expand All @@ -335,6 +349,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
Expand All @@ -350,6 +365,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
Expand All @@ -369,6 +385,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">○</td>
</tr><tr>
<td align="left">Unique ID</td>
Expand All @@ -382,6 +399,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
Expand All @@ -399,6 +417,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
Expand Down Expand Up @@ -468,18 +487,19 @@ We have out-of-box support for many development boards including documentation.
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-g431kb">NUCLEO-G431KB</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-g431rb">NUCLEO-G431RB</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-g474re">NUCLEO-G474RE</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-l152re">NUCLEO-L152RE</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-l031k6">NUCLEO-L031K6</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-l152re">NUCLEO-L152RE</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-l432kc">NUCLEO-L432KC</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-l452re">NUCLEO-L452RE</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-l476rg">NUCLEO-L476RG</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-olimexino-stm32">OLIMEXINO-STM32</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-olimexino-stm32">OLIMEXINO-STM32</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-raspberrypi">Raspberry Pi</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-samd21-mini">SAMD21-MINI</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-stm32_f4ve">STM32-F4VE</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-stm32f030_demo">STM32F030-DEMO</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-stm32f030_demo">STM32F030-DEMO</a></td>
</tr>
</table>
<!--/bsptable-->
Expand Down
40 changes: 40 additions & 0 deletions examples/nucleo_l031k6/blink/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright (c) 2016-2017, Niklas Hauser
* Copyright (c) 2017, Nick Sarten
*
* This file is part of the modm project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#include <modm/board.hpp>

using namespace Board;

int
main()
{
Board::initialize();
LedD13::setOutput();

// Use the logging streams to print some messages.
// Change MODM_LOG_LEVEL above to enable or disable these messages
MODM_LOG_DEBUG << "debug" << modm::endl;
MODM_LOG_INFO << "info" << modm::endl;
MODM_LOG_WARNING << "warning" << modm::endl;
MODM_LOG_ERROR << "error" << modm::endl;

uint32_t counter(0);

while (true)
{
LedD13::toggle();
modm::delay(Button::read() ? 100ms : 500ms);

MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
}

return 0;
}
9 changes: 9 additions & 0 deletions examples/nucleo_l031k6/blink/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<library>
<extends>modm:nucleo-l031k6</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_l031k6/blink</option>
</options>
<modules>
<module>modm:build:scons</module>
</modules>
</library>
2 changes: 1 addition & 1 deletion ext/modm-devices
Submodule modm-devices updated 61 files
+6 −6 README.md
+3 −0 devices/stm32/stm32f4-12.xml
+2 −2 devices/stm32/stm32f7-22_23_32_33.xml
+1 −1 devices/stm32/stm32f7-30_50.xml
+4 −2 devices/stm32/stm32f7-45_46_56.xml
+5 −5 devices/stm32/stm32f7-65_67_68_69_77_78_79.xml
+1 −1 devices/stm32/stm32g0-30.xml
+11 −1 devices/stm32/stm32g0-31_41.xml
+83 −224 devices/stm32/stm32g0-50.xml
+937 −0 devices/stm32/stm32g0-51_61.xml
+1,228 −0 devices/stm32/stm32g0-70_b0.xml
+12 −2 devices/stm32/stm32g0-71_81.xml
+2,173 −0 devices/stm32/stm32g0-b1_c1.xml
+1 −1 devices/stm32/stm32g4-31_41.xml
+37 −50 devices/stm32/stm32g4-71_91_a1.xml
+7 −1 devices/stm32/stm32g4-73_83.xml
+1 −1 devices/stm32/stm32g4-74_84.xml
+2 −2 devices/stm32/stm32h7-23_33.xml
+424 −60 devices/stm32/stm32h7-25_35.xml
+1 −1 devices/stm32/stm32h7-30.xml
+3 −2 devices/stm32/stm32h7-42.xml
+3 −3 devices/stm32/stm32h7-43_53.xml
+2 −2 devices/stm32/stm32h7-45_55.xml
+2 −2 devices/stm32/stm32h7-47_57.xml
+2 −2 devices/stm32/stm32h7-50.xml
+22 −71 devices/stm32/stm32h7-a3.xml
+21 −47 devices/stm32/stm32h7-b0.xml
+21 −70 devices/stm32/stm32h7-b3.xml
+6 −9 devices/stm32/stm32l0-10.xml
+2 −1 devices/stm32/stm32l0-11_21.xml
+7 −11 devices/stm32/stm32l0-31_41.xml
+10 −3 devices/stm32/stm32l0-51_52_53_62_63.xml
+63 −25 devices/stm32/stm32l0-71_72_73_81_82_83.xml
+1 −6 devices/stm32/stm32l1-51_52_62-c_d_e.xml
+33 −21 devices/stm32/stm32l4-12_22.xml
+4 −2 devices/stm32/stm32l4-31_33_43.xml
+52 −1 devices/stm32/stm32l4-51_71.xml
+57 −1 devices/stm32/stm32l4-52_62.xml
+2 −0 devices/stm32/stm32l4-76_86.xml
+43 −72 devices/stm32/stm32l4-96_a6.xml
+30 −38 devices/stm32/stm32l4-p5.xml
+375 −146 devices/stm32/stm32l4-q5.xml
+161 −106 devices/stm32/stm32l4-s5_s7_s9.xml
+552 −0 devices/stm32/stm32wb-10_15.xml
+37 −34 devices/stm32/stm32wb-30_50.xml
+107 −54 devices/stm32/stm32wb-35_55.xml
+785 −0 devices/stm32/stm32wl-54_55.xml
+817 −0 devices/stm32/stm32wl-e4_e5.xml
+1 −1 modm_devices/__init__.py
+1 −1 tools/generator/Makefile
+3 −0 tools/generator/dfg/avr/avr_device_tree.py
+1 −2 tools/generator/dfg/avr/avr_identifier.py
+32 −5 tools/generator/dfg/stm32/stm.py
+22 −1 tools/generator/dfg/stm32/stm_groups.py
+5 −0 tools/generator/dfg/stm32/stm_peripherals.py
+26 −31 tools/generator/raw-data-extractor/extract-stm32.py
+0 −38 tools/generator/raw-data-extractor/izpack/Blockable.java
+0 −91 tools/generator/raw-data-extractor/izpack/IzPackDeserializer.java
+0 −59 tools/generator/raw-data-extractor/izpack/OsModel.java
+0 −41 tools/generator/raw-data-extractor/izpack/OverrideType.java
+0 −113 tools/generator/raw-data-extractor/izpack/PackFile.java
25 changes: 25 additions & 0 deletions ext/st/device.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,31 @@
#include <{{ header }}>
%% endfor

%% if target.family in ["g0"]
// these defines are missing from the STM32G0 header files
#define RCC_CFGR_SW_HSI (0UL) /*!< HSI selected as system clock */
#define RCC_CFGR_SW_HSE (0x00000001UL) /*!< HSE selected as system clock */
#define RCC_CFGR_SW_PLL (0x00000002UL) /*!< PLL selected as system clock */
#define RCC_CFGR_SW_LSI (0x00000003UL) /*!< LSI selected as system clock */
#define RCC_CFGR_SW_LSE (0x00000004UL) /*!< LSE selected as system clock */

#define RCC_CFGR_HPRE_DIV1 (0x0UL) /*!< SYSCLK not divided */
#define RCC_CFGR_HPRE_DIV2 (0x00000800UL) /*!< SYSCLK divided by 2 */
#define RCC_CFGR_HPRE_DIV4 (0x00000900UL) /*!< SYSCLK divided by 4 */
#define RCC_CFGR_HPRE_DIV8 (0x00000A00UL) /*!< SYSCLK divided by 8 */
#define RCC_CFGR_HPRE_DIV16 (0x00000B00UL) /*!< SYSCLK divided by 16 */
#define RCC_CFGR_HPRE_DIV64 (0x00000C00UL) /*!< SYSCLK divided by 64 */
#define RCC_CFGR_HPRE_DIV128 (0x00000D00UL) /*!< SYSCLK divided by 128 */
#define RCC_CFGR_HPRE_DIV256 (0x00000E00UL) /*!< SYSCLK divided by 256 */
#define RCC_CFGR_HPRE_DIV512 (0x00000F00UL) /*!< SYSCLK divided by 512 */

#define RCC_CFGR_PPRE_DIV1 (0x0UL) /*!< HCLK not divided */
#define RCC_CFGR_PPRE_DIV2 (0x00004000UL) /*!< HCLK divided by 2 */
#define RCC_CFGR_PPRE_DIV4 (0x00005000UL) /*!< HCLK divided by 4 */
#define RCC_CFGR_PPRE_DIV8 (0x00006000UL) /*!< HCLK divided by 8 */
#define RCC_CFGR_PPRE_DIV16 (0x00007000UL) /*!< HCLK divided by 16 */
%% endif

/// @cond
// This is a hack to make the *_Typedef's known to GDB, so that you can debug
// the peripherals directly in GDB in any context.
Expand Down
1 change: 1 addition & 0 deletions ext/st/module.lb
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def build(env):
env.substitutions.update({
"headers": [bprops["device_header"], bprops["system_header"]],
"defines": [bprops["define"]],
"target": env[":target"].identifier,
})
env.outbasepath = "modm/src/modm/platform"
env.template("device.hpp.in")
2 changes: 1 addition & 1 deletion ext/st/stm32
Submodule stm32 updated 175 files
2 changes: 1 addition & 1 deletion repo.lb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class DevicesCache(dict):
# roughly filter to supported devices
supported = ["stm32f0", "stm32f1", "stm32f2", "stm32f3", "stm32f4", "stm32f7",
"stm32g0", "stm32g4",
"stm32l1", "stm32l4",
"stm32l0", "stm32l1", "stm32l4",
"at90", "attiny", "atmega",
"samd21",
"hosted"]
Expand Down
Loading