aboutsummaryrefslogtreecommitdiff
path: root/minimal
AgeCommit message (Collapse)Author
2017-09-06ports: Make new ports/ sub-directory and move all ports there.Damien George
This is to keep the top-level directory clean, to make it clear what is core and what is a port, and to allow the repository to grow with new ports in a sustainable way.
2017-08-21all: Make static dicts use mp_rom_map_elem_t type and MP_ROM_xxx macros.Damien George
2017-08-11all: Make use of $(TOP) variable in Makefiles, instead of "..".Damien George
$(TOP) is defined in py/mkenv.mk and should be used to refer to the top level of this repository.
2017-08-11minimal,esp8266,pic16bit: Remove unused stmhal include from Makefile.Damien George
2017-07-31all: Use the name MicroPython consistently in commentsAlexander Steffen
There were several different spellings of MicroPython present in comments, when there should be only one.
2017-07-21minimal/Makefile: Enable gc-sections to remove unused code.Damien George
2017-07-19all: Remove trailing spaces, per coding conventions.Damien George
2017-06-28esp8266,minimal,pic16bit: Use size_t for mp_builtin_open argument.Alexander Steffen
py/builtin.h declares mp_builtin_open with the first argument of type size_t. Make all implementations conform to this declaration.
2017-04-22py: Add LOAD_SUPER_METHOD bytecode to allow heap-free super meth calls.Damien George
This patch allows the following code to run without allocating on the heap: super().foo(...) Before this patch such a call would allocate a super object on the heap and then load the foo method and call it right away. The super object is only needed to perform the lookup of the method and not needed after that. This patch makes an optimisation to allocate the super object on the C stack and discard it right after use. Changes in code size due to this patch are: bare-arm: +128 minimal: +232 unix x64: +416 unix nanbox: +364 stmhal: +184 esp8266: +340 cc3200: +128
2017-04-18minimal/main: Make Cortex-M vector table constant.Damien George
2017-04-01all: Move BYTES_PER_WORD definition from ports to py/mpconfig.hDamien George
It can still be overwritten by a port in mpconfigport.h but for almost all cases one can use the provided default.
2017-03-31all: Use full path name when including mp-readline/timeutils/netutils.Damien George
This follows the pattern of how all other headers are now included, and makes it explicit where the header file comes from. This patch also removes -I options from Makefile's that specify the mp-readline/timeutils/ netutils directories, which are no longer needed.
2017-03-23minimal/Makefile: Change C standard from gnu99 to c99.Damien George
2017-03-23all/Makefile: Remove -ansi from GCC flags, its ignored anyway.Krzysztof Blazewicz
The -ansi flag is used for C dialect selection and it is equivalent to -std=c90. Because it goes right before -std=gnu99 it is ignored as for conflicting flags GCC always uses the last one.
2017-03-14minimal/main: Move lexer constructor to within NLR handler block.Damien George
And raise an exception when mp_lexer_new_from_file is called.
2017-03-06py/nlr.h: Mark nlr_jump_fail as NORETURN.Damien George
2017-02-27minimal: Add ability and description to build without the compiler.Damien George
2017-02-17minimal: Update frozentest.mpy file for new .mpy version.Damien George
2016-10-22minimal/Makefile: Split rule for firmware.bin generation.Paul Sokolovsky
2016-10-21py: Be more specific with MP_DECLARE_CONST_FUN_OBJ macros.Damien George
In order to have more fine-grained control over how builtin functions are constructed, the MP_DECLARE_CONST_FUN_OBJ macros are made more specific, with suffix of _0, _1, _2, _3, _VAR, _VAR_BETEEN or _KW. These names now match the MP_DEFINE_CONST_FUN_OBJ macros.
2016-09-05py: Add MICROPY_USE_INTERNAL_PRINTF option, defaults to enabled.Delio Brignoli
This new config option allows to control whether MicroPython uses its own internal printf or not (if not, an external one should be linked in). Accompanying this new option is the inclusion of lib/utils/printf.c in the core list of source files, so that ports no longer need to include it themselves.
2016-08-15ports: Remove typedef of machine_ptr_t, it's no longer needed.Damien George
This type was used only for the typedef of mp_obj_t, which is now defined by the object representation. So we can now remove this unused typedef, to simplify the mpconfigport.h file.
2016-07-22lib/utils/stdout_helpers: Move from minimal/uart_extra.c for reuse.Paul Sokolovsky
2016-07-21minimal: Disable MICROPY_GC_ALLOC_THRESHOLD.Paul Sokolovsky
2016-04-16minimal: For frozen bytecode generation, add dependency of qstr file.Damien George
2016-04-13minimal: Add example of frozen persistent bytecode (.mpy file).Damien George
frozentest.py is frozen into the binary as frozen bytecode. The .mpy file is included so that there is no dependency on the cross compiler.
2016-04-13ports: Disable async/await on bare-arm, minimal, pic16bit, cc3200.Damien George
It costs 1188 bytes of code on Thumb 2 archs.
2016-01-07minimal: Add enough code to run minimal build on STM32F4xx hardware.Damien George
Minimal support code for a Cortex-M CPU is added, along with set-up code for an STM32F4xx MCU, including a UART for a REPL. Tested on a pyboard. Code size is 77592 bytes.
2015-12-07py: Add MICROPY_PY_BUILTINS_MIN_MAX, disable for minimal ports.pohmelie
2015-11-10lib/utils/printf: Move from stmhal/ .Paul Sokolovsky
This file contains various MicroPython-specific helper functions, so isn't good fit for lib/libc/.
2015-11-09lib/pyexec: Move header pyexec.h from stmhal directory.Damien George
2015-11-07minimal: Clarify comments.Paul Sokolovsky
2015-11-04minimal: Add an explicit comment on the gchelper.s line in the Makefile.Dave Hylands
2015-10-31stmhal: pyexec.c is common module, move to lib/utils/ .Paul Sokolovsky
2015-10-31all: Add py/mphal.h and use it in all ports.Damien George
py/mphal.h contains declarations for generic mp_hal_XXX functions, such as stdio and delay/ticks, which ports should provide definitions for. A port will also provide mphalport.h with further HAL declarations.
2015-10-29minimal: Use mp_hal_ticks_ms().Paul Sokolovsky
2015-10-24Makefiles: Remove duplicate object files when linking.Paul Sokolovsky
Scenario: module1 depends on some common file from lib/, so specifies it in its SRC_MOD, and the same situation with module2, then common file from lib/ eventually ends up listed twice in $(OBJ), which leads to link errors. Make is equipped to deal with such situation easily, quoting the manual: "The value of $^ omits duplicate prerequisites, while $+ retains them and preserves their order." So, just use $^ consistently in all link targets.
2015-10-19all: Make netutils.h available to all ports by default.Paul Sokolovsky
Generally, ports should inherit INC from py.mk, append to it, not overwrite it. TODO: Likely should do the same for other vars too.
2015-10-02minimal: Tune parser chunk allocation policy for very small heap.Damien George
2015-10-02py: Allocate parse nodes in chunks to reduce fragmentation and RAM use.Damien George
With this patch parse nodes are allocated sequentially in chunks. This reduces fragmentation of the heap and prevents waste at the end of individually allocated parse nodes. Saves roughly 20% of RAM during parse stage.
2015-08-20py: Add MICROPY_PY_BUILTINS_FILTER, disable for minimal ports.Paul Sokolovsky
Saves 320 bytes on x86.
2015-08-02minimal: Use 1 byte for qstr hash, to make port more minimal.Damien George
2015-06-22bare-arm, minimal, qemu-arm: Make do_str() take parse-input-kind as arg.Damien George
The do_str() function is provided essentially as documentation to show how to compile and execute a string. This patch makes do_str take an extra arg to specify how the string should be interpreted: either as a single line (ie from a REPL) or as multiple lines (ie from a file).
2015-06-20py: Use a wrapper to explicitly check self argument of builtin methods.Damien George
Previous to this patch a call such as list.append(1, 2) would lead to a seg fault. This is because list.append is a builtin method and the first argument to such methods is always assumed to have the correct type. Now, when a builtin method is extracted like this it is wrapped in a checker object which checks the the type of the first argument before calling the builtin function. This feature is contrelled by MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG and is enabled by default. See issue #1216.
2015-05-06pyexec: Make raw REPL work with event-driven version of pyexec.Damien George
esp8266 port now has working raw and friendly REPL, as well as working soft reset (CTRL-D at REPL, or raise SystemExit). tools/pyboard.py now works with esp8266 port.
2015-04-21py: Add attrtuple object, for space-efficient tuples with attr access.Damien George
If you need the functionality of a namedtuple but will only make 1 or a few instances, then use an attrtuple instead.
2015-04-16py: Overhaul and simplify printf/pfenv mechanism.Damien George
Previous to this patch the printing mechanism was a bit of a tangled mess. This patch attempts to consolidate printing into one interface. All (non-debug) printing now uses the mp_print* family of functions, mainly mp_printf. All these functions take an mp_print_t structure as their first argument, and this structure defines the printing backend through the "print_strn" function of said structure. Printing from the uPy core can reach the platform-defined print code via two paths: either through mp_sys_stdout_obj (defined pert port) in conjunction with mp_stream_write; or through the mp_plat_print structure which uses the MP_PLAT_PRINT_STRN macro to define how string are printed on the platform. The former is only used when MICROPY_PY_IO is defined. With this new scheme printing is generally more efficient (less layers to go through, less arguments to pass), and, given an mp_print_t* structure, one can call mp_print_str for efficiency instead of mp_printf("%s", ...). Code size is also reduced by around 200 bytes on Thumb2 archs.
2015-04-07py: Add MICROPY_PY_BUILTINS_REVERSED, disable for minimal ports.Paul Sokolovsky
2015-04-06py: Add MICROPY_PY_BUILTINS_ENUMERATE, disable for minimal ports.Paul Sokolovsky
2015-04-05string0.c: Move from stmhal/ to lib/.Paul Sokolovsky