Skip to content

Add Zephyr port #10026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 5, 2025
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions .github/actions/deps/external/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ runs:
if: >-
inputs.port != 'none' &&
inputs.port != 'litex' &&
inputs.port != 'espressif'
inputs.port != 'espressif' &&
inputs.port != 'zephyr-cp'
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
# When changing this update what Windows grabs too!
Expand Down Expand Up @@ -51,7 +52,7 @@ runs:

# common
- name: Cache python dependencies
if: inputs.port != 'espressif'
if: inputs.port != 'espressif' && inputs.port != 'zephyr-cp'
uses: ./.github/actions/deps/python
with:
action: ${{ inputs.action }}
Expand Down
24 changes: 10 additions & 14 deletions .github/actions/deps/ports/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,29 @@ inputs:
board:
required: true
type: string

outputs:
port:
value: ${{ steps.board-to-port.outputs.port }}
required: true
type: string

runs:
using: composite
steps:
- name: Board to port
id: board-to-port
run: |
PORT=$(find ports/*/boards/ -type d -name ${{ inputs.board }} | sed 's/^ports\///g;s/\/boards.*//g')
if [ -z $PORT ]; then (exit 1); else echo >> $GITHUB_OUTPUT "port=$PORT"; fi
shell: bash

- name: Set up broadcom
if: steps.board-to-port.outputs.port == 'broadcom'
if: inputs.port == 'broadcom'
uses: ./.github/actions/deps/ports/broadcom

- name: Set up espressif
if: steps.board-to-port.outputs.port == 'espressif'
if: inputs.port == 'espressif'
uses: ./.github/actions/deps/ports/espressif

- name: Set up litex
if: steps.board-to-port.outputs.port == 'litex'
if: inputs.port == 'litex'
uses: ./.github/actions/deps/ports/litex

- name: Set up nordic
if: steps.board-to-port.outputs.port == 'nordic'
if: inputs.port == 'nordic'
uses: ./.github/actions/deps/ports/nordic

- name: Set up Zephyr
if: inputs.port == 'zephyr-cp'
uses: ./.github/actions/deps/ports/zephyr-cp
15 changes: 15 additions & 0 deletions .github/actions/deps/ports/zephyr-cp/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Fetch Zephyr port deps

runs:
using: composite
steps:
- name: Setup Zephyr project
uses: zephyrproject-rtos/action-zephyr-setup@v1
with:
app-path: zephyr-config
base-path: ports/zephyr-cp
toolchains: arm-zephyr-eabi
- name: Export cmake info
run: west zephyr-export
shell: bash
working-directory: ports/zephyr-cp
2 changes: 1 addition & 1 deletion .github/actions/deps/submodules/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ runs:
git fetch --no-recurse-submodules --shallow-since="2021-07-01" origin $GITHUB_SHA
git repack -d
echo "::endgroup::"
CP_VERSION=$(tools/describe)
CP_VERSION=$(python py/version.py)
echo "$CP_VERSION"
echo "CP_VERSION=$CP_VERSION" >> $GITHUB_ENV
echo "cp-version=$CP_VERSION" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-board-custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
download: false
- name: Versions
run: |
tools/describe
python py/version.py
gcc --version
python3 --version
cmake --version || true
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-boards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
cp-version:
required: true
type: string
port:
required: true
type: string
secrets:
AWS_ACCESS_KEY_ID:
required: false
Expand Down Expand Up @@ -43,6 +46,7 @@ jobs:
uses: ./.github/actions/deps/ports
with:
board: ${{ matrix.board }}
port: ${{ inputs.port }}

- name: Set up submodules
id: set-up-submodules
Expand All @@ -51,7 +55,7 @@ jobs:
- name: Set up external
uses: ./.github/actions/deps/external
with:
port: ${{ steps.set-up-port.outputs.port }}
port: ${{ inputs.port }}
- name: Set up mpy-cross
if: steps.set-up-submodules.outputs.frozen == 'True'
uses: ./.github/actions/mpy_cross
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,35 @@ jobs:
# ERROR: Platform MINGW64_NT-10.0-17763-x86_64 appears to be unsupported
# https://github.com/espressif/esp-idf/issues/7062

windows-zephyr:
strategy:
matrix:
os: [windows-2022, windows-2025]
runs-on: ${{ matrix.os }}
needs: scheduler
if: needs.scheduler.outputs.windows == 'True'
env:
CP_VERSION: ${{ needs.scheduler.outputs.cp-version }}
steps:
- name: Set up repository
uses: actions/checkout@v4
with:
submodules: false
show-progress: false
fetch-depth: 1
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Set up Zephyr
uses: ./.github/actions/deps/ports/zephyr-cp
- name: Set up submodules
uses: ./.github/actions/deps/submodules
- name: build mpy-cross
run: make -j4 -C mpy-cross
- name: build ek_ra8d1
run: make -j4 -C ports/zephyr-cp BOARD=renesas_ek_ra8d1

ports:
needs: [scheduler, mpy-cross, tests]
if: needs.scheduler.outputs.ports != '{}'
Expand All @@ -311,3 +340,4 @@ jobs:
with:
boards: ${{ toJSON(fromJSON(needs.scheduler.outputs.ports)[matrix.port]) }}
cp-version: ${{ needs.scheduler.outputs.cp-version }}
port: ${{ matrix.port }}
20 changes: 17 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
Expand All @@ -25,7 +25,8 @@ repos:
tests/unicode/data/utf-8_invalid.txt|
tests/extmod/data/qr.pgm|
tests/basics/bytearray_byte_operations.py|
ports/raspberrypi/sdk
ports/raspberrypi/sdk|
ports/zephyr-cp/cptools/compat2driver.py
)
- repo: local
hooks:
Expand All @@ -38,10 +39,23 @@ repos:
- id: formatting
name: Formatting
entry: python3 tools/codeformat.py
types_or: [c, python]
types: [c]
language: system
exclude: |
(?x)^(
lib/tinyusb|
ports/raspberrypi/sdk
)
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.9.4
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.5.0"
hooks:
- id: pyproject-fmt
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy