circuitpython/py/circuitpy_defns.mk

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

803 lines
20 KiB
Makefile
Raw Normal View History

# This file is part of the MicroPython project, http://micropython.org/
#
# The MIT License (MIT)
#
2020-06-03 18:40:05 -04:00
# SPDX-FileCopyrightText: Copyright (c) 2019 Dan Halbert for Adafruit Industries
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# Common Makefile definitions that can be shared across CircuitPython ports.
###
# Common compile warnings.
BASE_CFLAGS = \
-fsingle-precision-constant \
-fno-strict-aliasing \
-Wdouble-promotion \
-Wimplicit-fallthrough=2 \
-Wno-endif-labels \
-Wstrict-prototypes \
-Werror-implicit-function-declaration \
-Wfloat-equal \
-Wundef \
-Wshadow \
-Wwrite-strings \
-Wsign-compare \
-Wmissing-format-attribute \
-Wno-deprecated-declarations \
-Wnested-externs \
-Wunreachable-code \
-Wcast-align \
-D__$(CHIP_VARIANT)__ \
-ffunction-sections \
-fdata-sections \
-DCIRCUITPY_SOFTWARE_SAFE_MODE=0x0ADABEEF \
-DCIRCUITPY_CANARY_WORD=0xADAF00 \
-DCIRCUITPY_SAFE_RESTART_WORD=0xDEADBEEF \
-DCIRCUITPY_BOARD_ID="\"$(BOARD)\"" \
--param max-inline-insns-single=500
# Use these flags to debug build times and header includes.
# -ftime-report
# -H
2021-01-08 22:16:58 -05:00
# Set a global CIRCUITPY_DEBUG flag.
# Don't just call it "DEBUG": too many libraries use plain DEBUG.
ifneq ($(DEBUG),)
CFLAGS += -DCIRCUITPY_DEBUG=$(DEBUG)
else
CFLAGS += -DCIRCUITPY_DEBUG=0
endif
2022-05-27 15:59:54 -04:00
CIRCUITPY_LTO ?= 0
2022-06-01 14:12:14 -04:00
CIRCUITPY_LTO_PARTITION ?= balanced
ifeq ($(CIRCUITPY_LTO),1)
CFLAGS += -flto -flto-partition=$(CIRCUITPY_LTO_PARTITION) -DCIRCUITPY_LTO=1
else
CFLAGS += -DCIRCUITPY_LTO=0
2022-05-27 15:59:54 -04:00
endif
# Produce an object file for translate.c instead of including it in a header.
# The header version can be optimized on non-LTO builds *if* inlining is allowed
# otherwise, it blows up the binary sizes with tons of translate copies.
2022-06-01 14:12:14 -04:00
CIRCUITPY_TRANSLATE_OBJECT ?= $(CIRCUITPY_LTO)
CFLAGS += -DCIRCUITPY_TRANSLATE_OBJECT=$(CIRCUITPY_TRANSLATE_OBJECT)
###
# Handle frozen modules.
ifneq ($(FROZEN_DIR),)
# To use frozen source modules, put your .py files in a subdirectory (eg scripts/)
# and then invoke make with FROZEN_DIR=scripts (be sure to build from scratch).
CFLAGS += -DMICROPY_MODULE_FROZEN_STR
endif
# To use frozen bytecode, put your .py files in a subdirectory (eg frozen/) and
# then invoke make with FROZEN_MPY_DIR=frozen or FROZEN_MPY_DIRS="dir1 dir2"
# (be sure to build from scratch).
ifneq ($(FROZEN_MPY_DIRS),)
CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool
CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
endif
###
# Select which builtin modules to compile and include.
2022-08-28 21:55:13 -04:00
# Keep alphabetical.
ifeq ($(CIRCUITPY_AESIO),1)
SRC_PATTERNS += aesio/%
endif
2020-09-24 01:29:04 -04:00
ifeq ($(CIRCUITPY_ALARM),1)
SRC_PATTERNS += alarm/%
endif
ifeq ($(CIRCUITPY_ANALOGBUFIO),1)
SRC_PATTERNS += analogbufio/%
endif
ifeq ($(CIRCUITPY_ANALOGIO),1)
SRC_PATTERNS += analogio/%
endif
2021-07-29 23:06:24 -04:00
ifeq ($(CIRCUITPY_ATEXIT),1)
SRC_PATTERNS += atexit/%
endif
ifeq ($(CIRCUITPY_AUDIOBUSIO),1)
SRC_PATTERNS += audiobusio/%
endif
ifeq ($(CIRCUITPY_AUDIOIO),1)
SRC_PATTERNS += audioio/%
endif
ifeq ($(CIRCUITPY_AUDIOPWMIO),1)
SRC_PATTERNS += audiopwmio/%
endif
ifeq ($(CIRCUITPY_AUDIOCORE),1)
SRC_PATTERNS += audiocore/%
endif
ifeq ($(CIRCUITPY_AUDIOMIXER),1)
SRC_PATTERNS += audiomixer/%
endif
ifeq ($(CIRCUITPY_AUDIOMP3),1)
SRC_PATTERNS += audiomp3/%
endif
ifeq ($(CIRCUITPY_BITBANGIO),1)
SRC_PATTERNS += bitbangio/%
endif
# Some builds need bitbang SPI for the dotstar but don't make bitbangio available so include it separately.
ifeq ($(CIRCUITPY_BITBANG_APA102),1)
SRC_PATTERNS += bitbangio/SPI%
endif
2021-02-24 00:23:14 -05:00
ifeq ($(CIRCUITPY_BITMAPTOOLS),1)
SRC_PATTERNS += bitmaptools/%
endif
2021-02-19 14:22:50 -05:00
ifeq ($(CIRCUITPY_BITOPS),1)
SRC_PATTERNS += bitops/%
endif
ifeq ($(CIRCUITPY_BLEIO),1)
2019-08-29 18:44:27 -04:00
SRC_PATTERNS += _bleio/%
endif
ifeq ($(CIRCUITPY_BOARD),1)
SRC_PATTERNS += board/%
endif
2020-10-24 21:48:35 -04:00
ifeq ($(CIRCUITPY_BUSDEVICE),1)
2020-11-03 19:35:20 -05:00
SRC_PATTERNS += adafruit_bus_device/%
2020-10-24 21:48:35 -04:00
endif
ifeq ($(CIRCUITPY_BUSIO),1)
SRC_PATTERNS += busio/%
endif
ifeq ($(CIRCUITPY_CAMERA),1)
SRC_PATTERNS += camera/%
endif
ifeq ($(CIRCUITPY_CANIO),1)
SRC_PATTERNS += canio/%
endif
2022-10-19 11:05:48 -04:00
ifeq ($(CIRCUITPY_COPROC),1)
SRC_PATTERNS += coproc/%
endif
2020-05-05 01:23:38 -04:00
ifeq ($(CIRCUITPY_COUNTIO),1)
SRC_PATTERNS += countio/%
endif
ifeq ($(CIRCUITPY_CYW43),1)
SRC_PATTERNS += cyw43/%
endif
ifeq ($(CIRCUITPY_DIGITALIO),1)
SRC_PATTERNS += digitalio/%
endif
ifeq ($(CIRCUITPY_DISPLAYIO),1)
SRC_PATTERNS += displayio/%
endif
2022-08-28 21:55:13 -04:00
ifeq ($(CIRCUITPY__EVE),1)
SRC_PATTERNS += _eve/%
endif
ifeq ($(CIRCUITPY_FLOPPYIO),1)
SRC_PATTERNS += floppyio/%
endif
2020-03-10 14:12:01 -04:00
ifeq ($(CIRCUITPY_FRAMEBUFFERIO),1)
SRC_PATTERNS += framebufferio/%
endif
2019-02-24 19:05:51 -05:00
ifeq ($(CIRCUITPY_FREQUENCYIO),1)
SRC_PATTERNS += frequencyio/%
endif
ifeq ($(CIRCUITPY_FUTURE),1)
SRC_PATTERNS += __future__/%
endif
2021-08-08 05:45:15 -04:00
ifeq ($(CIRCUITPY_GETPASS),1)
SRC_PATTERNS += getpass/%
endif
ifeq ($(CIRCUITPY_GIFIO),1)
SRC_PATTERNS += gifio/%
endif
2020-06-16 14:39:56 -04:00
ifeq ($(CIRCUITPY_GNSS),1)
SRC_PATTERNS += gnss/%
endif
2022-06-29 19:31:55 -04:00
ifeq ($(CIRCUITPY_HASHLIB),1)
SRC_PATTERNS += hashlib/%
endif
ifeq ($(CIRCUITPY_I2CTARGET),1)
SRC_PATTERNS += i2ctarget/%
endif
ifeq ($(CIRCUITPY_IMAGECAPTURE),1)
SRC_PATTERNS += imagecapture/%
endif
2020-08-05 15:53:35 -04:00
ifeq ($(CIRCUITPY_IPADDRESS),1)
SRC_PATTERNS += ipaddress/%
endif
2021-11-06 15:00:11 -04:00
ifeq ($(CIRCUITPY_IS31FL3741),1)
SRC_PATTERNS += is31fl3741/%
endif
ifeq ($(CIRCUITPY_KEYPAD),1)
SRC_PATTERNS += keypad/%
endif
ifeq ($(CIRCUITPY_MATH),1)
SRC_PATTERNS += math/%
endif
2020-07-15 20:58:38 -04:00
ifeq ($(CIRCUITPY_MEMORYMONITOR),1)
SRC_PATTERNS += memorymonitor/%
endif
ifeq ($(CIRCUITPY_MICROCONTROLLER),1)
SRC_PATTERNS += microcontroller/%
endif
ifeq ($(CIRCUITPY_MDNS),1)
SRC_PATTERNS += mdns/%
endif
2022-08-28 21:55:13 -04:00
ifeq ($(CIRCUITPY_MSGPACK),1)
SRC_PATTERNS += msgpack/%
endif
ifeq ($(CIRCUITPY_NEOPIXEL_WRITE),1)
SRC_PATTERNS += neopixel_write/%
endif
ifeq ($(CIRCUITPY_NVM),1)
SRC_PATTERNS += nvm/%
endif
ifeq ($(CIRCUITPY_ONEWIREIO),1)
SRC_PATTERNS += onewireio/%
endif
ifeq ($(CIRCUITPY_OS),1)
SRC_PATTERNS += os/%
endif
2020-12-17 14:04:56 -05:00
ifeq ($(CIRCUITPY_DUALBANK),1)
SRC_PATTERNS += dualbank/%
2020-12-08 01:00:00 -05:00
endif
2022-08-28 21:55:13 -04:00
ifeq ($(CIRCUITPY_PARALLELDISPLAY),1)
SRC_PATTERNS += paralleldisplay/%
endif
ifeq ($(CIRCUITPY_PEW),1)
SRC_PATTERNS += _pew/%
endif
ifeq ($(CIRCUITPY_PIXELBUF),1)
SRC_PATTERNS += adafruit_pixelbuf/%
endif
Add adafruit_pixelmap.PixelMap .. a fast helper for animations. It is similar to and inspired by the PixelMap helper in Adafruit LED Animation library, but with an extremely fast 'paste' method for setting a series of pixels. This is a common operation for many animations, and can give a substantial speed improvement. It's named `adafruit_pixelmap` so that we can package a compatible version in pure Python for systems that can't fit it in C in flash, or for Blinka. This is a proof of concept and can make a very fast comet animation: ```python import time import adafruit_pixelbuf import adafruti_pixelmap import board import neopixel from supervisor import ticks_ms from adafruit_led_animation.animation.solid import Solid from adafruit_led_animation import color pixel_pin = board.GP0 pixel_num = 96 pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=1, auto_write=False, pixel_order="RGB") evens = adafruit_pixelmap.PixelMap(pixels, tuple(range(0, pixel_num, 2))) odd_indices = tuple((i, i+2) for i in range(1, pixel_num, 4)) print(odd_indices) odds = adafruit_pixelbuf.PixelMap(pixels, odd_indices) assert len(odds) == len(odd_indices) comet_length = 16 comet1 = [color.calculate_intensity(color.GREEN, ((1+i) / comet_length) ** 2.4) for i in range(comet_length)] comet2 = [color.calculate_intensity(color.PURPLE, ((1+i) / comet_length) ** 2.4) for i in range(comet_length)] pos1 = 0 pos2 = 96//4 while True: evens.paste(comet1, pos1, wrap=True, reverse=False, others=0) pos1 = (pos1 + 1) % len(evens) odds.paste(comet2, pos2, wrap=True, reverse=True, others=0) pos2 = (pos2 - 1) % len(odds) pixels.show() m = ticks_ms() if m % 2000 > 1000: time.sleep(.02) ```
2022-11-10 12:02:31 -05:00
ifeq ($(CIRCUITPY_PIXELMAP),1)
2022-11-24 10:07:08 -05:00
SRC_PATTERNS += _pixelmap/%
Add adafruit_pixelmap.PixelMap .. a fast helper for animations. It is similar to and inspired by the PixelMap helper in Adafruit LED Animation library, but with an extremely fast 'paste' method for setting a series of pixels. This is a common operation for many animations, and can give a substantial speed improvement. It's named `adafruit_pixelmap` so that we can package a compatible version in pure Python for systems that can't fit it in C in flash, or for Blinka. This is a proof of concept and can make a very fast comet animation: ```python import time import adafruit_pixelbuf import adafruti_pixelmap import board import neopixel from supervisor import ticks_ms from adafruit_led_animation.animation.solid import Solid from adafruit_led_animation import color pixel_pin = board.GP0 pixel_num = 96 pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=1, auto_write=False, pixel_order="RGB") evens = adafruit_pixelmap.PixelMap(pixels, tuple(range(0, pixel_num, 2))) odd_indices = tuple((i, i+2) for i in range(1, pixel_num, 4)) print(odd_indices) odds = adafruit_pixelbuf.PixelMap(pixels, odd_indices) assert len(odds) == len(odd_indices) comet_length = 16 comet1 = [color.calculate_intensity(color.GREEN, ((1+i) / comet_length) ** 2.4) for i in range(comet_length)] comet2 = [color.calculate_intensity(color.PURPLE, ((1+i) / comet_length) ** 2.4) for i in range(comet_length)] pos1 = 0 pos2 = 96//4 while True: evens.paste(comet1, pos1, wrap=True, reverse=False, others=0) pos1 = (pos1 + 1) % len(evens) odds.paste(comet2, pos2, wrap=True, reverse=True, others=0) pos2 = (pos2 - 1) % len(odds) pixels.show() m = ticks_ms() if m % 2000 > 1000: time.sleep(.02) ```
2022-11-10 12:02:31 -05:00
endif
ifeq ($(CIRCUITPY_QRIO),1)
SRC_PATTERNS += qrio/%
endif
2021-07-12 14:40:01 -04:00
ifeq ($(CIRCUITPY_RAINBOWIO),1)
SRC_PATTERNS += rainbowio/%
2021-07-08 15:55:13 -04:00
endif
ifeq ($(CIRCUITPY_RGBMATRIX),1)
SRC_PATTERNS += rgbmatrix/%
2020-03-10 14:12:01 -04:00
endif
ifeq ($(CIRCUITPY_PS2IO),1)
SRC_PATTERNS += ps2io/%
endif
ifeq ($(CIRCUITPY_PULSEIO),1)
SRC_PATTERNS += pulseio/%
endif
ifeq ($(CIRCUITPY_PWMIO),1)
SRC_PATTERNS += pwmio/%
2019-05-15 22:29:34 -04:00
endif
ifeq ($(CIRCUITPY_RANDOM),1)
SRC_PATTERNS += random/%
endif
ifeq ($(CIRCUITPY_RP2PIO),1)
SRC_PATTERNS += rp2pio/%
endif
ifeq ($(CIRCUITPY_ROTARYIO),1)
SRC_PATTERNS += rotaryio/%
endif
ifeq ($(CIRCUITPY_RTC),1)
SRC_PATTERNS += rtc/%
endif
ifeq ($(CIRCUITPY_SAMD),1)
SRC_PATTERNS += samd/%
endif
ifeq ($(CIRCUITPY_SDCARDIO),1)
SRC_PATTERNS += sdcardio/%
endif
ifeq ($(CIRCUITPY_SDIOIO),1)
SRC_PATTERNS += sdioio/%
endif
ifeq ($(CIRCUITPY_SHARPDISPLAY),1)
SRC_PATTERNS += sharpdisplay/%
endif
2020-08-10 20:56:49 -04:00
ifeq ($(CIRCUITPY_SOCKETPOOL),1)
SRC_PATTERNS += socketpool/%
endif
2020-08-13 19:55:49 -04:00
ifeq ($(CIRCUITPY_SSL),1)
SRC_PATTERNS += ssl/%
endif
ifeq ($(CIRCUITPY_STAGE),1)
SRC_PATTERNS += _stage/%
endif
ifeq ($(CIRCUITPY_STORAGE),1)
SRC_PATTERNS += storage/%
endif
ifeq ($(CIRCUITPY_STRUCT),1)
SRC_PATTERNS += struct/%
endif
ifeq ($(CIRCUITPY_SUPERVISOR),1)
SRC_PATTERNS += supervisor/%
endif
ifeq ($(CIRCUITPY_SYNTHIO),1)
SRC_PATTERNS += synthio/%
endif
ifeq ($(CIRCUITPY_TERMINALIO),1)
SRC_PATTERNS += terminalio/% fontio/%
endif
ifeq ($(CIRCUITPY_FONTIO),1)
SRC_PATTERNS += fontio/%
endif
ifeq ($(CIRCUITPY_TIME),1)
SRC_PATTERNS += time/%
endif
ifeq ($(CIRCUITPY_TOUCHIO),1)
SRC_PATTERNS += touchio/%
endif
2021-07-27 14:30:01 -04:00
ifeq ($(CIRCUITPY_TRACEBACK),1)
SRC_PATTERNS += traceback/%
endif
ifeq ($(CIRCUITPY_UHEAP),1)
SRC_PATTERNS += uheap/%
endif
2021-02-12 19:01:14 -05:00
ifeq ($(CIRCUITPY_USB_CDC),1)
SRC_PATTERNS += usb_cdc/%
endif
ifeq ($(CIRCUITPY_USB_HID),1)
SRC_PATTERNS += usb_hid/%
endif
ifeq ($(CIRCUITPY_USB_HOST),1)
SRC_PATTERNS += usb_host/% usb/%
endif
ifeq ($(CIRCUITPY_USB_MIDI),1)
SRC_PATTERNS += usb_midi/%
endif
ifeq ($(CIRCUITPY_USB_VENDOR),1)
SRC_PATTERNS += usb_vendor/%
endif
ifeq ($(CIRCUITPY_USTACK),1)
SRC_PATTERNS += ustack/%
endif
2022-08-28 21:55:13 -04:00
ifeq ($(CIRCUITPY_VECTORIO),1)
SRC_PATTERNS += vectorio/%
2022-02-19 11:41:42 -05:00
endif
ifeq ($(CIRCUITPY_VIDEOCORE),1)
SRC_PATTERNS += videocore/%
endif
ifeq ($(CIRCUITPY_WATCHDOG),1)
SRC_PATTERNS += watchdog/%
endif
2020-07-28 21:23:33 -04:00
ifeq ($(CIRCUITPY_WIFI),1)
SRC_PATTERNS += wifi/%
endif
2022-08-28 21:55:13 -04:00
ifeq ($(CIRCUITPY_ZLIB),1)
SRC_PATTERNS += zlib/%
2020-11-08 21:39:20 -05:00
endif
# All possible sources are listed here, and are filtered by SRC_PATTERNS in SRC_COMMON_HAL
SRC_COMMON_HAL_ALL = \
2019-08-29 18:44:27 -04:00
_bleio/Adapter.c \
_bleio/Attribute.c \
_bleio/Characteristic.c \
_bleio/CharacteristicBuffer.c \
_bleio/Connection.c \
2019-08-29 18:44:27 -04:00
_bleio/Descriptor.c \
_bleio/PacketBuffer.c \
2019-08-29 18:44:27 -04:00
_bleio/Service.c \
_bleio/UUID.c \
_bleio/__init__.c \
_pew/PewPew.c \
_pew/__init__.c \
2020-12-10 13:03:40 -05:00
alarm/SleepMemory.c \
2020-09-24 01:29:04 -04:00
alarm/__init__.c \
2020-11-19 15:43:39 -05:00
alarm/pin/PinAlarm.c \
2020-11-25 17:52:06 -05:00
alarm/time/TimeAlarm.c \
2020-12-18 02:24:36 -05:00
alarm/touch/TouchAlarm.c \
2022-10-20 05:26:10 -04:00
alarm/coproc/CoprocAlarm.c \
analogbufio/BufferedIn.c \
analogbufio/__init__.c \
analogio/AnalogIn.c \
analogio/AnalogOut.c \
analogio/__init__.c \
audiobusio/I2SOut.c \
audiobusio/PDMIn.c \
audiobusio/__init__.c \
audioio/AudioOut.c \
audioio/__init__.c \
audiopwmio/PWMAudioOut.c \
audiopwmio/__init__.c \
board/__init__.c \
busio/I2C.c \
busio/SPI.c \
busio/UART.c \
busio/__init__.c \
camera/__init__.c \
camera/Camera.c \
canio/CAN.c \
canio/Listener.c \
canio/__init__.c \
2022-10-19 11:05:48 -04:00
coproc/__init__.c \
coproc/Coproc.c \
coproc/CoprocMemory.c \
2020-05-05 01:23:38 -04:00
countio/Counter.c \
countio/__init__.c \
digitalio/DigitalInOut.c \
digitalio/__init__.c \
dualbank/__init__.c \
2019-02-24 19:05:51 -05:00
frequencyio/FrequencyIn.c \
frequencyio/__init__.c \
imagecapture/ParallelImageCapture.c \
imagecapture/__init__.c \
2020-06-16 14:39:56 -04:00
gnss/__init__.c \
gnss/GNSS.c \
gnss/PositionFix.c \
gnss/SatelliteSystem.c \
2022-06-29 19:31:55 -04:00
hashlib/__init__.c \
hashlib/Hash.c \
i2ctarget/I2CTarget.c \
i2ctarget/__init__.c \
microcontroller/Pin.c \
microcontroller/Processor.c \
microcontroller/__init__.c \
mdns/__init__.c \
mdns/Server.c \
mdns/RemoteService.c \
neopixel_write/__init__.c \
nvm/ByteArray.c \
nvm/__init__.c \
os/__init__.c \
2021-08-29 08:26:47 -04:00
paralleldisplay/ParallelBus.c \
ps2io/Ps2.c \
ps2io/__init__.c \
pulseio/PulseIn.c \
pulseio/PulseOut.c \
pulseio/__init__.c \
pwmio/PWMOut.c \
pwmio/__init__.c \
rgbmatrix/RGBMatrix.c \
rgbmatrix/__init__.c \
rotaryio/IncrementalEncoder.c \
rotaryio/__init__.c \
rtc/RTC.c \
rtc/__init__.c \
sdioio/SDCard.c \
sdioio/__init__.c \
2020-08-11 19:04:55 -04:00
socketpool/__init__.c \
socketpool/SocketPool.c \
socketpool/Socket.c \
2020-08-13 19:55:49 -04:00
ssl/__init__.c \
ssl/SSLContext.c \
ssl/SSLSocket.c \
supervisor/Runtime.c \
supervisor/__init__.c \
usb_host/__init__.c \
usb_host/Port.c \
watchdog/WatchDogMode.c \
watchdog/WatchDogTimer.c \
watchdog/__init__.c \
2021-10-12 03:04:14 -04:00
wifi/Monitor.c \
2020-07-28 21:23:33 -04:00
wifi/Network.c \
wifi/Radio.c \
wifi/ScannedNetworks.c \
2020-07-28 21:23:33 -04:00
wifi/__init__.c \
2020-06-26 17:23:20 -04:00
ifeq ($(CIRCUITPY_BLEIO_HCI),1)
2020-07-23 18:54:26 -04:00
# Helper code for _bleio HCI.
2020-06-30 23:19:40 -04:00
SRC_C += \
2020-07-23 18:54:26 -04:00
common-hal/_bleio/att.c \
common-hal/_bleio/hci.c \
2020-06-26 17:23:20 -04:00
endif
SRC_COMMON_HAL = $(filter $(SRC_PATTERNS), $(SRC_COMMON_HAL_ALL))
# These don't have corresponding files in each port but are still located in
# shared-bindings to make it clear what the contents of the modules are.
# All possible sources are listed here, and are filtered by SRC_PATTERNS.
SRC_BINDINGS_ENUMS = \
$(filter $(SRC_PATTERNS), \
2019-08-29 18:44:27 -04:00
_bleio/Address.c \
_bleio/Attribute.c \
_bleio/ScanEntry.c \
_eve/__init__.c \
__future__/__init__.c \
2020-09-11 07:27:11 -04:00
camera/ImageFormat.c \
2020-11-20 23:33:39 -05:00
canio/Match.c \
countio/Edge.c \
digitalio/Direction.c \
digitalio/DriveMode.c \
digitalio/Pull.c \
displayio/Colorspace.c \
fontio/Glyph.c \
ParallelImageCapture: Add continuous capture on espressif By having a pair of buffers, the capture hardware can fill one buffer while Python code (including displayio, etc) operates on the other buffer. This increases the responsiveness of camera-using code. On the Kaluga it makes the following improvements: * 320x240 viewfinder at 30fps instead of 15fps using directio * 240x240 animated gif capture at 10fps instead of 7.5fps As discussed at length on Discord, the "usual end user" code will look like this: camera = ... with camera.continuous_capture(buffer1, buffer2) as capture: for frame in capture: # Do something with frame However, rather than presenting a context manager, the core code consists of three new functions to start & stop continuous capture, and to get the next frame. The reason is twofold. First, it's simply easier to implement the context manager object in pure Python. Second, for more advanced usage, the context manager may be too limiting, and it's easier to iterate on the right design in Python code. In particular, I noticed that adapting the JPEG-capturing programs to use continuous capture mode needed a change in program structure. The camera app was structured as ```python while True: if shutter button was just pressed: capture a jpeg frame else: update the viewfinder ``` However, "capture a jpeg frame" needs to (A) switch the camera settings and (B) capture into a different, larger buffer then (C) return to the earlier settings. This can't be done during continuous capture mode. So just restructuring it as follows isn't going to work: ```python with camera.continuous_capture(buffer1, buffer2) as capture: for frame in capture: if shutter button was just pressed: capture a jpeg frame, without disturbing continuous capture mode else: update the viewfinder ``` The continuous mode is only implemented in the espressif port; others will throw an exception if the associated methods are invoked. It's not impossible to implement there, just not a priority, since these micros don't have enough RAM for two framebuffer copies at any resonable sizes. The capture code, including single-shot capture, now take mp_obj_t in the common-hal layer, instead of a buffer & length. This was done for the continuous capture mode because it has to identify & return to the user the proper Python object representing the original buffer. In the Espressif port, it was convenient to implement single capture in terms of a multi-capture, which is why I changed the singleshot routine's signature too.
2021-10-27 17:10:20 -04:00
imagecapture/ParallelImageCapture.c \
math/__init__.c \
microcontroller/ResetReason.c \
microcontroller/RunMode.c \
2020-11-08 21:39:20 -05:00
msgpack/__init__.c \
msgpack/ExtType.c \
paralleldisplay/__init__.c \
paralleldisplay/ParallelBus.c \
qrio/PixelPolicy.c \
qrio/QRInfo.c \
supervisor/RunReason.c \
2022-08-28 21:55:13 -04:00
supervisor/StatusBar.c \
2021-04-29 09:12:36 -04:00
wifi/AuthMode.c \
2021-10-12 03:04:14 -04:00
wifi/Packet.c \
)
SRC_BINDINGS_ENUMS += \
util.c
SRC_SHARED_MODULE_ALL = \
2019-08-29 18:44:27 -04:00
_bleio/Address.c \
_bleio/Attribute.c \
_bleio/ScanEntry.c \
_bleio/ScanResults.c \
_eve/__init__.c \
adafruit_pixelbuf/PixelBuf.c \
adafruit_pixelbuf/__init__.c \
2022-11-24 10:07:08 -05:00
_pixelmap/PixelMap.c \
_pixelmap/__init__.c \
_stage/Layer.c \
_stage/Text.c \
_stage/__init__.c \
aesio/__init__.c \
aesio/aes.c \
2021-07-29 23:06:24 -04:00
atexit/__init__.c \
audiocore/RawSample.c \
audiocore/WaveFile.c \
audiocore/__init__.c \
audioio/__init__.c \
audiomixer/Mixer.c \
audiomixer/MixerVoice.c \
audiomixer/__init__.c \
2020-01-06 14:35:43 -05:00
audiomp3/MP3Decoder.c \
audiomp3/__init__.c \
audiopwmio/__init__.c \
bitbangio/I2C.c \
bitbangio/SPI.c \
bitbangio/__init__.c \
2021-02-24 00:23:14 -05:00
bitmaptools/__init__.c \
bitops/__init__.c \
board/__init__.c \
2020-11-03 19:35:20 -05:00
adafruit_bus_device/__init__.c \
2021-12-28 03:31:40 -05:00
adafruit_bus_device/i2c_device/I2CDevice.c \
adafruit_bus_device/spi_device/SPIDevice.c \
2020-11-20 23:33:39 -05:00
canio/Match.c \
canio/Message.c \
canio/RemoteTransmissionRequest.c \
displayio/Bitmap.c \
displayio/ColorConverter.c \
displayio/Display.c \
2019-08-02 19:17:38 -04:00
displayio/EPaperDisplay.c \
displayio/FourWire.c \
displayio/Group.c \
displayio/I2CDisplay.c \
displayio/OnDiskBitmap.c \
displayio/Palette.c \
displayio/Shape.c \
displayio/TileGrid.c \
2021-11-12 11:30:40 -05:00
displayio/area.c \
displayio/__init__.c \
2022-12-01 17:43:08 -05:00
_environ/__init__.c \
floppyio/__init__.c \
fontio/BuiltinFont.c \
fontio/__init__.c \
2020-03-10 14:12:01 -04:00
framebufferio/FramebufferDisplay.c \
framebufferio/__init__.c \
2021-08-08 05:45:15 -04:00
getpass/__init__.c \
gifio/__init__.c \
gifio/GifWriter.c \
ParallelImageCapture: Add continuous capture on espressif By having a pair of buffers, the capture hardware can fill one buffer while Python code (including displayio, etc) operates on the other buffer. This increases the responsiveness of camera-using code. On the Kaluga it makes the following improvements: * 320x240 viewfinder at 30fps instead of 15fps using directio * 240x240 animated gif capture at 10fps instead of 7.5fps As discussed at length on Discord, the "usual end user" code will look like this: camera = ... with camera.continuous_capture(buffer1, buffer2) as capture: for frame in capture: # Do something with frame However, rather than presenting a context manager, the core code consists of three new functions to start & stop continuous capture, and to get the next frame. The reason is twofold. First, it's simply easier to implement the context manager object in pure Python. Second, for more advanced usage, the context manager may be too limiting, and it's easier to iterate on the right design in Python code. In particular, I noticed that adapting the JPEG-capturing programs to use continuous capture mode needed a change in program structure. The camera app was structured as ```python while True: if shutter button was just pressed: capture a jpeg frame else: update the viewfinder ``` However, "capture a jpeg frame" needs to (A) switch the camera settings and (B) capture into a different, larger buffer then (C) return to the earlier settings. This can't be done during continuous capture mode. So just restructuring it as follows isn't going to work: ```python with camera.continuous_capture(buffer1, buffer2) as capture: for frame in capture: if shutter button was just pressed: capture a jpeg frame, without disturbing continuous capture mode else: update the viewfinder ``` The continuous mode is only implemented in the espressif port; others will throw an exception if the associated methods are invoked. It's not impossible to implement there, just not a priority, since these micros don't have enough RAM for two framebuffer copies at any resonable sizes. The capture code, including single-shot capture, now take mp_obj_t in the common-hal layer, instead of a buffer & length. This was done for the continuous capture mode because it has to identify & return to the user the proper Python object representing the original buffer. In the Espressif port, it was convenient to implement single capture in terms of a multi-capture, which is why I changed the singleshot routine's signature too.
2021-10-27 17:10:20 -04:00
imagecapture/ParallelImageCapture.c \
2020-08-05 15:53:35 -04:00
ipaddress/IPv4Address.c \
ipaddress/__init__.c \
2021-11-23 18:21:13 -05:00
is31fl3741/IS31FL3741.c \
is31fl3741/FrameBuffer.c \
2021-11-06 15:00:11 -04:00
is31fl3741/__init__.c \
keypad/__init__.c \
2021-06-14 16:00:15 -04:00
keypad/Event.c \
2021-06-16 15:27:59 -04:00
keypad/EventQueue.c \
2021-06-14 16:00:15 -04:00
keypad/KeyMatrix.c \
2021-06-17 20:51:30 -04:00
keypad/ShiftRegisterKeys.c \
keypad/Keys.c \
2020-07-15 20:58:38 -04:00
memorymonitor/__init__.c \
memorymonitor/AllocationAlarm.c \
memorymonitor/AllocationSize.c \
network/__init__.c \
msgpack/__init__.c \
onewireio/__init__.c \
onewireio/OneWire.c \
os/__init__.c \
os/getenv.c \
paralleldisplay/ParallelBus.c \
qrio/__init__.c \
qrio/QRDecoder.c \
2021-07-12 14:40:01 -04:00
rainbowio/__init__.c \
random/__init__.c \
rgbmatrix/RGBMatrix.c \
rgbmatrix/__init__.c \
rotaryio/IncrementalEncoder.c \
sdcardio/SDCard.c \
sdcardio/__init__.c \
sharpdisplay/SharpMemoryFramebuffer.c \
sharpdisplay/__init__.c \
socket/__init__.c \
storage/__init__.c \
struct/__init__.c \
2022-08-28 21:55:13 -04:00
supervisor/__init__.c \
supervisor/StatusBar.c \
synthio/MidiTrack.c \
synthio/__init__.c \
terminalio/Terminal.c \
terminalio/__init__.c \
time/__init__.c \
2021-07-27 14:30:01 -04:00
traceback/__init__.c \
uheap/__init__.c \
usb/__init__.c \
usb/core/__init__.c \
usb/core/Device.c \
ustack/__init__.c \
2022-02-20 16:32:44 -05:00
zlib/__init__.c \
vectorio/Circle.c \
vectorio/Polygon.c \
vectorio/Rectangle.c \
vectorio/VectorShape.c \
vectorio/__init__.c \
# All possible sources are listed here, and are filtered by SRC_PATTERNS.
SRC_SHARED_MODULE = $(filter $(SRC_PATTERNS), $(SRC_SHARED_MODULE_ALL))
# Use the native touchio if requested. This flag is set conditionally in, say, mpconfigport.h.
# The presence of common-hal/touchio/* does not imply it's available for all chips in a port,
# so there is an explicit flag. For example, SAMD21 touchio is native, but SAMD51 is not.
ifeq ($(CIRCUITPY_TOUCHIO_USE_NATIVE),1)
SRC_COMMON_HAL_ALL += \
touchio/TouchIn.c \
touchio/__init__.c
else
SRC_SHARED_MODULE_ALL += \
touchio/TouchIn.c \
touchio/__init__.c
endif
# If supporting _bleio via HCI, make devices/ble_hci/common-hal/_bleio be includable,
# and use C source files in devices/ble_hci/common-hal.
ifeq ($(CIRCUITPY_BLEIO_HCI),1)
INC += -I$(TOP)/devices/ble_hci
DEVICES_MODULES += $(TOP)/devices/ble_hci
endif
ifeq ($(CIRCUITPY_AUDIOMP3),1)
SRC_MOD += $(addprefix lib/mp3/src/, \
bitstream.c \
buffers.c \
dct32.c \
dequant.c \
dqchan.c \
huffman.c \
hufftabs.c \
imdct.c \
mp3dec.c \
mp3tabs.c \
polyphase.c \
scalfact.c \
stproc.c \
subband.c \
trigtabs.c \
)
$(BUILD)/lib/mp3/src/buffers.o: CFLAGS += -include "py/misc.h" -D'MPDEC_ALLOCATOR(x)=m_malloc(x,0)' -D'MPDEC_FREE(x)=m_free(x)'
endif
ifeq ($(CIRCUITPY_RGBMATRIX),1)
SRC_MOD += $(addprefix lib/protomatter/src/, \
2020-03-10 14:12:01 -04:00
core.c \
)
$(BUILD)/lib/protomatter/src/core.o: CFLAGS += -include "shared-module/rgbmatrix/allocator.h" -DCIRCUITPY -Wno-missing-braces -Wno-missing-prototypes
2020-03-10 14:12:01 -04:00
endif
2022-02-20 16:32:44 -05:00
ifeq ($(CIRCUITPY_ZLIB),1)
2022-02-19 11:41:42 -05:00
SRC_MOD += $(addprefix lib/uzlib/, \
tinflate.c \
tinfzlib.c \
tinfgzip.c \
adler32.c \
crc32.c \
)
$(BUILD)/lib/uzlib/tinflate.o: CFLAGS += -Wno-missing-braces -Wno-missing-prototypes
endif
# All possible sources are listed here, and are filtered by SRC_PATTERNS.
SRC_SHARED_MODULE_INTERNAL = \
$(filter $(SRC_PATTERNS), \
displayio/display_core.c \
2022-03-11 13:51:50 -05:00
usb/utf16le.c \
)
2020-06-26 17:23:20 -04:00
SRC_COMMON_HAL_INTERNAL = \
$(filter $(SRC_PATTERNS), \
_bleio/ \
)
ifeq ($(INTERNAL_LIBM),1)
SRC_LIBM = \
$(addprefix lib/,\
libm/math.c \
libm/roundf.c \
libm/fmodf.c \
libm/nearbyintf.c \
libm/ef_sqrt.c \
libm/kf_rem_pio2.c \
libm/kf_sin.c \
libm/kf_cos.c \
libm/kf_tan.c \
libm/ef_rem_pio2.c \
libm/sf_sin.c \
libm/sf_cos.c \
libm/sf_tan.c \
libm/sf_frexp.c \
libm/sf_modf.c \
libm/sf_ldexp.c \
libm/asinfacosf.c \
libm/atanf.c \
libm/atan2f.c \
)
ifeq ($(CIRCUITPY_ULAB),1)
2020-02-04 11:24:37 -05:00
SRC_LIBM += \
$(addprefix lib/,\
libm/acoshf.c \
libm/asinhf.c \
libm/atanhf.c \
libm/erf_lgamma.c \
libm/log1pf.c \
libm/sf_erf.c \
libm/wf_lgamma.c \
libm/wf_tgamma.c \
)
endif
$(patsubst %.c,$(BUILD)/%.o,$(SRC_LIBM)): CFLAGS += -Wno-missing-prototypes
endif
SRC_CIRCUITPY_COMMON = \
Merge tag 'v1.17' into merge-1.17 F-strings, new machine.I2S class, ESP32-C3 support and LEGO_HUB_NO6 board This release of MicroPython adds support for f-strings (PEP-498), with a few limitations compared to normal Python. F-strings are essentially syntactic sugar for "".format() and make formatting strings a lot more convenient. Other improvements to the core runtime include pretty printing OSError when it has two arguments (an errno code and a string), scheduling of KeyboardInterrupt on the main thread, and support for a single argument to the optimised form of StopIteration. In the machine module a new I2S class has been added, with support for esp32 and stm32 ports. This provides a consistent API for transmit and receive of audio data in blocking, non-blocking and asyncio-based operation. Also, the json module has support for the "separators" argument in the dump and dumps functions, and framebuf now includes a way to blit between frame buffers of different formats using a palette. A new, portable machine.bitstream function is also added which can output a stream of bits with configurable timing, and is used as the basis for driving WS2812 LEDs in a common way across ports. There has been some restructuring of the repository directory layout, with all third-party code now in the lib/ directory. And a new top-level directory shared/ has been added with first-party code that was previously in lib/ moved there. The docs have seen further improvement with enhancements and additions to the rp2 parts, as well as a new quick reference for the zephyr port. The terms master/slave have been replaced with controller/peripheral, mainly relating to I2C and SPI usage. And u-module references have been replaced with just the module name without the u-prefix to help clear up the intended usage of modules in MicroPython. For the esp8266 and esp32 ports, hidden networks are now included in WLAN scan results. On the esp32 the RMT class is enhanced with idle_level and write_pulses modes. There is initial support for ESP32-C3 chips with GENERIC_C3 and GENERIC_C3_USB boards. The javascript port has had its Makefile and garbage collector implementation reworked so it compiles and runs with latest the Emscripten using asyncify. The mimxrt port sees the addition of hardware I2C and SPI support, as well as some additional methods to the machine module. There is also support for Hyperflash chips. The nrf port now has full VFS storage support, enables source-line on traceback, and has .mpy features consistent with other ports. For the rp2 port there is now more configurability for boards, and more boards added. The stm32 port has a new LEGO_HUB_NO6 board definition with detailed information how to get this LEGO Hub running stock MicroPython. There is also now support to change the CPU frequency on STM32WB MCUs. And USBD_xxx descriptor options have been renamed to MICROPY_HW_USB_xxx. Thanks to everyone who contributed to this release: Amir Gonnen, Andrew Scheller, Bryan Tong Minh, Chris Wilson, Damien George, Daniel Mizyrycki, David Lechner, David P, Fernando, finefoot, Frank Pilhofer, Glenn Ruben Bakke, iabdalkader, Jeff Epler, Jim Mussared, Jonathan Hogg, Josh Klar, Josh Lloyd, Julia Hathaway, Krzysztof Adamski, Matúš Olekšák, Michael Weiss, Michel Bouwmans, Mike Causer, Mike Teachman, Ned Konz, NitiKaur, oclyke, Patrick Van Oosterwijck, Peter Hinch, Peter Züger, Philipp Ebensberger, robert-hh, Roberto Colistete Jr, Sashkoiv, Seon Rozenblum, Tobias Thyrrestrup, Tom McDermott, Will Sowerbutts, Yonatan Goldschmidt. What follows is a detailed list of changes, generated from the git commit history, and organised into sections. Main components =============== all: - fix signed shifts and NULL access errors from -fsanitize=undefined - update to point to files in new shared/ directory py core: - mpstate: make exceptions thread-local - mpstate: schedule KeyboardInterrupt on main thread - mperrno: add MP_ECANCELED error code - makeqstrdefs.py: don't include .h files explicitly in preprocessing - mark unused arguments from bytecode decoding macros - objexcept: pretty print OSError also when it has 2 arguments - makeversionhdr: add --tags arg to git describe - vm: simplify handling of MP_OBJ_STOP_ITERATION in yield-from opcode - objexcept: make mp_obj_exception_get_value support subclassed excs - support single argument to optimised MP_OBJ_STOP_ITERATION - introduce and use mp_raise_type_arg helper - modsys: optimise sys.exit for code size by using exception helpers - objexcept: make mp_obj_new_exception_arg1 inline - obj: fix formatting of comment for mp_obj_is_integer - emitnative: reuse need_reg_all func in need_stack_settled - emitnative: ensure stack settling is safe mid-branch - runtime: fix bool unary op for subclasses of native types - builtinimport: fix condition for including do_execute_raw_code() - mkrules: automatically build mpy-cross if it doesn't exist - implement partial PEP-498 (f-string) support - lexer: clear fstring_args vstr on lexer free - mkrules.mk: do submodule sync in "make submodules" extmod: - btstack: add missing call to mp_bluetooth_hci_uart_deinit - btstack: check that BLE is active before performing operations - uasyncio: get addr and bind server socket before creating task - axtls-include: add axtls_os_port.h to customise axTLS - update for move of crypto-algorithms, re1.5, uzlib to lib - moduselect: conditionally compile select() - nimble: fix leak in l2cap_send if send-while-stalled - btstack/btstack.mk: use -Wno-implicit-fallthrough, not =0 - utime: always invoke mp_hal_delay_ms when >= to 0ms - modbluetooth: clamp MTU values to 32->UINT16_MAX - nimble: allow modbluetooth binding to hook "sent HCI packet" - nimble: add "memory stalling" mechanism for l2cap_send - uasyncio: in open_connection use address info in socket creation - modujson: add support for dump/dumps separators keyword-argument - modlwip: fix close and clean up of UDP and raw sockets - modbluetooth: add send_update arg to gatts_write - add machine.bitstream - modframebuf: enable blit between different formats via a palette lib: - tinyusb: update to version 0.10.1 - pico-sdk: update to version 1.2.0 - utils/stdout_helpers: make mp_hal_stdout_tx_strn_cooked efficient - axtls: switch to repo at micropython/axtls - axtls: update to latest axtls 2.1.5 wih additional commits - re1.5: move re1.5 code from extmod to lib - uzlib: move uzlib code from extmod to lib - crypto-algorithms: move crypto-algorithms code from extmod to lib - update README's based on contents of these dirs drivers: - neopixel: add common machine.bitstream-based neopixel module - neopixel: optimize fill() for speed - neopixel: reduce code size of driver - cyw43: fix cyw43_deinit so it can be called many times in a row - cyw43: make wifi join fail if interface is not active mpy-cross: - disable stack check when building with Emscripten Support components ================== docs: - library: document new esp32.RMT features and fix wait_done - library: warn that ustruct doesn't handle spaces in format strings - esp8266/tutorial: change flash mode from dio to dout - replace master/slave with controller/peripheral in I2C and SPI - rp2: enhance quickref and change image to Pico pinout - rp2: update general section to give a brief technical overview - library/utime.rst: clarify behaviour and precision of sleep ms/us - library/uasyncio.rst: document stream readexactly() method - library/machine.I2S.rst: fix use of sd pin in examples - zephyr: add quick reference for the Zephyr port - library/zephyr: add libraries specific to the Zephyr port - templates: add unix and zephyr quickref links to top-index - rename ufoo.rst to foo.rst - replace ufoo with foo in all docs - library/index.rst: clarify module naming and purpose - library/builtins.rst: add module title - library/network.rst: simplify socket import - add docs for machine.bitstream and neopixel module - library: fix usage of :term: for frozen module reference - esp8266: use monospace for software tools - reference: mention that slicing a memoryview causes allocation examples: no changes specific to this component/port tests: - extmod: make uasyncio_heaplock test more deterministic - cpydiff/modules_struct_whitespace_in_format: run black - extmod/ujson: add tests for dump/dumps separators argument - run-multitests.py: add broadcast and wait facility - multi_bluetooth/ble_subscribe.py: add test for subscription - extmod/vfs_fat_finaliser.py: ensure alloc at never-used GC blocks - basics: split f-string debug printing to separate file with .exp - pybnative: make while.py test run on boards without pyb.delay tools: - autobuild: add scripts to build release firmware - remove obsolete build-stm-latest.sh script - ci.sh: run apt-get update in ci_powerpc_setup - makemanifest.py: allow passing flags to mpy-tool.py - autobuild: add mimxrt port to build scripts for nightly builds - pyboard.py: add cmd-line option to make soft reset configurable - mpremote: swap order of PID and VID in connect-list output - ci.sh: build unix dev variant as part of macOS CI - ci.sh: build GENERIC_C3 board as part of esp32 CI - autobuild: use separate IDF version to build newer esp32 SoCs - autobuild: add FeatherS2 and TinyS2 to esp32 auto builds - mpremote: add seek whence for mounted files - mpremote: raise OSError on unsupported RemoteFile.seek - autobuild: add the MIMXRT1050_EVKB board to the daily builds - ci.sh: add mpy-cross build to nrf port - codeformat.py: include ports/nrf/modules/nrf in code formatting - gen-cpydiff.py: don't rename foo to ufoo in diff output - autobuild: add auto build for Silicognition wESP32 - mpremote: fix connect-list in case VID/PID are None - mpremote: add "devs" shortcut for "connect list" - mpremote: remove support for pyb.USB_VCP in/out specialisation - autobuild: don't use "-B" for make, it's already a fresh build - pyboard.py: move --no-exclusive/--soft-reset out of mutex group - pyboard.py: make --no-follow use same variable as --follow - pyboard.py: add --exclusive to match --no-exclusive - pyboard.py: make --no-soft-reset consistent with other args - uncrustify: force 1 newline at end of file - mpremote: bump version to 0.0.6 CI: - workflows: add workflow to build and test javascript port - workflows: switch from Coveralls to Codecov - workflows: switch from lcov to gcov - workflows: add workflow to build and test unix dev variant The ports ========= all ports: - use common mp_hal_stdout_tx_strn_cooked instead of custom one - update for move of crypto-algorithms, uzlib to lib - rename USBD_VID/PID config macros to MICROPY_HW_USB_VID/PID bare-arm port: no changes specific to this component/port cc3200 port: no changes specific to this component/port esp8266 port: - add __len__ to NeoPixel driver to support iterating - Makefile: add more libm files to build - include hidden networks in WLAN.scan results - replace esp.neopixel with machine.bitstream - remove dead code for end_ticks in machine_bitstream esp32 port: - boards/sdkconfig.base: disable MEMPROT_FEATURE to alloc from IRAM - add __len__ to NeoPixel driver to support iterating - main: allow MICROPY_DIR to be overridden - esp32_rmt: fix RMT looping in newer IDF versions - esp32_rmt: enhance RMT with idle_level and write_pulses modes - add new machine.I2S class for I2S protocol support - machine_spi: calculate actual attained baudrate - machine_hw_spi: use a 2 item SPI queue for long transfers - machine_dac: add MICROPY_PY_MACHINE_DAC option, enable by default - machine_i2s: add MICROPY_PY_MACHINE_I2S option, enable by default - fix use of mp_int_t, size_t and uintptr_t - add initial support for ESP32C3 SoCs - boards/GENERIC_C3: add generic C3-based board - modmachine: release the GIL in machine.idle() - mphalport: always yield at least once in delay_ms - machine_uart: add flow kw-arg to enable hardware flow control - boards: add Silicognition wESP32 board configuration - mpconfigport.h: enable reverse and inplace special methods - include hidden networks in WLAN.scan results - makeimg.py: get bootloader and partition offset from sdkconfig - enable MICROPY_PY_FSTRINGS by default - machine_hw_spi: release GIL during transfers - machine_pin: make check for non-output pins respect chip variant - replace esp.neopixel with machine.bitstream - remove dead code for end_ticks in machine_bitstream - boards: add GENERIC_C3_USB board with USB serial/JTAG support javascript port: - rework Makefile and GC so it works with latest Emscripten - Makefile: suppress compiler errors from array bounds - Makefile: change variable to EXPORTED_RUNTIME_METHODS mimxrt port: - move calc_weekday helper function to timeutils - machine_spi: add the SPI class to the machine module - moduos: seed the PRNG on boot using the TRNG - boards: set vfs partition start to 1 MBbyte - main: skip running main.py if boot.py failed - main: extend the information returned by help() - mimxrt_flash: remove commented-out code - modmachine: add a few minor methods to the machine module - machine_led: use mp_raise_msg_varg helper - machine_i2c: add hardware-based machine.I2C to machine module - add support for Hyperflash chips - boards: add support for the MIMXRT1050_EVKB board - machine_pin: implement ioctl for Pin minimal port: - Makefile: add support for building with user C modules nrf port: - modules: replace master/slave with controller/peripheral in SPI - boards/common.ld: calculate unused flash region - modules/nrf: add new nrf module with flash block device - drivers: add support for using flash block device with SoftDevice - mpconfigport.h: expose nrf module when MICROPY_PY_NRF is set - README: update README.md to reflect internal file systems - mpconfigport.h: tune FAT FS configuration - Makefile: add _fs_size linker script override from make - modules/uos: allow a board to configure MICROPY_VFS_FAT/LFS1/LFS2 - mpconfigport.h: enable MICROPY_PY_IO_FILEIO when an FS is enabled - qstrdefsport.h: add entries for in-built FS mount points - main: add auto mount and auto format hook for internal flash FS - boards: enable needed features for FAT/LFS1/LFS2 - facilitate use of freeze manifest - boards: set FROZEN_MANIFEST blank when SD present on nrf51 targets - modules/scripts: add file system formatting script - Makefile: set default manifest file for all targets - mphalport: add dummy function for mp_hal_time_ns() - boards: enable MICROPY_VFS_LFS2 for all target boards - modules/uos: add ilistdir to uos module - modules/nrf: add function to enable/disable DCDC - enable source line on tracebacks - set .mpy features consistent with documentation and other ports pic16bit port: no changes specific to this component/port powerpc port: no changes specific to this component/port qemu-arm port: no changes specific to this component/port rp2 port: - use 0=Monday datetime convention in RTC - machine_rtc: in RTC.datetime, compute weekday automatically - CMakeLists.txt: suppress compiler errors for pico-sdk and tinyusb - tusb_config.h: set CFG_TUD_CDC_EP_BUFSIZE to 256 - machine_uart: add hardware flow control support - machine_uart: allow overriding default machine UART pins - machine_i2c: allow boards to configure I2C pins using new macros - machine_spi: allow boards to configure SPI pins using new macros - machine_uart: fix poll ioctl to also check hardware FIFO - machine_uart: fix read when FIFO has chars but ringbuf doesn't - tusb_port: allow boards to configure USB VID and PID - boards/ADAFRUIT_FEATHER_RP2040: configure custom VID/PID - boards/ADAFRUIT_FEATHER_RP2040: configure I2C/SPI default pins - boards/SPARKFUN_PROMICRO: configure UART/I2C/SPI default pins - boards/SPARKFUN_THINGPLUS: configure I2C/SPI default pins - boards: add Adafruit ItsyBitsy RP2040 - boards: add Adafruit QT Py RP2040 - boards: add Pimoroni Pico LiPo 4MB - boards: add Pimoroni Pico LiPo 16MB - boards: add Pimoroni Tiny 2040 - CMakeLists.txt: allow a board's cmake to set the manifest path - enable MICROPY_PY_FSTRINGS by default - Makefile: add "submodules" target, to match other ports - rp2_flash: disable IRQs while calling flash_erase/program - CMakeLists.txt: add option to enable double tap reset to bootrom - mpconfigport.h: allow boards to add root pointers samd port: - add support for building with user C modules stm32 port: - softtimer: add soft_timer_reinsert() helper function - mpbthciport: change from systick to soft-timer for BT scheduling - provide a custom BTstack runloop that integrates with soft timer - usb: make irq's default trigger enable all events - boardctrl: skip running main.py if boot.py had an error - sdio: fix undefined reference to DMA stream on H7 - dma: add DMAMUX configuration for H7 to fix dma_nohal_init - main: call mp_deinit() at end of main - adc: allow using ADC12 and ADC3 for H7 - adc: define the ADC instance used for internal channels - adc: simplify and generalise how pin_adcX table is defined - add new machine.I2S class for I2S protocol support - boards/NUCLEO_F446RE: fix I2C1 pin assignment to match datasheet - replace master/slave with controller/peripheral in I2C and SPI - systick: always POLL_HOOK when delaying for milliseconds - sdram: make SDRAM test cache aware, and optional failure with msg - boards/NUCLEO_F446RE: enable CAN bus support - boards: add support for SparkFun STM32 MicroMod Processor board - uart: fix LPUART1 baudrate set/get - uart: support low baudrates on LPUART1 - boards/STM32F429DISC: set correct UART2 pins and add UART3/6 - boards/NUCLEO_F439ZI: add board definition for NUCLEO_F439ZI - boards/LEGO_HUB_NO6: add board definition for LEGO_HUB_NO6 - Makefile: update to only pull in used Bluetooth library - README.md: update supported MCUs, and submodule and mboot use - usbd_desc: rename USBD_xxx descriptor opts to MICROPY_HW_USB_xxx - usbd_cdc_interface: rename USBD_CDC_xx opts to MICROPY_HW_USB_xx - powerctrl: support changing frequency on WB MCUs - boards/NUCLEO_H743ZI2: add modified version of NUCLEO_H743ZI - mbedtls: fix compile warning about uninitialized val - enable MICROPY_PY_FSTRINGS by default - add implementation of machine.bitstream - Makefile: allow GIT_SUBMODULES and LIBS to be extended - stm32_it: support TIM17 IRQs on WB MCUs - disable computed goto on constrained boards - storage: make extended-block-device more configurable - boards/LEGO_HUB_NO6: change SPI flash storage to use hardware SPI - boards/LEGO_HUB_NO6: skip first 1MiB of SPI flash for storage - boards/LEGO_HUB_NO6: add make commands to backup/restore firmware teensy port: no changes specific to this component/port unix port: - modffi: add option to lock GC in callback, and cfun access - Makefile: add back LIB_SRC_C to list of object files - variants: enable help and help("modules") on standard and dev - Makefile: disable error compression on arm-linux-gnueabi-gcc windows port: - Makefile: add .exe extension to executables name - appveyor: update to VS 2017 and use Python 3.8 for build/test zephyr port: - machine_spi: add support for hardware SPI
2021-10-14 15:38:41 -04:00
shared/libc/string0.c \
shared/readline/readline.c \
lib/oofatfs/ff.c \
lib/oofatfs/ffunicode.c \
Merge tag 'v1.17' into merge-1.17 F-strings, new machine.I2S class, ESP32-C3 support and LEGO_HUB_NO6 board This release of MicroPython adds support for f-strings (PEP-498), with a few limitations compared to normal Python. F-strings are essentially syntactic sugar for "".format() and make formatting strings a lot more convenient. Other improvements to the core runtime include pretty printing OSError when it has two arguments (an errno code and a string), scheduling of KeyboardInterrupt on the main thread, and support for a single argument to the optimised form of StopIteration. In the machine module a new I2S class has been added, with support for esp32 and stm32 ports. This provides a consistent API for transmit and receive of audio data in blocking, non-blocking and asyncio-based operation. Also, the json module has support for the "separators" argument in the dump and dumps functions, and framebuf now includes a way to blit between frame buffers of different formats using a palette. A new, portable machine.bitstream function is also added which can output a stream of bits with configurable timing, and is used as the basis for driving WS2812 LEDs in a common way across ports. There has been some restructuring of the repository directory layout, with all third-party code now in the lib/ directory. And a new top-level directory shared/ has been added with first-party code that was previously in lib/ moved there. The docs have seen further improvement with enhancements and additions to the rp2 parts, as well as a new quick reference for the zephyr port. The terms master/slave have been replaced with controller/peripheral, mainly relating to I2C and SPI usage. And u-module references have been replaced with just the module name without the u-prefix to help clear up the intended usage of modules in MicroPython. For the esp8266 and esp32 ports, hidden networks are now included in WLAN scan results. On the esp32 the RMT class is enhanced with idle_level and write_pulses modes. There is initial support for ESP32-C3 chips with GENERIC_C3 and GENERIC_C3_USB boards. The javascript port has had its Makefile and garbage collector implementation reworked so it compiles and runs with latest the Emscripten using asyncify. The mimxrt port sees the addition of hardware I2C and SPI support, as well as some additional methods to the machine module. There is also support for Hyperflash chips. The nrf port now has full VFS storage support, enables source-line on traceback, and has .mpy features consistent with other ports. For the rp2 port there is now more configurability for boards, and more boards added. The stm32 port has a new LEGO_HUB_NO6 board definition with detailed information how to get this LEGO Hub running stock MicroPython. There is also now support to change the CPU frequency on STM32WB MCUs. And USBD_xxx descriptor options have been renamed to MICROPY_HW_USB_xxx. Thanks to everyone who contributed to this release: Amir Gonnen, Andrew Scheller, Bryan Tong Minh, Chris Wilson, Damien George, Daniel Mizyrycki, David Lechner, David P, Fernando, finefoot, Frank Pilhofer, Glenn Ruben Bakke, iabdalkader, Jeff Epler, Jim Mussared, Jonathan Hogg, Josh Klar, Josh Lloyd, Julia Hathaway, Krzysztof Adamski, Matúš Olekšák, Michael Weiss, Michel Bouwmans, Mike Causer, Mike Teachman, Ned Konz, NitiKaur, oclyke, Patrick Van Oosterwijck, Peter Hinch, Peter Züger, Philipp Ebensberger, robert-hh, Roberto Colistete Jr, Sashkoiv, Seon Rozenblum, Tobias Thyrrestrup, Tom McDermott, Will Sowerbutts, Yonatan Goldschmidt. What follows is a detailed list of changes, generated from the git commit history, and organised into sections. Main components =============== all: - fix signed shifts and NULL access errors from -fsanitize=undefined - update to point to files in new shared/ directory py core: - mpstate: make exceptions thread-local - mpstate: schedule KeyboardInterrupt on main thread - mperrno: add MP_ECANCELED error code - makeqstrdefs.py: don't include .h files explicitly in preprocessing - mark unused arguments from bytecode decoding macros - objexcept: pretty print OSError also when it has 2 arguments - makeversionhdr: add --tags arg to git describe - vm: simplify handling of MP_OBJ_STOP_ITERATION in yield-from opcode - objexcept: make mp_obj_exception_get_value support subclassed excs - support single argument to optimised MP_OBJ_STOP_ITERATION - introduce and use mp_raise_type_arg helper - modsys: optimise sys.exit for code size by using exception helpers - objexcept: make mp_obj_new_exception_arg1 inline - obj: fix formatting of comment for mp_obj_is_integer - emitnative: reuse need_reg_all func in need_stack_settled - emitnative: ensure stack settling is safe mid-branch - runtime: fix bool unary op for subclasses of native types - builtinimport: fix condition for including do_execute_raw_code() - mkrules: automatically build mpy-cross if it doesn't exist - implement partial PEP-498 (f-string) support - lexer: clear fstring_args vstr on lexer free - mkrules.mk: do submodule sync in "make submodules" extmod: - btstack: add missing call to mp_bluetooth_hci_uart_deinit - btstack: check that BLE is active before performing operations - uasyncio: get addr and bind server socket before creating task - axtls-include: add axtls_os_port.h to customise axTLS - update for move of crypto-algorithms, re1.5, uzlib to lib - moduselect: conditionally compile select() - nimble: fix leak in l2cap_send if send-while-stalled - btstack/btstack.mk: use -Wno-implicit-fallthrough, not =0 - utime: always invoke mp_hal_delay_ms when >= to 0ms - modbluetooth: clamp MTU values to 32->UINT16_MAX - nimble: allow modbluetooth binding to hook "sent HCI packet" - nimble: add "memory stalling" mechanism for l2cap_send - uasyncio: in open_connection use address info in socket creation - modujson: add support for dump/dumps separators keyword-argument - modlwip: fix close and clean up of UDP and raw sockets - modbluetooth: add send_update arg to gatts_write - add machine.bitstream - modframebuf: enable blit between different formats via a palette lib: - tinyusb: update to version 0.10.1 - pico-sdk: update to version 1.2.0 - utils/stdout_helpers: make mp_hal_stdout_tx_strn_cooked efficient - axtls: switch to repo at micropython/axtls - axtls: update to latest axtls 2.1.5 wih additional commits - re1.5: move re1.5 code from extmod to lib - uzlib: move uzlib code from extmod to lib - crypto-algorithms: move crypto-algorithms code from extmod to lib - update README's based on contents of these dirs drivers: - neopixel: add common machine.bitstream-based neopixel module - neopixel: optimize fill() for speed - neopixel: reduce code size of driver - cyw43: fix cyw43_deinit so it can be called many times in a row - cyw43: make wifi join fail if interface is not active mpy-cross: - disable stack check when building with Emscripten Support components ================== docs: - library: document new esp32.RMT features and fix wait_done - library: warn that ustruct doesn't handle spaces in format strings - esp8266/tutorial: change flash mode from dio to dout - replace master/slave with controller/peripheral in I2C and SPI - rp2: enhance quickref and change image to Pico pinout - rp2: update general section to give a brief technical overview - library/utime.rst: clarify behaviour and precision of sleep ms/us - library/uasyncio.rst: document stream readexactly() method - library/machine.I2S.rst: fix use of sd pin in examples - zephyr: add quick reference for the Zephyr port - library/zephyr: add libraries specific to the Zephyr port - templates: add unix and zephyr quickref links to top-index - rename ufoo.rst to foo.rst - replace ufoo with foo in all docs - library/index.rst: clarify module naming and purpose - library/builtins.rst: add module title - library/network.rst: simplify socket import - add docs for machine.bitstream and neopixel module - library: fix usage of :term: for frozen module reference - esp8266: use monospace for software tools - reference: mention that slicing a memoryview causes allocation examples: no changes specific to this component/port tests: - extmod: make uasyncio_heaplock test more deterministic - cpydiff/modules_struct_whitespace_in_format: run black - extmod/ujson: add tests for dump/dumps separators argument - run-multitests.py: add broadcast and wait facility - multi_bluetooth/ble_subscribe.py: add test for subscription - extmod/vfs_fat_finaliser.py: ensure alloc at never-used GC blocks - basics: split f-string debug printing to separate file with .exp - pybnative: make while.py test run on boards without pyb.delay tools: - autobuild: add scripts to build release firmware - remove obsolete build-stm-latest.sh script - ci.sh: run apt-get update in ci_powerpc_setup - makemanifest.py: allow passing flags to mpy-tool.py - autobuild: add mimxrt port to build scripts for nightly builds - pyboard.py: add cmd-line option to make soft reset configurable - mpremote: swap order of PID and VID in connect-list output - ci.sh: build unix dev variant as part of macOS CI - ci.sh: build GENERIC_C3 board as part of esp32 CI - autobuild: use separate IDF version to build newer esp32 SoCs - autobuild: add FeatherS2 and TinyS2 to esp32 auto builds - mpremote: add seek whence for mounted files - mpremote: raise OSError on unsupported RemoteFile.seek - autobuild: add the MIMXRT1050_EVKB board to the daily builds - ci.sh: add mpy-cross build to nrf port - codeformat.py: include ports/nrf/modules/nrf in code formatting - gen-cpydiff.py: don't rename foo to ufoo in diff output - autobuild: add auto build for Silicognition wESP32 - mpremote: fix connect-list in case VID/PID are None - mpremote: add "devs" shortcut for "connect list" - mpremote: remove support for pyb.USB_VCP in/out specialisation - autobuild: don't use "-B" for make, it's already a fresh build - pyboard.py: move --no-exclusive/--soft-reset out of mutex group - pyboard.py: make --no-follow use same variable as --follow - pyboard.py: add --exclusive to match --no-exclusive - pyboard.py: make --no-soft-reset consistent with other args - uncrustify: force 1 newline at end of file - mpremote: bump version to 0.0.6 CI: - workflows: add workflow to build and test javascript port - workflows: switch from Coveralls to Codecov - workflows: switch from lcov to gcov - workflows: add workflow to build and test unix dev variant The ports ========= all ports: - use common mp_hal_stdout_tx_strn_cooked instead of custom one - update for move of crypto-algorithms, uzlib to lib - rename USBD_VID/PID config macros to MICROPY_HW_USB_VID/PID bare-arm port: no changes specific to this component/port cc3200 port: no changes specific to this component/port esp8266 port: - add __len__ to NeoPixel driver to support iterating - Makefile: add more libm files to build - include hidden networks in WLAN.scan results - replace esp.neopixel with machine.bitstream - remove dead code for end_ticks in machine_bitstream esp32 port: - boards/sdkconfig.base: disable MEMPROT_FEATURE to alloc from IRAM - add __len__ to NeoPixel driver to support iterating - main: allow MICROPY_DIR to be overridden - esp32_rmt: fix RMT looping in newer IDF versions - esp32_rmt: enhance RMT with idle_level and write_pulses modes - add new machine.I2S class for I2S protocol support - machine_spi: calculate actual attained baudrate - machine_hw_spi: use a 2 item SPI queue for long transfers - machine_dac: add MICROPY_PY_MACHINE_DAC option, enable by default - machine_i2s: add MICROPY_PY_MACHINE_I2S option, enable by default - fix use of mp_int_t, size_t and uintptr_t - add initial support for ESP32C3 SoCs - boards/GENERIC_C3: add generic C3-based board - modmachine: release the GIL in machine.idle() - mphalport: always yield at least once in delay_ms - machine_uart: add flow kw-arg to enable hardware flow control - boards: add Silicognition wESP32 board configuration - mpconfigport.h: enable reverse and inplace special methods - include hidden networks in WLAN.scan results - makeimg.py: get bootloader and partition offset from sdkconfig - enable MICROPY_PY_FSTRINGS by default - machine_hw_spi: release GIL during transfers - machine_pin: make check for non-output pins respect chip variant - replace esp.neopixel with machine.bitstream - remove dead code for end_ticks in machine_bitstream - boards: add GENERIC_C3_USB board with USB serial/JTAG support javascript port: - rework Makefile and GC so it works with latest Emscripten - Makefile: suppress compiler errors from array bounds - Makefile: change variable to EXPORTED_RUNTIME_METHODS mimxrt port: - move calc_weekday helper function to timeutils - machine_spi: add the SPI class to the machine module - moduos: seed the PRNG on boot using the TRNG - boards: set vfs partition start to 1 MBbyte - main: skip running main.py if boot.py failed - main: extend the information returned by help() - mimxrt_flash: remove commented-out code - modmachine: add a few minor methods to the machine module - machine_led: use mp_raise_msg_varg helper - machine_i2c: add hardware-based machine.I2C to machine module - add support for Hyperflash chips - boards: add support for the MIMXRT1050_EVKB board - machine_pin: implement ioctl for Pin minimal port: - Makefile: add support for building with user C modules nrf port: - modules: replace master/slave with controller/peripheral in SPI - boards/common.ld: calculate unused flash region - modules/nrf: add new nrf module with flash block device - drivers: add support for using flash block device with SoftDevice - mpconfigport.h: expose nrf module when MICROPY_PY_NRF is set - README: update README.md to reflect internal file systems - mpconfigport.h: tune FAT FS configuration - Makefile: add _fs_size linker script override from make - modules/uos: allow a board to configure MICROPY_VFS_FAT/LFS1/LFS2 - mpconfigport.h: enable MICROPY_PY_IO_FILEIO when an FS is enabled - qstrdefsport.h: add entries for in-built FS mount points - main: add auto mount and auto format hook for internal flash FS - boards: enable needed features for FAT/LFS1/LFS2 - facilitate use of freeze manifest - boards: set FROZEN_MANIFEST blank when SD present on nrf51 targets - modules/scripts: add file system formatting script - Makefile: set default manifest file for all targets - mphalport: add dummy function for mp_hal_time_ns() - boards: enable MICROPY_VFS_LFS2 for all target boards - modules/uos: add ilistdir to uos module - modules/nrf: add function to enable/disable DCDC - enable source line on tracebacks - set .mpy features consistent with documentation and other ports pic16bit port: no changes specific to this component/port powerpc port: no changes specific to this component/port qemu-arm port: no changes specific to this component/port rp2 port: - use 0=Monday datetime convention in RTC - machine_rtc: in RTC.datetime, compute weekday automatically - CMakeLists.txt: suppress compiler errors for pico-sdk and tinyusb - tusb_config.h: set CFG_TUD_CDC_EP_BUFSIZE to 256 - machine_uart: add hardware flow control support - machine_uart: allow overriding default machine UART pins - machine_i2c: allow boards to configure I2C pins using new macros - machine_spi: allow boards to configure SPI pins using new macros - machine_uart: fix poll ioctl to also check hardware FIFO - machine_uart: fix read when FIFO has chars but ringbuf doesn't - tusb_port: allow boards to configure USB VID and PID - boards/ADAFRUIT_FEATHER_RP2040: configure custom VID/PID - boards/ADAFRUIT_FEATHER_RP2040: configure I2C/SPI default pins - boards/SPARKFUN_PROMICRO: configure UART/I2C/SPI default pins - boards/SPARKFUN_THINGPLUS: configure I2C/SPI default pins - boards: add Adafruit ItsyBitsy RP2040 - boards: add Adafruit QT Py RP2040 - boards: add Pimoroni Pico LiPo 4MB - boards: add Pimoroni Pico LiPo 16MB - boards: add Pimoroni Tiny 2040 - CMakeLists.txt: allow a board's cmake to set the manifest path - enable MICROPY_PY_FSTRINGS by default - Makefile: add "submodules" target, to match other ports - rp2_flash: disable IRQs while calling flash_erase/program - CMakeLists.txt: add option to enable double tap reset to bootrom - mpconfigport.h: allow boards to add root pointers samd port: - add support for building with user C modules stm32 port: - softtimer: add soft_timer_reinsert() helper function - mpbthciport: change from systick to soft-timer for BT scheduling - provide a custom BTstack runloop that integrates with soft timer - usb: make irq's default trigger enable all events - boardctrl: skip running main.py if boot.py had an error - sdio: fix undefined reference to DMA stream on H7 - dma: add DMAMUX configuration for H7 to fix dma_nohal_init - main: call mp_deinit() at end of main - adc: allow using ADC12 and ADC3 for H7 - adc: define the ADC instance used for internal channels - adc: simplify and generalise how pin_adcX table is defined - add new machine.I2S class for I2S protocol support - boards/NUCLEO_F446RE: fix I2C1 pin assignment to match datasheet - replace master/slave with controller/peripheral in I2C and SPI - systick: always POLL_HOOK when delaying for milliseconds - sdram: make SDRAM test cache aware, and optional failure with msg - boards/NUCLEO_F446RE: enable CAN bus support - boards: add support for SparkFun STM32 MicroMod Processor board - uart: fix LPUART1 baudrate set/get - uart: support low baudrates on LPUART1 - boards/STM32F429DISC: set correct UART2 pins and add UART3/6 - boards/NUCLEO_F439ZI: add board definition for NUCLEO_F439ZI - boards/LEGO_HUB_NO6: add board definition for LEGO_HUB_NO6 - Makefile: update to only pull in used Bluetooth library - README.md: update supported MCUs, and submodule and mboot use - usbd_desc: rename USBD_xxx descriptor opts to MICROPY_HW_USB_xxx - usbd_cdc_interface: rename USBD_CDC_xx opts to MICROPY_HW_USB_xx - powerctrl: support changing frequency on WB MCUs - boards/NUCLEO_H743ZI2: add modified version of NUCLEO_H743ZI - mbedtls: fix compile warning about uninitialized val - enable MICROPY_PY_FSTRINGS by default - add implementation of machine.bitstream - Makefile: allow GIT_SUBMODULES and LIBS to be extended - stm32_it: support TIM17 IRQs on WB MCUs - disable computed goto on constrained boards - storage: make extended-block-device more configurable - boards/LEGO_HUB_NO6: change SPI flash storage to use hardware SPI - boards/LEGO_HUB_NO6: skip first 1MiB of SPI flash for storage - boards/LEGO_HUB_NO6: add make commands to backup/restore firmware teensy port: no changes specific to this component/port unix port: - modffi: add option to lock GC in callback, and cfun access - Makefile: add back LIB_SRC_C to list of object files - variants: enable help and help("modules") on standard and dev - Makefile: disable error compression on arm-linux-gnueabi-gcc windows port: - Makefile: add .exe extension to executables name - appveyor: update to VS 2017 and use Python 3.8 for build/test zephyr port: - machine_spi: add support for hardware SPI
2021-10-14 15:38:41 -04:00
shared/timeutils/timeutils.c \
shared/runtime/buffer_helper.c \
shared/runtime/context_manager_helpers.c \
shared/runtime/interrupt_char.c \
shared/runtime/pyexec.c \
shared/runtime/stdout_helpers.c \
shared/runtime/sys_stdio_mphal.c
ifeq ($(CIRCUITPY_QRIO),1)
SRC_CIRCUITPY_COMMON += lib/quirc/lib/decode.c lib/quirc/lib/identify.c lib/quirc/lib/quirc.c lib/quirc/lib/version_db.c
$(BUILD)/lib/quirc/lib/%.o: CFLAGS += -Wno-shadow -Wno-sign-compare -include shared-module/qrio/quirc_alloc.h
endif
2019-12-10 17:57:17 -05:00
ifdef LD_TEMPLATE_FILE
# Generate a linker script (.ld file) from a template, for those builds that use it.
GENERATED_LD_FILE = $(BUILD)/$(notdir $(patsubst %.template.ld,%.ld,$(LD_TEMPLATE_FILE)))
#
# ld_defines.pp is generated from ld_defines.c. See py/mkrules.mk.
# Run gen_ld_files.py over ALL *.template.ld files, not just LD_TEMPLATE_FILE,
# because it may include other template files.
$(GENERATED_LD_FILE): $(BUILD)/ld_defines.pp boards/*.template.ld
$(STEPECHO) "GEN $@"
$(Q)$(PYTHON) $(TOP)/tools/gen_ld_files.py --defines $< --out_dir $(BUILD) boards/*.template.ld
2019-12-10 17:57:17 -05:00
endif
.PHONY: check-release-needs-clean-build
check-release-needs-clean-build:
@echo "RELEASE_NEEDS_CLEAN_BUILD = $(RELEASE_NEEDS_CLEAN_BUILD)"
2022-05-27 15:59:54 -04:00
# Ignore these errors
$(BUILD)/lib/libm/kf_rem_pio2.o: CFLAGS += -Wno-maybe-uninitialized