Skip to content

Commit

Permalink
Add support for RP2040 and RP-PICO
Browse files Browse the repository at this point in the history
  • Loading branch information
salkinium committed Jan 24, 2022
2 parents d017602 + 65ac60a commit 1c9c0b6
Show file tree
Hide file tree
Showing 91 changed files with 5,551 additions and 162 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ jobs:
if: always()
run: |
(cd examples && ../tools/scripts/examples_compile.py samv)
- name: Examples RP20 Devices
if: always()
run: |
(cd examples && ../tools/scripts/examples_compile.py rp_pico)
- name: Execute Python Scripts
if: always()
run: |
Expand Down Expand Up @@ -225,7 +229,7 @@ jobs:
- name: Quick compile HAL for Cortex-M Part 1
if: always()
run: |
(cd test/all && python3 run_all.py stm32 sam --quick --split 4 --part 0)
(cd test/all && python3 run_all.py stm32 sam rp --quick --split 4 --part 0)
- name: Upload log artifacts
uses: actions/upload-artifact@v2
with:
Expand All @@ -245,7 +249,7 @@ jobs:
- name: Quick compile HAL for Cortex-M Part 2
if: always()
run: |
(cd test/all && python3 run_all.py stm32 sam --quick --split 4 --part 1)
(cd test/all && python3 run_all.py stm32 sam rp --quick --split 4 --part 1)
- name: Upload log artifacts
uses: actions/upload-artifact@v2
with:
Expand All @@ -265,7 +269,7 @@ jobs:
- name: Quick compile HAL for Cortex-M Part 3
if: always()
run: |
(cd test/all && python3 run_all.py stm32 sam --quick --split 4 --part 2)
(cd test/all && python3 run_all.py stm32 sam rp --quick --split 4 --part 2)
- name: Upload log artifacts
uses: actions/upload-artifact@v2
with:
Expand All @@ -285,7 +289,7 @@ jobs:
- name: Quick compile HAL for Cortex-M Part 4
if: always()
run: |
(cd test/all && python3 run_all.py stm32 sam --quick --split 4 --part 3)
(cd test/all && python3 run_all.py stm32 sam rp --quick --split 4 --part 3)
- name: Upload log artifacts
uses: actions/upload-artifact@v2
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@
[submodule "ext/etlcpp/etl"]
path = ext/etlcpp/etl
url = https://github.com/modm-ext/etl-partial.git
[submodule "ext/rp/pico-sdk"]
path = ext/rp/pico-sdk
url = https://github.com/modm-ext/pico-sdk-partial.git
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<th align="center"></th>
<th align="center" colspan="13">STM32</th>
<th align="center" colspan="3">SAM</th>
<th align="center" colspan="1">RP</th>
<th align="center" colspan="3">AT</th>
</tr><tr>
<th align="left">Peripheral</th>
Expand All @@ -120,6 +121,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<th align="center">D21</th>
<th align="center">G55</th>
<th align="center">V70</th>
<th align="center">20</th>
<th align="center">90</th>
<th align="center">Mega</th>
<th align="center">Tiny</th>
Expand All @@ -142,6 +144,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>
</tr><tr>
Expand All @@ -162,6 +165,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 @@ -183,6 +187,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 @@ -205,6 +210,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>
</tr><tr>
Expand All @@ -225,6 +231,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 @@ -249,6 +256,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 @@ -267,6 +275,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 @@ -288,6 +297,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 @@ -312,6 +322,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 @@ -330,6 +341,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 @@ -354,6 +366,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">Random Generator</td>
<td align="center">✕</td>
Expand All @@ -375,6 +388,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">SPI</td>
<td align="center">✅</td>
Expand All @@ -396,6 +410,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">System Clock</td>
<td align="center">✅</td>
Expand All @@ -412,8 +427,9 @@ 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>
<td align="center">✅</td>
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">✕</td>
Expand All @@ -438,6 +454,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">UART</td>
<td align="center">✅</td>
Expand All @@ -458,6 +475,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 @@ -480,6 +498,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">USB</td>
<td align="center">✅</td>
Expand All @@ -498,6 +517,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 @@ -585,13 +605,15 @@ 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-l552ze-q">NUCLEO-L552ZE-Q</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-rp-pico">RP-PICO</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-samg55-xplained-pro">SAMG55-XPLAINED-PRO</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-samg55-xplained-pro">SAMG55-XPLAINED-PRO</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>
<td align="center"><a href="https://modm.io/reference/module/modm-board-srxe">Smart Response XE</a></td>
</tr><tr>
</tr>
</table>
<!--/bsptable-->
Expand Down
1 change: 1 addition & 0 deletions examples/generic/delay/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<!-- <extends>modm:nucleo-l432kc</extends> -->
<!-- <extends>modm:nucleo-l476rg</extends> -->
<!-- <extends>modm:samd21-mini</extends> -->
<!-- <extends>modm:rp-pico</extends> -->
<options>
<option name="modm:build:build.path">../../../build/generic/delay</option>
<option name="modm:io:with_printf">true</option>
Expand Down
1 change: 1 addition & 0 deletions examples/generic/usb/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<!-- <extends>modm:disco-f303vc</extends> -->
<!-- <extends>modm:disco-f407vg</extends> -->
<!-- <extends>modm:disco-f746ng</extends> -->
<!-- <extends>modm:rp-pico</extends> -->
<options>
<option name="modm:build:build.path">../../../build/generic/usb</option>
<option name="modm:build:openocd.cfg">openocd.cfg</option>
Expand Down
39 changes: 39 additions & 0 deletions examples/rp_pico/blink/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2016, Sascha Schade
* Copyright (c) 2017, Niklas Hauser
*
* This file is part of the modm project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// ----------------------------------------------------------------------------

#include <modm/board.hpp>

using namespace Board;

/*
* Blinks the green user LED with 1 Hz.
* It is on for 90% of the time and off for 10% of the time.
*/

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

LedGreen::setOutput();

while (true)
{
LedGreen::set();
modm::delay(900ms);

LedGreen::reset();
modm::delay(100ms);
}

return 0;
}
10 changes: 10 additions & 0 deletions examples/rp_pico/blink/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<library>
<extends>modm:rp-pico</extends>
<options>
<option name="modm:build:build.path">../../../build/rp_pico/blink</option>
<option name="modm:platform:cortex-m:vector_table_location">ram</option>
</options>
<modules>
<module>modm:build:scons</module>
</modules>
</library>
Loading

0 comments on commit 1c9c0b6

Please sign in to comment.