diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 57659fb3dc..639682ecef 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -76,6 +76,10 @@ jobs: if: always() run: | (cd examples && ../tools/scripts/examples_compile.py samg55_xplained_pro) + - name: Examples SAMV Devices + if: always() + run: | + (cd examples && ../tools/scripts/examples_compile.py samv) - name: Execute Python Scripts if: always() run: | diff --git a/README.md b/README.md index 59191c0e00..568d11c3f4 100644 --- a/README.md +++ b/README.md @@ -74,10 +74,10 @@ git clone --recurse-submodules --jobs 8 https://github.com/modm-io/modm.git ## Microcontrollers -modm can create a HAL for 3175 devices of these vendors: +modm can create a HAL for 3195 devices of these vendors: - STMicroelectronics STM32: 2621 devices. -- Microchip SAM: 166 devices. +- Microchip SAM: 186 devices. - Microchip AVR: 388 devices. Here is a table with all device families and the peripheral drivers they support: @@ -96,7 +96,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. STM32 -SAM +SAM AT Peripheral @@ -114,6 +114,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. L4 D21 G +V 90 Mega Tiny @@ -134,6 +135,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ○ ○ ○ +○ ✅ ✅ @@ -154,6 +156,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ✗ ○ ○ +○ ✗ Comparator @@ -174,6 +177,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ○ ○ ○ +○ DAC ✅ @@ -190,6 +194,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ✅ ○ ✗ +○ ✗ ○ ✗ @@ -209,6 +214,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ✅ ○ ✗ +○ ✗ ✗ ✗ @@ -231,6 +237,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ✗ ✗ ✗ +✗ External Interrupt ✅ @@ -250,6 +257,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ✅ ✅ ✅ +✅ External Memory ✗ @@ -266,6 +274,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ○ ✗ ✗ +○ ✗ ✗ ✗ @@ -288,6 +297,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ✅ ✅ ✅ +✅ I2C ✅ @@ -304,6 +314,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ✅ ○ ○ +○ ✅ ✅ ✅ @@ -322,7 +333,8 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ○ ○ ○ -✗ +○ +○ ✗ ✗ ✗ @@ -342,6 +354,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ✅ ✗ ✗ +○ ✗ ✗ ✗ @@ -361,6 +374,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ✅ ○ ✅ +○ ✅ ✅ ✅ @@ -383,6 +397,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ✗ ✗ ✗ +✗ Timer ✅ @@ -402,6 +417,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ○ ○ ○ +○ UART ✅ @@ -418,6 +434,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ✅ ✅ ○ +○ ✅ ✅ ○ @@ -440,6 +457,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ✗ ✗ ✗ +✗ USB ✅ @@ -456,6 +474,7 @@ Please [discover modm's peripheral drivers for your specific device][discover]. ✅ ✅ ✅ +○ ✗ ✗ ✗ diff --git a/examples/samv/blink/main.cpp b/examples/samv/blink/main.cpp new file mode 100644 index 0000000000..9ff38298bf --- /dev/null +++ b/examples/samv/blink/main.cpp @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2021, Tomasz Wasilczyk + * + * This file is part of the modm project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include + +int +main() +{ +#if 0 + while (1) + { + Led::toggle(); + modm::delay(500ms); + } +#endif + + return 0; +} diff --git a/examples/samv/blink/project.xml b/examples/samv/blink/project.xml new file mode 100644 index 0000000000..dbd765bb4a --- /dev/null +++ b/examples/samv/blink/project.xml @@ -0,0 +1,11 @@ + + + + + + + modm:build:scons + modm:platform:core + modm:platform:clock + + diff --git a/ext/microchip/sam b/ext/microchip/sam index 4876890d97..7a635b8d4c 160000 --- a/ext/microchip/sam +++ b/ext/microchip/sam @@ -1 +1 @@ -Subproject commit 4876890d97a22deb9273bb91169e74364b66ee3b +Subproject commit 7a635b8d4ccfd8d31bade7973cef985535a759a0 diff --git a/ext/modm-devices b/ext/modm-devices index 56f0ccaa90..8faefcb7c3 160000 --- a/ext/modm-devices +++ b/ext/modm-devices @@ -1 +1 @@ -Subproject commit 56f0ccaa902ad695958b01ce470fd008c0a3b18b +Subproject commit 8faefcb7c36c6fc50d881252c6f8e28376836d65 diff --git a/repo.lb b/repo.lb index c9850f5a3d..e8e5c86abc 100644 --- a/repo.lb +++ b/repo.lb @@ -86,8 +86,7 @@ class DevicesCache(dict): "stm32h7", "stm32l0", "stm32l1", "stm32l4", "at90", "attiny", "atmega", - "samd21", - "samg55", + "samd21", "samg55", "samv70", "hosted"] device_file_names = [dfn for dfn in device_file_names if any(s in dfn for s in supported)] # These files are ignored due to various issues diff --git a/tools/scripts/generate_hal_matrix.py b/tools/scripts/generate_hal_matrix.py index b153c76d07..454d84df34 100755 --- a/tools/scripts/generate_hal_matrix.py +++ b/tools/scripts/generate_hal_matrix.py @@ -116,16 +116,20 @@ def hal_get_modules(): all_targets[target] = (drivers, modules) # Some information cannot be extracted from the module.lb files + mapping["ADC"].add("afec") + mapping["DAC"].add("dacc") + mapping["Ethernet"].add("gmac") + mapping["Random Generator"].add("trng") mapping["UART"].update({"usi", "sercom"}) mapping["Timer"].update({"tc", "tcc"}) mapping["SPI"].add("sercom") - mapping["I2C"].add("sercom") - mapping["USB"].add("usb") - mapping["CAN"].add("fdcan") - mapping["DMA"].add("dmac") - mapping["Comparator"].add("ac") - mapping["Internal Flash"].add("nvmctrl") - mapping["External Memory"].add("quadspi") + mapping["I2C"].update({"sercom", "twihs"}) + mapping["USB"].update({"usb", "usbhs"}) + mapping["CAN"].update({"fdcan", "mcan"}) + mapping["DMA"].update({"dmac", "xdmac"}) + mapping["Comparator"].update({"ac", "acc"}) + mapping["Internal Flash"].update({"efc", "nvmctrl"}) + mapping["External Memory"].update({"sdramc", "smc", "quadspi"}) print(); print() return (all_targets, mapping)