2019-10-30 17:00:09 +11:00
|
|
|
PROG ?= micropython-coverage
|
2019-10-23 11:20:07 +11:00
|
|
|
|
2020-04-03 12:55:14 +11:00
|
|
|
# Disable optimisations and enable assert() on coverage builds.
|
|
|
|
DEBUG ?= 1
|
2019-10-23 11:20:07 +11:00
|
|
|
|
2020-01-24 11:51:21 +11:00
|
|
|
CFLAGS += \
|
2019-10-23 11:20:07 +11:00
|
|
|
-fprofile-arcs -ftest-coverage \
|
2020-04-09 13:59:11 +02:00
|
|
|
-Wformat -Wmissing-declarations -Wmissing-prototypes \
|
2019-10-23 11:20:07 +11:00
|
|
|
-Wold-style-definition -Wpointer-arith -Wshadow -Wuninitialized -Wunused-parameter \
|
2020-10-21 11:13:47 +02:00
|
|
|
-DMICROPY_UNIX_COVERAGE \
|
2023-08-15 11:54:48 -05:00
|
|
|
-DMICROPY_CPYTHON_EXCEPTION_CHAIN=1 \
|
2020-10-21 11:13:47 +02:00
|
|
|
-DMODULE_CEXAMPLE_ENABLED=1 -DMODULE_CPPEXAMPLE_ENABLED=1
|
2019-10-23 11:20:07 +11:00
|
|
|
|
2020-01-24 11:51:21 +11:00
|
|
|
LDFLAGS += -fprofile-arcs -ftest-coverage
|
2019-10-23 11:20:07 +11:00
|
|
|
|
2020-06-09 16:45:17 +10:00
|
|
|
FROZEN_MANIFEST ?= $(VARIANT_DIR)/manifest.py
|
2020-10-21 11:13:47 +02:00
|
|
|
USER_C_MODULES = $(TOP)/examples/usercmodule
|
2019-10-23 11:20:07 +11:00
|
|
|
|
|
|
|
MICROPY_VFS_FAT = 1
|
|
|
|
MICROPY_VFS_LFS1 = 1
|
|
|
|
MICROPY_VFS_LFS2 = 1
|
2021-05-04 11:40:55 -07:00
|
|
|
|
2021-08-05 11:12:07 -05:00
|
|
|
SRC_QRIO := $(patsubst ../../%,%,$(wildcard ../../shared-bindings/qrio/*.c ../../shared-module/qrio/*.c ../../lib/quirc/lib/*.c))
|
|
|
|
SRC_C += $(SRC_QRIO)
|
|
|
|
|
|
|
|
CFLAGS += -DCIRCUITPY_QRIO=1
|
|
|
|
$(BUILD)/lib/quirc/lib/%.o: CFLAGS += -Wno-shadow -Wno-sign-compare -include shared-module/qrio/quirc_alloc.h
|
|
|
|
|
2021-11-12 10:30:40 -06:00
|
|
|
SRC_BITMAP := \
|
|
|
|
shared/runtime/context_manager_helpers.c \
|
|
|
|
displayio_min.c \
|
2023-06-28 09:59:57 -05:00
|
|
|
shared-bindings/__future__/__init__.c \
|
2021-11-28 15:14:47 -06:00
|
|
|
shared-bindings/aesio/aes.c \
|
|
|
|
shared-bindings/aesio/__init__.c \
|
2023-04-01 10:19:44 -05:00
|
|
|
shared-bindings/audiocore/__init__.c \
|
|
|
|
shared-bindings/audiocore/RawSample.c \
|
|
|
|
shared-bindings/audiocore/WaveFile.c \
|
2023-04-05 08:51:55 -05:00
|
|
|
shared-bindings/audiomixer/__init__.c \
|
|
|
|
shared-bindings/audiomixer/Mixer.c \
|
|
|
|
shared-bindings/audiomixer/MixerVoice.c \
|
2021-11-12 17:07:00 -06:00
|
|
|
shared-bindings/bitmaptools/__init__.c \
|
2021-11-12 10:30:40 -06:00
|
|
|
shared-bindings/displayio/Bitmap.c \
|
2021-11-12 17:07:00 -06:00
|
|
|
shared-bindings/rainbowio/__init__.c \
|
2023-03-22 09:35:01 -05:00
|
|
|
shared-bindings/struct/__init__.c \
|
2023-04-01 10:19:44 -05:00
|
|
|
shared-bindings/synthio/__init__.c \
|
2023-05-17 16:15:31 -05:00
|
|
|
shared-bindings/synthio/Math.c \
|
2023-04-01 10:19:44 -05:00
|
|
|
shared-bindings/synthio/MidiTrack.c \
|
2023-05-15 10:49:42 -05:00
|
|
|
shared-bindings/synthio/LFO.c \
|
2023-05-01 09:41:05 -05:00
|
|
|
shared-bindings/synthio/Note.c \
|
2023-05-29 09:50:18 -05:00
|
|
|
shared-bindings/synthio/Biquad.c \
|
2023-04-02 20:37:23 -05:00
|
|
|
shared-bindings/synthio/Synthesizer.c \
|
2021-12-02 11:11:11 +05:30
|
|
|
shared-bindings/traceback/__init__.c \
|
2021-11-12 17:07:00 -06:00
|
|
|
shared-bindings/util.c \
|
2022-02-21 10:24:13 -06:00
|
|
|
shared-bindings/zlib/__init__.c \
|
2021-11-28 15:14:47 -06:00
|
|
|
shared-module/aesio/aes.c \
|
|
|
|
shared-module/aesio/__init__.c \
|
2023-04-01 10:19:44 -05:00
|
|
|
shared-module/audiocore/__init__.c \
|
|
|
|
shared-module/audiocore/RawSample.c \
|
|
|
|
shared-module/audiocore/WaveFile.c \
|
2023-04-05 08:51:55 -05:00
|
|
|
shared-module/audiomixer/__init__.c \
|
|
|
|
shared-module/audiomixer/Mixer.c \
|
|
|
|
shared-module/audiomixer/MixerVoice.c \
|
2021-11-12 17:07:00 -06:00
|
|
|
shared-module/bitmaptools/__init__.c \
|
2021-11-12 10:30:40 -06:00
|
|
|
shared-module/displayio/area.c \
|
|
|
|
shared-module/displayio/Bitmap.c \
|
|
|
|
shared-module/displayio/ColorConverter.c \
|
2021-11-12 17:07:00 -06:00
|
|
|
shared-module/displayio/ColorConverter.c \
|
2022-12-08 15:21:20 -06:00
|
|
|
shared-module/os/getenv.c \
|
2021-11-12 17:07:00 -06:00
|
|
|
shared-module/rainbowio/__init__.c \
|
2023-03-22 09:35:01 -05:00
|
|
|
shared-module/struct/__init__.c \
|
2023-04-01 10:19:44 -05:00
|
|
|
shared-module/synthio/__init__.c \
|
2023-05-17 16:15:31 -05:00
|
|
|
shared-module/synthio/Math.c \
|
2023-04-01 10:19:44 -05:00
|
|
|
shared-module/synthio/MidiTrack.c \
|
2023-05-15 10:49:42 -05:00
|
|
|
shared-module/synthio/LFO.c \
|
2023-05-01 09:41:05 -05:00
|
|
|
shared-module/synthio/Note.c \
|
2023-05-29 09:50:18 -05:00
|
|
|
shared-module/synthio/Biquad.c \
|
2023-04-02 20:37:23 -05:00
|
|
|
shared-module/synthio/Synthesizer.c \
|
2022-02-21 10:24:13 -06:00
|
|
|
shared-module/traceback/__init__.c \
|
|
|
|
shared-module/zlib/__init__.c \
|
2021-11-12 10:30:40 -06:00
|
|
|
|
|
|
|
SRC_C += $(SRC_BITMAP)
|
|
|
|
|
2021-12-02 11:11:11 +05:30
|
|
|
CFLAGS += \
|
|
|
|
-DCIRCUITPY_AESIO=1 \
|
2023-04-01 10:19:44 -05:00
|
|
|
-DCIRCUITPY_AUDIOCORE=1 \
|
2023-04-05 08:51:55 -05:00
|
|
|
-DCIRCUITPY_AUDIOMIXER=1 \
|
2023-04-01 10:19:44 -05:00
|
|
|
-DCIRCUITPY_AUDIOCORE_DEBUG=1 \
|
2021-12-02 11:11:11 +05:30
|
|
|
-DCIRCUITPY_BITMAPTOOLS=1 \
|
|
|
|
-DCIRCUITPY_DISPLAYIO_UNIX=1 \
|
2023-06-28 09:59:57 -05:00
|
|
|
-DCIRCUITPY_FUTURE=1 \
|
2021-12-02 11:11:11 +05:30
|
|
|
-DCIRCUITPY_GIFIO=1 \
|
2023-04-01 10:19:44 -05:00
|
|
|
-DCIRCUITPY_OS_GETENV=1 \
|
2021-12-02 11:11:11 +05:30
|
|
|
-DCIRCUITPY_RAINBOWIO=1 \
|
2023-03-22 09:35:01 -05:00
|
|
|
-DCIRCUITPY_STRUCT=1 \
|
2023-04-01 10:19:44 -05:00
|
|
|
-DCIRCUITPY_SYNTHIO=1 \
|
|
|
|
-DCIRCUITPY_SYNTHIO_MAX_CHANNELS=14 \
|
2022-02-21 10:24:13 -06:00
|
|
|
-DCIRCUITPY_TRACEBACK=1 \
|
|
|
|
-DCIRCUITPY_ZLIB=1
|
Implement gifio.GifWriter
This involves:
* Adding a new "L8" colorspace for colorconverters
* factoring out displayio_colorconverter_convert_pixel
* Making a minimal "colorspace only" version of displayio for the
unix port (testing purposes)
* fixing an error message
I only tested writing B&W animated images, with the following script:
```python
import displayio
import gifio
with gifio.GifWriter("foo.gif", 64, 64, displayio.Colorspace.L8) as g:
for i in range(0, 256, 14):
data = bytes([i, 255-i] * 32 + [255-i, i] * 32) * 32
print("add_frame")
g.add_frame(data)
# expected to raise an error, buffer is not big enough
with gifio.GifWriter("/dev/null", 64, 64, displayio.Colorspace.L8) as g:
g.add_frame(bytes([3,3,3]))
```
2021-10-21 11:45:11 -05:00
|
|
|
|
2020-10-29 17:33:34 +11:00
|
|
|
SRC_C += coverage.c
|
|
|
|
SRC_CXX += coveragecpp.cpp
|