Skip to content

Commit a4a3827

Browse files
committed
Merge remote-tracking branch 'adafruit/main' into zephyr_bleio
2 parents f7ee5cf + 0150116 commit a4a3827

64 files changed

Lines changed: 1061 additions & 765 deletions

File tree

Some content is hidden

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

.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: 1 addition & 1 deletion
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

.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

.gitignore

Lines changed: 3 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
###############

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.

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);

docs/environment.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ Allows the entry of a display scaling factor used during the terminalio console
187187
The entered scaling factor only affects the terminalio console and has no impact on
188188
the UART, Web Workflow, BLE Workflow, etc consoles.
189189

190-
This feature is not enabled on boards that the CIRCUITPY_OS_GETENV (os CIRCUIPTY_FULL_BUILD)
190+
This feature is not enabled on boards that the CIRCUITPY_SETTINGS_TOML (or CIRCUITPY_FULL_BUILD)
191191
flag has been set to 0. Currently this is primarily boards with limited flash including some
192192
of the Atmel_samd boards based on the SAMD21/M0 microprocessor.
193193

@@ -197,7 +197,7 @@ Specifies a custom font file path to use for the terminalio console instead of t
197197
``/fonts/terminal.lvfontbin``. This allows users to create and use custom fonts for the
198198
CircuitPython console.
199199

200-
This feature requires both CIRCUITPY_OS_GETENV and CIRCUITPY_LVFONTIO to be enabled.
200+
This feature requires both CIRCUITPY_SETTINGS_TOML and CIRCUITPY_LVFONTIO to be enabled.
201201

202202
Example:
203203

docs/shared_bindings_matrix.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@
8484
"keypad.Keys": "CIRCUITPY_KEYPAD_KEYS",
8585
"keypad.ShiftRegisterKeys": "CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS",
8686
"keypad_demux.DemuxKeyMatrix": "CIRCUITPY_KEYPAD_DEMUX",
87-
"os.getenv": "CIRCUITPY_OS_GETENV",
87+
"os.getenv": "CIRCUITPY_SETTINGS_TOML",
8888
"select": "MICROPY_PY_SELECT_SELECT",
89+
"supervisor.get_setting": "CIRCUITPY_SETTINGS_TOML",
8990
"sys": "CIRCUITPY_SYS",
9091
"terminalio": "CIRCUITPY_DISPLAYIO",
9192
"usb": "CIRCUITPY_PYUSB",

locale/circuitpython.pot

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ msgstr ""
583583
msgid "Already scanning for wifi networks"
584584
msgstr ""
585585

586-
#: shared-module/os/getenv.c
586+
#: supervisor/shared/settings.c
587587
#, c-format
588588
msgid "An error occurred while retrieving '%s':\n"
589589
msgstr ""
@@ -1092,7 +1092,6 @@ msgid "File exists"
10921092
msgstr ""
10931093

10941094
#: shared-bindings/supervisor/__init__.c shared-module/lvfontio/OnDiskFont.c
1095-
#: shared-module/os/getenv.c
10961095
msgid "File not found"
10971096
msgstr ""
10981097

@@ -1243,7 +1242,7 @@ msgstr ""
12431242
msgid "Internal define error"
12441243
msgstr ""
12451244

1246-
#: shared-bindings/pwmio/PWMOut.c shared-module/os/getenv.c
1245+
#: shared-bindings/pwmio/PWMOut.c supervisor/shared/settings.c
12471246
msgid "Internal error"
12481247
msgstr ""
12491248

@@ -1344,17 +1343,12 @@ msgstr ""
13441343
msgid "Invalid bits per value"
13451344
msgstr ""
13461345

1347-
#: shared-module/os/getenv.c
1348-
#, c-format
1349-
msgid "Invalid byte %.*s"
1350-
msgstr ""
1351-
13521346
#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c
13531347
#, c-format
13541348
msgid "Invalid data_pins[%d]"
13551349
msgstr ""
13561350

1357-
#: shared-module/msgpack/__init__.c
1351+
#: shared-module/msgpack/__init__.c supervisor/shared/settings.c
13581352
msgid "Invalid format"
13591353
msgstr ""
13601354

@@ -1385,18 +1379,14 @@ msgstr ""
13851379
msgid "Invalid state"
13861380
msgstr ""
13871381

1388-
#: shared-module/os/getenv.c
1382+
#: supervisor/shared/settings.c
13891383
msgid "Invalid unicode escape"
13901384
msgstr ""
13911385

13921386
#: shared-bindings/aesio/aes.c
13931387
msgid "Key must be 16, 24, or 32 bytes long"
13941388
msgstr ""
13951389

1396-
#: shared-module/os/getenv.c
1397-
msgid "Key not found"
1398-
msgstr ""
1399-
14001390
#: shared-module/is31fl3741/FrameBuffer.c
14011391
msgid "LED mappings must match display size"
14021392
msgstr ""

0 commit comments

Comments
 (0)