summaryrefslogtreecommitdiff
path: root/qemu-arm
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-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-06-15qemu-arm/Makefile: Include relevant sources in list for qstr extraction.Damien George
2017-06-15stmhal: Move pybstdio.c to lib/utils/sys_stdio_mphal.c for common use.Damien George
It provides sys.stdin, sys.stdout, sys.stderr for bare-metal targets based on mp_hal functions.
2017-06-06qemu-arm: Enable micropython.mem_*() functions to allow more tests.Paul Sokolovsky
2017-05-29various: Spelling fixesVille Skyttä
2017-05-26qemu-arm/Makefile: Adjust object-file lists to get correct dependencies.Damien George
With this change both the "run" and "test" targets can be built with -j passed to make.
2017-05-10ports: Add ilistdir in uos module.Damien George
2017-04-28qemu-arm, stmhal: Remove dummy memory.h since it's no longer needed.Damien George
extmod/crypto-algorithms/sha256.c was recently fixed so that it didn't include this header.
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-24py/modbuiltins: For round() builtin use nearbyint instead of round.Damien George
The C nearbyint function has exactly the semantics that Python's round() requires, whereas C's round() requires extra steps to handle rounding of numbers half way between integers. So using nearbyint reduces code size and potentially eliminates any source of errors in the handling of half-way numbers. Also, bare-metal implementations of nearbyint can be more efficient than round, so further code size is saved (and efficiency improved). nearbyint is provided in the C99 standard so it should be available on all supported platforms.
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-14qemu-arm: Move lexer constructors to within NLR handler block.Damien George
And raise an exception when mp_lexer_new_from_file is called.
2017-03-13qemu-arm: Add basic uos module with generic VFS capabilities.Damien George
2017-03-06py/nlr.h: Mark nlr_jump_fail as NORETURN.Damien George
2017-03-02qemu-arm: Enable machine module and associated tests.Damien George
2017-02-03qemu-arm/mpconfigport.h: Enable MICROPY_PY_BUILTINS_POW3 option.Damien George
2017-01-27qemu-arm: Don't compile tests in "REPL" mode.Damien George
Previous to this patch the qemu-arm tests were compiled with is_relp=true meaning that the __repl_print__ function was called for all lines of code in the outer scope. This is not the right behaviour for scripts that are executed as though they were a file (eg tests). With this fix the micropython/heapalloc_str.py test now works so it is removed from the test blacklist.
2016-11-03qemu-arm: Enable software floating point support, and float tests.Damien George
This helps to test floating point code on Cortex-M hardware. As part of this patch the link-time-optimisation was disabled because it wasn't compatible with software FP support. In particular, the linker could not find the __aeabi_f2d, __aeabi_d2f etc functions even though they were provided by lib/libm/math.c.
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-10-14qemu-arm: Remove SRC_TEST_C from SRC_QSTR list, it's not needed.Damien George
And it gives problems with header dependencies for auto-qstr generation.
2016-10-14qemu-arm: Enable lots of extmods and enable tests for them.Damien George
The qemu-arm port is used for testing of ARM Thumb architecture on a desktop so should have many features enabled.
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-17qemu-arm: Enable MICROPY_PY_ALL_SPECIAL_METHODS.Damien George
The qemu-arm port is for testing, so should have features enabled.
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-11qemu-arm: Enable gcc LTO option for nlrthumb.cDaniel Tralamazza
LTO can't "see" inside naked functions, but we can mark `nlr_push_tail` as used.
2016-06-28qemu-arm: Disable gcc LTO option for nlrthumb.c.Damien George
If LTO is enabled for nlrthumb.c then gcc optimises away the nlr_push_tail function when in fact it is needed. So disable this option for this file.
2016-06-28py: Add MP_STATE_THREAD to hold state specific to a given thread.Damien George
2016-03-15qemu-arm: Enable builtin override feature, and enable more tests.Damien George
Hopefully these tests run reliably on Travis.
2016-03-15qemu-arm: Reinitialise uPy heap and runtime at start of each test.Damien George
Previous to this patch, all qemu-arm tests were running in the same session, and global variables could be left over from the previous test. This patch makes it so that the heap and runtime are reinitialised at the start of each test.
2016-01-29py/runtime: mp_stack_ctrl_init() should be called immediately on startup.Paul Sokolovsky
Calling it from mp_init() is too late for some ports (like Unix), and leads to incomplete stack frame being captured, with following GC issues. So, now each port should call mp_stack_ctrl_init() on its own, ASAP after startup, and taking special precautions so it really was called before stack variables get allocated (because if such variable with a pointer is missed, it may lead to over-collecting (typical symptom is segfaulting)).
2016-01-11py: Change type signature of builtin funs that take variable or kw args.Damien George
With this patch the n_args parameter is changed type from mp_uint_t to size_t.
2016-01-03py: Change struct and macro for builtin fun so they can be type checked.Damien George
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-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-15py: Remove dependency on printf/fwrite in mp_plat_print.Damien George
See issue #1500.
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-07-20qemu-arm: Enable array slice assignment to get memoryview1 test to pass.Delio Brignoli
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-04-16qemu-arm: Get compiling again with recent changes to print framework.Damien George
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-04stmhal, qemu-arm: Enable sys.maxsize attribute.Damien George
2015-02-28qemu-arm: Handle sys.exit() to allow skip tests in testsuite.Paul Sokolovsky
2015-02-16qemu-arm: Enable source line numbers, for easier debugging.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-12qemu-arm: Enable GC and native code-gen; enable more tests.Damien George
2015-01-09py: Disable stack checking by default; enable on most ports.Damien George