Skip to content
Draft
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/deps/external/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ inputs:
default: restore
type: choice
options:
- cache
- restore
- cache
- restore

port:
required: false
Expand All @@ -27,7 +27,7 @@ runs:
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
# When changing this update what Windows grabs too!
release: '14.2.Rel1'
release: "14.2.Rel1"

# espressif
- name: Get espressif toolchain
Expand Down
12 changes: 12 additions & 0 deletions .github/actions/deps/ports/zephyr-cp/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ name: Fetch Zephyr port deps
runs:
using: composite
steps:
- name: Get libusb
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libusb-1.0-0-dev libudev-dev
shell: bash
- name: Setup Zephyr project
uses: zephyrproject-rtos/action-zephyr-setup@v1
with:
Expand All @@ -13,3 +19,9 @@ runs:
run: west zephyr-export
shell: bash
working-directory: ports/zephyr-cp
- name: Dump windows info
if: runner.os == 'Windows'
run: |
D:/a/circuitpython/circuitpython/ports/zephyr-cp/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe --version
shell: bash
working-directory: ports/zephyr-cp
4 changes: 2 additions & 2 deletions ports/zephyr-cp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ pip install west
west init -l zephyr-config
west update
west zephyr-export
pip install -r lib/zephyr/scripts/requirements.txt
pip install -r zephyr/scripts/requirements.txt
west sdk install
```

Now to build from the top level:
Now to build from `ports/zephyr-cp`:

```sh
make BOARD=nordic_nrf7002dk
Expand Down
2 changes: 1 addition & 1 deletion ports/zephyr-cp/boards/nrf7002dk_nrf5340_cpuapp.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CONFIG_NETWORKING=y
CONFIG_WIFI=y

CONFIG_MBEDTLS_TLS_VERSION_1_2=y
CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y
CONFIG_MBEDTLS_USE_PSA_CRYPTO=n

CONFIG_BT=y
Expand Down
21 changes: 9 additions & 12 deletions ports/zephyr-cp/cptools/build_circuitpython.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import asyncio
import colorlog
import sys
import logging
import os
import pathlib
import tomllib
import tomlkit
import yaml
import pickle
import sys

import cpbuild
import board_tools
import colorlog
import cpbuild
import tomlkit
import tomllib
import yaml

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -219,13 +219,13 @@ async def build_circuitpython():
circuitpython_flags.append(f"-DCIRCUITPY_ENABLE_MPY_NATIVE={1 if enable_mpy_native else 0}")
circuitpython_flags.append(f"-DCIRCUITPY_FULL_BUILD={1 if full_build else 0}")
circuitpython_flags.append(f"-DCIRCUITPY_USB_HOST={1 if usb_host else 0}")
circuitpython_flags.append(f'-DCIRCUITPY_BOARD_ID=\\"{board}\\"')
circuitpython_flags.append(f"-DCIRCUITPY_BOARD_ID='\"{board}\"'")
circuitpython_flags.append(f"-DCIRCUITPY_TUSB_MEM_ALIGN={tusb_mem_align}")
circuitpython_flags.append(f"-DCIRCUITPY_TRANSLATE_OBJECT={1 if lto else 0}")
circuitpython_flags.append("-DINTERNAL_FLASH_FILESYSTEM")
circuitpython_flags.append("-DLONGINT_IMPL_MPZ")
circuitpython_flags.append("-DCIRCUITPY_SSL_MBEDTLS")
circuitpython_flags.append('-DFFCONF_H=\\"lib/oofatfs/ffconf.h\\"')
circuitpython_flags.append("-DFFCONF_H='\"lib/oofatfs/ffconf.h\"'")
circuitpython_flags.extend(("-I", srcdir))
circuitpython_flags.extend(("-I", srcdir / "lib/tinyusb/src"))
circuitpython_flags.extend(("-I", srcdir / "supervisor/shared/usb"))
Expand Down Expand Up @@ -448,10 +448,7 @@ async def build_circuitpython():

if "ssl" in enabled_modules:
# TODO: Figure out how to get these paths from zephyr
circuitpython_flags.append('-DMBEDTLS_CONFIG_FILE=\\"config-tls-generic.h\\"')
circuitpython_flags.extend(
("-isystem", portdir / "modules" / "crypto" / "tinycrypt" / "lib" / "include")
)
circuitpython_flags.append('-DMBEDTLS_CONFIG_FILE=\\"config-mbedtls.h\\"')
circuitpython_flags.extend(
("-isystem", portdir / "modules" / "crypto" / "mbedtls" / "include")
)
Expand Down
Loading
Loading