aboutsummaryrefslogtreecommitdiff
path: root/minimal/main.c
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-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-18minimal/main: Make Cortex-M vector table constant.Damien George
2017-03-23minimal/Makefile: Change C standard from gnu99 to c99.Damien George
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
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-11-09lib/pyexec: Move header pyexec.h from stmhal directory.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-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-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-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-02-13minimal: Allow to compile without defining MICROPY_HAL_H.Damien George
2015-02-07py: Protect mp_parse and mp_compile with nlr push/pop block.Damien George
To enable parsing constants more efficiently, mp_parse should be allowed to raise an exception, and mp_compile can already raise a MemoryError. So these functions need to be protected by an nlr push/pop block. This patch adds that feature in all places. This allows to simplify how mp_parse and mp_compile are called: they now raise an exception if they have an error and so explicit checking is not needed anymore.
2015-01-16minimal: Make #if indent consistent.Paul Sokolovsky
2015-01-16minimal: Support even-driven REPL.Paul Sokolovsky
2015-01-13minimal: Convert "bare-arm" port to "minimal" port.Paul Sokolovsky
This enable libc functions, GC, and line-editing function. Also, UART emulation for POSIX systems is added. Emulation build is set as default.
2015-01-13minimal: New port, intended to represent minimal working code.Paul Sokolovsky
Unlike bare-arm, which is mostly intended to show raw interpreter size, without library and support code dependencies. This port is intended to be a better base to start new ports, and also will include emulation build to allow debug some aspects of embedded targets on POSIX systems. This initial commit is verbatim copy of bare-arm code.