Skip to content

Commit

Permalink
Merge branch 'release/v8.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed May 30, 2022
2 parents 293007a + 491af82 commit 0ebb3bc
Show file tree
Hide file tree
Showing 87 changed files with 109 additions and 2,133 deletions.
24 changes: 7 additions & 17 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,29 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, windows-latest, macos-latest]
python-version: [3.7]
os: [ubuntu-latest, windows-latest, macos-latest]
example:
- "examples/arduino-blink"
- "examples/arduino-briki-internal-libs"
- "examples/arduino-external-libs"
- "examples/arduino-internal-libs"
- "examples/arduino-web-thing-led"
- "examples/mbed-blink"
- "examples/mbed-dsp"
- "examples/mbed-serial"
- "examples/simba-blink"
- "examples/zephyr-blink"
- "examples/zephyr-drivers-lcd-hd44780"
- "examples/zephyr-subsys-logger"
exclude:
- {python-version: 2.7, example: "examples/zephyr-blink"}
- {python-version: 2.7, example: "examples/zephyr-drivers-lcd-hd44780"}
- {python-version: 2.7, example: "examples/zephyr-subsys-logger"}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U https://github.com/platformio/platformio/archive/develop.zip
platformio platform install file://.
pio pkg install --global --platform symlink://.
- name: Build examples
run: |
platformio run -d ${{ matrix.example }}
pio run -d ${{ matrix.example }}
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "builder/frameworks/mbed"]
path = builder/frameworks/mbed
url=https://github.com/platformio/builder-framework-mbed.git
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Atmel SAM: development platform for [PlatformIO](http://platformio.org)
# Atmel SAM: development platform for [PlatformIO](https://platformio.org)

[![Build Status](https://github.com/platformio/platform-atmelsam/workflows/Examples/badge.svg)](https://github.com/platformio/platform-atmelsam/actions)

Atmel | SMART offers Flash- based ARM products based on the ARM Cortex-M0+, Cortex-M3 and Cortex-M4 architectures, ranging from 8KB to 2MB of Flash including a rich peripheral and feature mix.

* [Home](http://platformio.org/platforms/atmelsam) (home page in PlatformIO Platform Registry)
* [Documentation](http://docs.platformio.org/page/platforms/atmelsam.html) (advanced usage, packages, boards, frameworks, etc.)
* [Home](https://registry.platformio.org/platforms/platformio/atmelsam) (home page in the PlatformIO Registry)
* [Documentation](https://docs.platformio.org/page/platforms/atmelsam.html) (advanced usage, packages, boards, frameworks, etc.)

# Usage

1. [Install PlatformIO](http://platformio.org)
2. Create PlatformIO project and configure a platform option in [platformio.ini](http://docs.platformio.org/page/projectconf.html) file:
1. [Install PlatformIO](https://platformio.org)
2. Create PlatformIO project and configure a platform option in [platformio.ini](https://docs.platformio.org/page/projectconf.html) file:

## Stable version

Expand All @@ -32,4 +32,4 @@ board = ...

# Configuration

Please navigate to [documentation](http://docs.platformio.org/page/platforms/atmelsam.html).
Please navigate to [documentation](https://docs.platformio.org/page/platforms/atmelsam.html).
1 change: 0 additions & 1 deletion boards/due.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
},
"frameworks": [
"arduino",
"simba",
"zephyr"
],
"name": "Arduino Due (Programming Port)",
Expand Down
3 changes: 1 addition & 2 deletions boards/dueUSB.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
"svd_path": "ATSAM3X8E.svd"
},
"frameworks": [
"arduino",
"simba"
"arduino"
],
"name": "Arduino Due (USB Native Port)",
"upload": {
Expand Down
3 changes: 1 addition & 2 deletions boards/samd21_xpro.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"svd_path": "ATSAMD21J18A.svd"
},
"frameworks": [
"mbed",
"zephyr"
],
"name": "Atmel SAMD21-XPRO",
Expand All @@ -32,6 +31,6 @@
"atmel-ice"
]
},
"url": "https://developer.mbed.org/platforms/SAMD21-XPRO/",
"url": "https://www.microchip.com/en-us/development-tool/atsamd21-xpro",
"vendor": "Atmel"
}
5 changes: 2 additions & 3 deletions boards/samd21g18a.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"svd_path": "ATSAMD21G18A.svd"
},
"frameworks": [
"arduino",
"mbed"
"arduino"
],
"name": "Atmel ATSAMW25-XPRO",
"upload": {
Expand All @@ -45,6 +44,6 @@
"atmel-ice"
]
},
"url": "https://developer.mbed.org/platforms/SAMW25-XPRO/",
"url": "https://www.microchip.com/en-us/development-tool/atsamw25-xpro",
"vendor": "Atmel"
}
33 changes: 0 additions & 33 deletions boards/saml21_xpro_b.json

This file was deleted.

3 changes: 1 addition & 2 deletions boards/samr21_xpro.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"svd_path": "ATSAMR21G18A.svd"
},
"frameworks": [
"mbed",
"zephyr"
],
"name": "Atmel ATSAMR21-XPRO",
Expand All @@ -32,6 +31,6 @@
"atmel-ice"
]
},
"url": "https://developer.mbed.org/platforms/SAMR21-XPRO/",
"url": "https://www.microchip.com/en-us/development-tool/ATSAMR21-XPRO",
"vendor": "Atmel"
}
3 changes: 2 additions & 1 deletion boards/seeed_xiao.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"-D__SAMD21__",
"-D__SAMD21G18A__",
"-DARM_MATH_CM0PLUS",
"-DSEEED_XIAO_M0"
"-DSEEED_XIAO_M0",
"-DARDUINO_SEEED_XIAO_M0"
],
"f_cpu": "48000000L",
"hwids": [
Expand Down
38 changes: 0 additions & 38 deletions builder/compat.py

This file was deleted.

4 changes: 1 addition & 3 deletions builder/frameworks/_bare.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
build_mcu = env.get("BOARD_MCU", board.get("build.mcu", ""))

env.Append(
ASFLAGS=["-x", "assembler-with-cpp"],
ASPPFLAGS=["-x", "assembler-with-cpp"],

CFLAGS=[
"-std=gnu11"
Expand Down Expand Up @@ -83,5 +83,3 @@
]
)

# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])
18 changes: 11 additions & 7 deletions builder/frameworks/arduino/arduino-common.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,26 @@

assert os.path.isdir(FRAMEWORK_DIR)

machine_flags = [
"-mcpu=%s" % board.get("build.cpu"),
"-mthumb",
]

env.Append(
ASFLAGS=["-x", "assembler-with-cpp"],
ASFLAGS=machine_flags,
ASPPFLAGS=[
"-x", "assembler-with-cpp",
],

CFLAGS=[
"-std=gnu11"
],

CCFLAGS=[
CCFLAGS=machine_flags + [
"-Os", # optimize for size
"-ffunction-sections", # place each function in its own section
"-fdata-sections",
"-Wall",
"-mcpu=%s" % board.get("build.cpu"),
"-mthumb",
"-nostdlib",
"--param", "max-inline-insns-single=500"
],
Expand All @@ -77,10 +83,8 @@
os.path.join(FRAMEWORK_DIR, "libraries")
],

LINKFLAGS=[
LINKFLAGS=machine_flags + [
"-Os",
"-mcpu=%s" % board.get("build.cpu"),
"-mthumb",
"-Wl,--gc-sections",
"-Wl,--check-sections",
"-Wl,--unresolved-symbols=report-all",
Expand Down
4 changes: 0 additions & 4 deletions builder/frameworks/arduino/arduino-sam.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@
LIBS=["sam_sam3x8e_gcc_rel", "gcc"]
)

env.Append(
ASFLAGS=env.get("CCFLAGS", [])[:]
)

#
# Target: Build Core Library
#
Expand Down
4 changes: 0 additions & 4 deletions builder/frameworks/arduino/arduino-samd.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,6 @@
]
)

env.Append(
ASFLAGS=env.get("CCFLAGS", [])[:],
)

#
# Target: Build Core Library
#
Expand Down
1 change: 0 additions & 1 deletion builder/frameworks/mbed
Submodule mbed deleted from 9a5450
60 changes: 0 additions & 60 deletions builder/frameworks/simba.py

This file was deleted.

5 changes: 2 additions & 3 deletions builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from SCons.Script import (ARGUMENTS, COMMAND_LINE_TARGETS, AlwaysBuild,
Builder, Default, DefaultEnvironment)

from platformio.util import get_serial_ports
from platformio.public import list_serial_ports


def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
Expand All @@ -33,7 +33,7 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
if not bool(upload_options.get("disable_flushing", False)):
env.FlushSerialBuffer("$UPLOAD_PORT")

before_ports = get_serial_ports()
before_ports = list_serial_ports()

if bool(upload_options.get("use_1200bps_touch", False)):
env.TouchSerialPort("$UPLOAD_PORT", 1200)
Expand All @@ -48,7 +48,6 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621


env = DefaultEnvironment()
env.SConscript("compat.py", exports="env")
platform = env.PioPlatform()
board = env.BoardConfig()
upload_protocol = env.subst("$UPLOAD_PROTOCOL")
Expand Down
Loading

0 comments on commit 0ebb3bc

Please sign in to comment.