Skip to content

Commit 37227a1

Browse files
committed
Merge branch 'release/v1.0.0'
2 parents f25997b + 5837971 commit 37227a1

File tree

26 files changed

+41833
-0
lines changed

26 files changed

+41833
-0
lines changed

.github/workflows/examples.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Examples
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [ubuntu-16.04, windows-latest, macos-latest]
11+
python-version: [3.7]
12+
example:
13+
- "examples/arduino-blink"
14+
- "examples/arduino-external-libs"
15+
runs-on: ${{ matrix.os }}
16+
steps:
17+
- uses: actions/checkout@v2
18+
with:
19+
submodules: "recursive"
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v1
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -U https://github.com/platformio/platformio/archive/develop.zip
28+
platformio platform install file://.
29+
- name: Build examples
30+
run: |
31+
platformio run -d ${{ matrix.example }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.pyc
2+
.piolibdeps
3+
.pio

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "builder/frameworks/arduino/mbed-core"]
2+
path = builder/frameworks/arduino/mbed-core
3+
url = https://github.com/platformio/builder-framework-arduino-core-mbed.git

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Raspberry Pi RP2040: development platform for [PlatformIO](https://platformio.org)
2+
3+
[![Build Status](https://github.com/platformio/platform-raspberrypi/workflows/Examples/badge.svg)](https://github.com/platformio/platform-raspberrypi/actions)
4+
5+
RP2040 is a low-cost, high-performance microcontroller device with with a large on-chip memory, symmetric dual-core processor complex, deterministic bus fabric, and rich peripheral set augmented with a unique Programmable I/O (PIO) subsystem, it provides professional users with unrivalled power and flexibility.
6+
7+
* [Home](http://platformio.org/platforms/raspberrypi) (home page in PlatformIO Platform Registry)
8+
* [Documentation](http://docs.platformio.org/page/platforms/raspberrypi.html) (advanced usage, packages, boards, frameworks, etc.)
9+
10+
# Usage
11+
12+
1. [Install PlatformIO](http://platformio.org)
13+
2. Create PlatformIO project and configure a platform option in [platformio.ini](http://docs.platformio.org/page/projectconf.html) file:
14+
15+
## Stable version
16+
17+
```ini
18+
[env:stable]
19+
platform = raspberrypi
20+
board = ...
21+
...
22+
```
23+
24+
## Development version
25+
26+
```ini
27+
[env:development]
28+
platform = https://github.com/platformio/platform-raspberrypi.git
29+
board = ...
30+
...
31+
```
32+
33+
# Configuration
34+
35+
Please navigate to [documentation](http://docs.platformio.org/page/platforms/raspberrypi.html).

boards/nanorp2040connect.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"build": {
3+
"core": "arduino",
4+
"cpu": "cortex-m0plus",
5+
"extra_flags": "-D NANO_RP2040_CONNECT -DARDUINO_ARCH_RP2040",
6+
"f_cpu": "133000000L",
7+
"hwids": [
8+
[
9+
"0x2341",
10+
"0x005E"
11+
],
12+
[
13+
"0x2341",
14+
"0x805E"
15+
]
16+
],
17+
"mcu": "rp2040",
18+
"variant": "NANO_RP2040_CONNECT"
19+
},
20+
"debug": {
21+
"jlink_device": "RP2040_M0_0",
22+
"openocd_target": "rp2040.cfg",
23+
"svd_path": "rp2040.svd"
24+
},
25+
"frameworks": [
26+
"arduino"
27+
],
28+
"name": "Arduino Nano RP2040 Connect",
29+
"upload": {
30+
"maximum_ram_size": 270336,
31+
"maximum_size": 2097152,
32+
"require_upload_port": true,
33+
"native_usb": true,
34+
"use_1200bps_touch": true,
35+
"wait_for_upload_port": false,
36+
"protocol": "picotool",
37+
"protocols": [
38+
"cmsis-dap",
39+
"raspberrypi-swd",
40+
"picotool"
41+
]
42+
},
43+
"url": "https://blog.arduino.cc/2021/01/20/welcome-raspberry-pi-to-the-world-of-microcontrollers/",
44+
"vendor": "Arduino"
45+
}

boards/pico.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"build": {
3+
"core": "arduino",
4+
"cpu": "cortex-m0plus",
5+
"extra_flags": "-D RASPBERRY_PI_PICO -DARDUINO_ARCH_RP2040",
6+
"f_cpu": "133000000L",
7+
"hwids": [
8+
[
9+
"0x2E8A",
10+
"0x00C0"
11+
]
12+
],
13+
"mcu": "rp2040",
14+
"variant": "RASPBERRY_PI_PICO"
15+
},
16+
"debug": {
17+
"jlink_device": "RP2040_M0_0",
18+
"openocd_target": "rp2040.cfg",
19+
"svd_path": "rp2040.svd"
20+
},
21+
"frameworks": [
22+
"arduino"
23+
],
24+
"name": "Raspberry Pi Pico",
25+
"upload": {
26+
"maximum_ram_size": 270336,
27+
"maximum_size": 2097152,
28+
"require_upload_port": true,
29+
"native_usb": true,
30+
"use_1200bps_touch": true,
31+
"wait_for_upload_port": false,
32+
"protocol": "picotool",
33+
"protocols": [
34+
"cmsis-dap",
35+
"raspberrypi-swd",
36+
"picotool"
37+
]
38+
},
39+
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
40+
"vendor": "Raspberry Pi"
41+
}

builder/frameworks/_bare.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Copyright 2014-present PlatformIO <[email protected]>
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
#
16+
# Default flags for bare-metal programming (without any framework layers)
17+
#
18+
19+
from SCons.Script import DefaultEnvironment
20+
21+
env = DefaultEnvironment()
22+
23+
env.Append(
24+
ASFLAGS=["-x", "assembler-with-cpp"],
25+
26+
CCFLAGS=[
27+
"-Os", # optimize for size
28+
"-ffunction-sections", # place each function in its own section
29+
"-fdata-sections",
30+
"-Wall",
31+
"-mthumb",
32+
"-nostdlib"
33+
],
34+
35+
CXXFLAGS=[
36+
"-fno-rtti",
37+
"-fno-exceptions"
38+
],
39+
40+
CPPDEFINES=[
41+
("F_CPU", "$BOARD_F_CPU")
42+
],
43+
44+
LINKFLAGS=[
45+
"-Os",
46+
"-Wl,--gc-sections,--relax",
47+
"-mthumb",
48+
"--specs=nano.specs",
49+
"--specs=nosys.specs"
50+
],
51+
52+
LIBS=["c", "gcc", "m", "stdc++", "nosys"]
53+
)
54+
55+
if "BOARD" in env:
56+
env.Append(
57+
CCFLAGS=[
58+
"-mcpu=%s" % env.BoardConfig().get("build.cpu")
59+
],
60+
LINKFLAGS=[
61+
"-mcpu=%s" % env.BoardConfig().get("build.cpu")
62+
]
63+
)
64+
65+
# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
66+
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])
Submodule mbed-core added at ceb4f60

0 commit comments

Comments
 (0)