mirror of
https://github.com/micropython/micropython.git
synced 2025-09-05 01:10:36 +02:00
Some checks are pending
JavaScript code lint and formatting with Biome / eslint (push) Waiting to run
Check code formatting / code-formatting (push) Waiting to run
Check code size / build (push) Waiting to run
Check spelling with codespell / codespell (push) Waiting to run
Check commit message formatting / build (push) Waiting to run
Build docs / build (push) Waiting to run
Check examples / embedding (push) Waiting to run
Package mpremote / build (push) Waiting to run
.mpy file format and tools / test (push) Waiting to run
Build ports metadata / build (push) Waiting to run
cc3200 port / build (push) Waiting to run
esp32 port / build_idf (esp32_build_cmod_spiram_s2) (push) Waiting to run
esp32 port / build_idf (esp32_build_s3_c3) (push) Waiting to run
esp8266 port / build (push) Waiting to run
mimxrt port / build (push) Waiting to run
nrf port / build (push) Waiting to run
powerpc port / build (push) Waiting to run
qemu port / build_and_test_arm (push) Waiting to run
qemu port / build_and_test_rv32 (push) Waiting to run
renesas-ra port / build_renesas_ra_board (push) Waiting to run
rp2 port / build (push) Waiting to run
samd port / build (push) Waiting to run
stm32 port / build_stm32 (stm32_misc_build) (push) Waiting to run
stm32 port / build_stm32 (stm32_nucleo_build) (push) Waiting to run
stm32 port / build_stm32 (stm32_pyb_build) (push) Waiting to run
unix port / minimal (push) Waiting to run
unix port / reproducible (push) Waiting to run
unix port / standard (push) Waiting to run
unix port / standard_v2 (push) Waiting to run
unix port / coverage (push) Waiting to run
unix port / coverage_32bit (push) Waiting to run
unix port / nanbox (push) Waiting to run
unix port / float (push) Waiting to run
unix port / stackless_clang (push) Waiting to run
unix port / float_clang (push) Waiting to run
unix port / settrace (push) Waiting to run
unix port / settrace_stackless (push) Waiting to run
unix port / macos (push) Waiting to run
unix port / qemu_mips (push) Waiting to run
unix port / qemu_arm (push) Waiting to run
unix port / qemu_riscv64 (push) Waiting to run
webassembly port / build (push) Waiting to run
windows port / build-vs (Debug, x64, windows-2022, dev, 2022, [17, 18)) (push) Waiting to run
windows port / build-vs (Debug, x64, windows-latest, dev, 2017, [15, 16)) (push) Waiting to run
windows port / build-vs (Debug, x86, windows-2022, dev, 2022, [17, 18)) (push) Waiting to run
windows port / build-vs (Debug, x86, windows-latest, dev, 2017, [15, 16)) (push) Waiting to run
windows port / build-vs (Release, x64, windows-2019, dev, 2019, [16, 17)) (push) Waiting to run
windows port / build-vs (Release, x64, windows-2019, standard, 2019, [16, 17)) (push) Waiting to run
windows port / build-vs (Release, x64, windows-2022, dev, 2022, [17, 18)) (push) Waiting to run
windows port / build-vs (Release, x64, windows-2022, standard, 2022, [17, 18)) (push) Waiting to run
windows port / build-vs (Release, x64, windows-latest, dev, 2017, [15, 16)) (push) Waiting to run
windows port / build-vs (Release, x64, windows-latest, standard, 2017, [15, 16)) (push) Waiting to run
windows port / build-vs (Release, x86, windows-2019, dev, 2019, [16, 17)) (push) Waiting to run
windows port / build-vs (Release, x86, windows-2019, standard, 2019, [16, 17)) (push) Waiting to run
windows port / build-vs (Release, x86, windows-2022, dev, 2022, [17, 18)) (push) Waiting to run
windows port / build-vs (Release, x86, windows-2022, standard, 2022, [17, 18)) (push) Waiting to run
windows port / build-vs (Release, x86, windows-latest, dev, 2017, [15, 16)) (push) Waiting to run
windows port / build-vs (Release, x86, windows-latest, standard, 2017, [15, 16)) (push) Waiting to run
windows port / build-mingw (i686, mingw32, dev) (push) Waiting to run
windows port / build-mingw (i686, mingw32, standard) (push) Waiting to run
windows port / build-mingw (x86_64, mingw64, dev) (push) Waiting to run
windows port / build-mingw (x86_64, mingw64, standard) (push) Waiting to run
windows port / cross-build-on-linux (push) Waiting to run
zephyr port / build (push) Waiting to run
Python code lint and formatting with ruff / ruff (push) Waiting to run
This commit adds a new `RingIO` type which exposes the internal ring-buffer code for general use in Python programs. It has the stream interface making it similar to `StringIO` and `BytesIO`, except `RingIO` has a fixed buffer size and is automatically safe when reads and writes are in different threads or an IRQ. This new type is enabled at the "extra features" ROM level. Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
156 lines
5.0 KiB
CMake
156 lines
5.0 KiB
CMake
# CMake fragment for MicroPython core py component
|
|
|
|
set(MICROPY_PY_DIR "${MICROPY_DIR}/py")
|
|
|
|
list(APPEND MICROPY_INC_CORE "${MICROPY_DIR}")
|
|
|
|
# All py/ source files
|
|
set(MICROPY_SOURCE_PY
|
|
${MICROPY_PY_DIR}/argcheck.c
|
|
${MICROPY_PY_DIR}/asmarm.c
|
|
${MICROPY_PY_DIR}/asmbase.c
|
|
${MICROPY_PY_DIR}/asmrv32.c
|
|
${MICROPY_PY_DIR}/asmthumb.c
|
|
${MICROPY_PY_DIR}/asmx64.c
|
|
${MICROPY_PY_DIR}/asmx86.c
|
|
${MICROPY_PY_DIR}/asmxtensa.c
|
|
${MICROPY_PY_DIR}/bc.c
|
|
${MICROPY_PY_DIR}/binary.c
|
|
${MICROPY_PY_DIR}/builtinevex.c
|
|
${MICROPY_PY_DIR}/builtinhelp.c
|
|
${MICROPY_PY_DIR}/builtinimport.c
|
|
${MICROPY_PY_DIR}/compile.c
|
|
${MICROPY_PY_DIR}/cstack.c
|
|
${MICROPY_PY_DIR}/emitbc.c
|
|
${MICROPY_PY_DIR}/emitcommon.c
|
|
${MICROPY_PY_DIR}/emitglue.c
|
|
${MICROPY_PY_DIR}/emitinlinethumb.c
|
|
${MICROPY_PY_DIR}/emitinlinextensa.c
|
|
${MICROPY_PY_DIR}/emitnarm.c
|
|
${MICROPY_PY_DIR}/emitndebug.c
|
|
${MICROPY_PY_DIR}/emitnrv32.c
|
|
${MICROPY_PY_DIR}/emitnthumb.c
|
|
${MICROPY_PY_DIR}/emitnx64.c
|
|
${MICROPY_PY_DIR}/emitnx86.c
|
|
${MICROPY_PY_DIR}/emitnxtensa.c
|
|
${MICROPY_PY_DIR}/emitnxtensawin.c
|
|
${MICROPY_PY_DIR}/formatfloat.c
|
|
${MICROPY_PY_DIR}/frozenmod.c
|
|
${MICROPY_PY_DIR}/gc.c
|
|
${MICROPY_PY_DIR}/lexer.c
|
|
${MICROPY_PY_DIR}/malloc.c
|
|
${MICROPY_PY_DIR}/map.c
|
|
${MICROPY_PY_DIR}/modarray.c
|
|
${MICROPY_PY_DIR}/modbuiltins.c
|
|
${MICROPY_PY_DIR}/modcmath.c
|
|
${MICROPY_PY_DIR}/modcollections.c
|
|
${MICROPY_PY_DIR}/modgc.c
|
|
${MICROPY_PY_DIR}/modio.c
|
|
${MICROPY_PY_DIR}/modmath.c
|
|
${MICROPY_PY_DIR}/modmicropython.c
|
|
${MICROPY_PY_DIR}/modstruct.c
|
|
${MICROPY_PY_DIR}/modsys.c
|
|
${MICROPY_PY_DIR}/modthread.c
|
|
${MICROPY_PY_DIR}/moderrno.c
|
|
${MICROPY_PY_DIR}/mpprint.c
|
|
${MICROPY_PY_DIR}/mpstate.c
|
|
${MICROPY_PY_DIR}/mpz.c
|
|
${MICROPY_PY_DIR}/nativeglue.c
|
|
${MICROPY_PY_DIR}/nlr.c
|
|
${MICROPY_PY_DIR}/nlrmips.c
|
|
${MICROPY_PY_DIR}/nlrpowerpc.c
|
|
${MICROPY_PY_DIR}/nlrrv32.c
|
|
${MICROPY_PY_DIR}/nlrsetjmp.c
|
|
${MICROPY_PY_DIR}/nlrthumb.c
|
|
${MICROPY_PY_DIR}/nlrx64.c
|
|
${MICROPY_PY_DIR}/nlrx86.c
|
|
${MICROPY_PY_DIR}/nlrxtensa.c
|
|
${MICROPY_PY_DIR}/obj.c
|
|
${MICROPY_PY_DIR}/objarray.c
|
|
${MICROPY_PY_DIR}/objattrtuple.c
|
|
${MICROPY_PY_DIR}/objbool.c
|
|
${MICROPY_PY_DIR}/objboundmeth.c
|
|
${MICROPY_PY_DIR}/objcell.c
|
|
${MICROPY_PY_DIR}/objclosure.c
|
|
${MICROPY_PY_DIR}/objcomplex.c
|
|
${MICROPY_PY_DIR}/objdeque.c
|
|
${MICROPY_PY_DIR}/objdict.c
|
|
${MICROPY_PY_DIR}/objenumerate.c
|
|
${MICROPY_PY_DIR}/objexcept.c
|
|
${MICROPY_PY_DIR}/objfilter.c
|
|
${MICROPY_PY_DIR}/objfloat.c
|
|
${MICROPY_PY_DIR}/objfun.c
|
|
${MICROPY_PY_DIR}/objgenerator.c
|
|
${MICROPY_PY_DIR}/objgetitemiter.c
|
|
${MICROPY_PY_DIR}/objint.c
|
|
${MICROPY_PY_DIR}/objint_longlong.c
|
|
${MICROPY_PY_DIR}/objint_mpz.c
|
|
${MICROPY_PY_DIR}/objlist.c
|
|
${MICROPY_PY_DIR}/objmap.c
|
|
${MICROPY_PY_DIR}/objmodule.c
|
|
${MICROPY_PY_DIR}/objnamedtuple.c
|
|
${MICROPY_PY_DIR}/objnone.c
|
|
${MICROPY_PY_DIR}/objobject.c
|
|
${MICROPY_PY_DIR}/objpolyiter.c
|
|
${MICROPY_PY_DIR}/objproperty.c
|
|
${MICROPY_PY_DIR}/objrange.c
|
|
${MICROPY_PY_DIR}/objreversed.c
|
|
${MICROPY_PY_DIR}/objringio.c
|
|
${MICROPY_PY_DIR}/objset.c
|
|
${MICROPY_PY_DIR}/objsingleton.c
|
|
${MICROPY_PY_DIR}/objslice.c
|
|
${MICROPY_PY_DIR}/objstr.c
|
|
${MICROPY_PY_DIR}/objstringio.c
|
|
${MICROPY_PY_DIR}/objstrunicode.c
|
|
${MICROPY_PY_DIR}/objtuple.c
|
|
${MICROPY_PY_DIR}/objtype.c
|
|
${MICROPY_PY_DIR}/objzip.c
|
|
${MICROPY_PY_DIR}/opmethods.c
|
|
${MICROPY_PY_DIR}/pairheap.c
|
|
${MICROPY_PY_DIR}/parse.c
|
|
${MICROPY_PY_DIR}/parsenum.c
|
|
${MICROPY_PY_DIR}/parsenumbase.c
|
|
${MICROPY_PY_DIR}/persistentcode.c
|
|
${MICROPY_PY_DIR}/profile.c
|
|
${MICROPY_PY_DIR}/pystack.c
|
|
${MICROPY_PY_DIR}/qstr.c
|
|
${MICROPY_PY_DIR}/reader.c
|
|
${MICROPY_PY_DIR}/repl.c
|
|
${MICROPY_PY_DIR}/ringbuf.c
|
|
${MICROPY_PY_DIR}/runtime.c
|
|
${MICROPY_PY_DIR}/runtime_utils.c
|
|
${MICROPY_PY_DIR}/scheduler.c
|
|
${MICROPY_PY_DIR}/scope.c
|
|
${MICROPY_PY_DIR}/sequence.c
|
|
${MICROPY_PY_DIR}/showbc.c
|
|
${MICROPY_PY_DIR}/smallint.c
|
|
${MICROPY_PY_DIR}/stackctrl.c
|
|
${MICROPY_PY_DIR}/stream.c
|
|
${MICROPY_PY_DIR}/unicode.c
|
|
${MICROPY_PY_DIR}/vm.c
|
|
${MICROPY_PY_DIR}/vstr.c
|
|
${MICROPY_PY_DIR}/warning.c
|
|
)
|
|
|
|
# Helper macro to collect include directories and compile definitions for qstr processing.
|
|
macro(micropy_gather_target_properties targ)
|
|
if(TARGET ${targ})
|
|
get_target_property(type ${targ} TYPE)
|
|
set(_inc OFF)
|
|
set(_def OFF)
|
|
if(${type} STREQUAL STATIC_LIBRARY)
|
|
get_target_property(_inc ${targ} INCLUDE_DIRECTORIES)
|
|
get_target_property(_def ${targ} COMPILE_DEFINITIONS)
|
|
elseif(${type} STREQUAL INTERFACE_LIBRARY)
|
|
get_target_property(_inc ${targ} INTERFACE_INCLUDE_DIRECTORIES)
|
|
get_target_property(_def ${targ} INTERFACE_COMPILE_DEFINITIONS)
|
|
endif()
|
|
if(_inc)
|
|
list(APPEND MICROPY_CPP_INC_EXTRA ${_inc})
|
|
endif()
|
|
if(_def)
|
|
list(APPEND MICROPY_CPP_DEF_EXTRA ${_def})
|
|
endif()
|
|
endif()
|
|
endmacro()
|