Skip to content

Commit d455dff

Browse files
committed
merge from main
2 parents 74e5edd + 35de08d commit d455dff

File tree

243 files changed

+9915
-2460
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

243 files changed

+9915
-2460
lines changed

.devcontainer/cortex-m-toolchain.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ echo -e "[cortex-m-toolchain.sh] downloading and installing gcc-arm-non-eabi too
1414
cd /workspaces
1515

1616
wget -qO gcc-arm-none-eabi.tar.xz \
17-
https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz
17+
https://developer.arm.com/-/media/Files/downloads/gnu/15.2.rel1/binrel/arm-gnu-toolchain-15.2.rel1-x86_64-arm-none-eabi.tar.xz
1818

1919
tar -xJf gcc-arm-none-eabi.tar.xz
20-
ln -s arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi gcc-arm-none-eabi
20+
ln -s arm-gnu-toolchain-15.2.rel1-x86_64-arm-none-eabi gcc-arm-none-eabi
2121
rm -f gcc-arm-none-eabi.tar.xz
2222

2323
echo -e "[cortex-m-toolchain.sh] update PATH in environment"

.github/actions/deps/external/action.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ runs:
2727
uses: carlosperate/arm-none-eabi-gcc-action@v1
2828
with:
2929
# When changing this update what Windows grabs too!
30-
release: '14.2.Rel1'
30+
release: '15.2.Rel1'
3131

3232
# espressif
3333
- name: Get espressif toolchain
@@ -56,6 +56,16 @@ runs:
5656
uses: ./.github/actions/deps/python
5757
with:
5858
action: ${{ inputs.action }}
59+
- name: Set ESP-IDF constraints path
60+
if: inputs.port == 'espressif'
61+
run: python3 -u tools/ci_set_idf_constraint.py
62+
shell: bash
63+
5964
- name: Install python dependencies
60-
run: pip install -r requirements-dev.txt
65+
run: |
66+
if [ -n "${IDF_CONSTRAINT_FILE:-}" ] && [ -f "$IDF_CONSTRAINT_FILE" ]; then
67+
pip install -c "$IDF_CONSTRAINT_FILE" -r requirements-dev.txt
68+
else
69+
pip install -r requirements-dev.txt
70+
fi
6171
shell: bash

.github/actions/deps/ports/broadcom/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ runs:
55
steps:
66
- name: Get broadcom toolchain
77
run: |
8-
wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/arm-gnu-toolchain-14.2.rel1-x86_64-aarch64-none-elf.tar.xz
9-
sudo tar -C /usr --strip-components=1 -xaf arm-gnu-toolchain-14.2.rel1-x86_64-aarch64-none-elf.tar.xz
8+
wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/arm-gnu-toolchain-15.2.rel1-x86_64-aarch64-none-elf.tar.xz
9+
sudo tar -C /usr --strip-components=1 -xaf arm-gnu-toolchain-15.2.rel1-x86_64-aarch64-none-elf.tar.xz
1010
sudo apt-get update
1111
sudo apt-get install -y mtools
1212
shell: bash

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ jobs:
246246
python3 -c "import sys, locale; print(sys.getdefaultencoding(), locale.getpreferredencoding(False))"
247247
- name: Install dependencies
248248
run: |
249-
wget --no-verbose -O gcc-arm.zip https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-mingw-w64-i686-arm-none-eabi.zip
249+
wget --no-verbose -O gcc-arm.zip https://developer.arm.com/-/media/Files/downloads/gnu/15.2.rel1/binrel/arm-gnu-toolchain-15.2.rel1-mingw-w64-i686-arm-none-eabi.zip
250250
unzip -q -d /tmp/arm-gnu-toolchain gcc-arm.zip
251251
tar -C /tmp/arm-gnu-toolchain -cf - . | tar -C /usr/local -xf -
252252
# We could use a venv instead, but that requires entering the venv on each run step

.github/workflows/run-tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,10 @@ jobs:
9595
uses: ./.github/actions/deps/external
9696
- name: Build native sim target
9797
run: make -C ports/zephyr-cp -j2 BOARD=native_native_sim
98+
- name: Build bsim
99+
run: make -j 2 everything
100+
working-directory: ports/zephyr-cp/tools/bsim
101+
- name: Build native_nrf5340bsim
102+
run: make -C ports/zephyr-cp -j2 BOARD=native_nrf5340bsim
98103
- name: Run Zephyr tests
99104
run: make -C ports/zephyr-cp test

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ __pycache__/
5555
######################
5656
GNUmakefile
5757
user.props
58+
user_pre_mpconfigport.mk
59+
user_post_mpconfigport.mk
60+
user_post_circuitpy_defns.mk
5861

5962
# Sphinx output
6063
###############
@@ -107,3 +110,10 @@ TAGS
107110

108111
# windsurf rules
109112
.windsurfrules
113+
114+
# git-review-web outputs
115+
.review
116+
117+
# Zephyr trace files
118+
**/channel0_0
119+
**/*.perfetto-trace

AGENTS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- Capture CircuitPython output by finding the matching device in `/dev/serial/by-id`
2+
- You can mount the CIRCUITPY drive by doing `udisksctl mount -b /dev/disk/by-label/CIRCUITPY` and access it via `/run/media/<user>/CIRCUITPY`.
3+
- `circup` is a command line tool to install libraries and examples to CIRCUITPY.

BUILDING.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,52 @@ If you aren't sure what boards exist, have a peek in the boards subdirectory of
6464
If you have a fast computer with many cores, consider adding `-j` to your build flags, such as `-j17` on
6565
a 6-core 12-thread machine.
6666

67+
## Configuration
68+
69+
Ports and boards are preconfigured, thus make knows how to build a specific
70+
board. Power users can change the configuration of a specific board or port,
71+
either by passing compile-time options to make, or by creating appropriate
72+
make include files.
73+
74+
The configuration system is hierarchical. A higher level will typically only
75+
set an option that a lower level hasn't configured:
76+
77+
* board configuration: `mpconfigport.mk`
78+
* pre-port user configuration: `user_pre_mpconfigport.mk`
79+
* port configuration: `mpconfigport.mk`
80+
* post-port user configuration: `user_post_mpconfigport.mk`
81+
* global configuration: `py/circuitpython_mpconfig.mk`
82+
83+
The board configuration is within the board-directory, e.g.
84+
`ports/raspberrypi/boards/raspberry_pi_pico/`, the port configuration is
85+
in the port-directory, e.g. `ports/raspberrypi/`.
86+
87+
Editing these configuration files is the way to go if you want to change
88+
the default behavior and ultimately create a pull-request. Otherwise,
89+
changes should go into one of the user configuration files.
90+
91+
User specific configurations are optional and should be maintained out of
92+
tree. Passing `-I directory` tells make where to search for the additional
93+
configuration files. E.g. to speed up boots by removing the wait-time for
94+
the save-mode button press, you would:
95+
96+
* create a directory: `mkdir -p ~/my_cp_config`
97+
* create the config file: `echo 'CIRCUITPY_SKIP_SAFE_MODE_WAIT=0' > ~/my_cp_config/user_pre_mpconfigport.mk`
98+
* run make with: `make -I ~/my_cp_config BOARD=raspberry_pi_pico`
99+
100+
Besides the `user*mpconfigport.mk` files, there is another optional file
101+
named `user_post_circuitpy_defns.mk`. This file is included at the end
102+
and can be used to tweak compiler-definitions that are not covered by
103+
one of the compile time options `CIRCUITPY_*`.
104+
105+
Example: to create a build for the Pico2-W with an integrated saves-partition,
106+
you would create a `user_post_circuitpy_defns.mk` with the following content:
107+
108+
$(info ===> processing user_post_circuitpy_defns.mk)
109+
ifeq (${BOARD},raspberry_pi_pico2_w)
110+
CFLAGS += -DCIRCUITPY_SAVES_PARTITION_SIZE=1048576
111+
endif
112+
67113
## Testing
68114

69115
If you are working on changes to the core language, you might find it useful to run the test suite.

conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,12 @@ def autoapi_prepare_jinja_env(jinja_env):
192192
# Port READMEs in various formats
193193
"ports/*/README*",
194194
]
195-
exclude_patterns = ["docs/autoapi/templates/**", "docs/README.md"]
195+
exclude_patterns = [
196+
"docs/autoapi/templates/**",
197+
"docs/README.md",
198+
"AGENTS.md",
199+
"**/AGENTS.md",
200+
]
196201

197202
# The reST default role (used for this markup: `text`) to use for all
198203
# documents.

devices/ble_hci/common-hal/_bleio/Adapter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "shared-bindings/_bleio/ScanEntry.h"
3030
#include "shared-bindings/time/__init__.h"
3131

32-
#if CIRCUITPY_OS_GETENV
32+
#if CIRCUITPY_SETTINGS_TOML
3333
#include "shared-bindings/os/__init__.h"
3434
#endif
3535

@@ -261,7 +261,7 @@ static void _adapter_set_name(bleio_adapter_obj_t *self, mp_obj_str_t *name_obj)
261261
static void bleio_adapter_hci_init(bleio_adapter_obj_t *self) {
262262
mp_int_t name_len = 0;
263263

264-
#if CIRCUITPY_OS_GETENV
264+
#if CIRCUITPY_SETTINGS_TOML
265265
mp_obj_t name = common_hal_os_getenv("CIRCUITPY_BLE_NAME", mp_const_none);
266266
if (name != mp_const_none) {
267267
mp_arg_validate_type_string(name, MP_QSTR_CIRCUITPY_BLE_NAME);

0 commit comments

Comments
 (0)