aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2017-01-22lib/utils: Remove old pyhelp helper, replaced with py/builtinhelp.c.Damien George
Ports should no longer use pyhelp_print_obj but instead should define MICROPY_PY_BUILTINS_HELP to 1 and then specify their help text using MICROPY_PY_BUILTINS_HELP_TEXT.
2016-12-15lib/utils/interrupt_char: Use core-provided mp_kbd_exception if enabled.Damien George
Ultimately all ports that use lib/utils/interrupt_char would enable MICROPY_KBD_EXCEPTION, so this is an interim solution.
2016-11-03lib/libm: Move Thumb-specific sqrtf function to separate file.Damien George
This allows it to be used only when the hardware supports VFP instructions, preventing compile errors.
2016-10-26zephyr: Fix mp_hal_set_interrupt_char() declaration to be compatible.Paul Sokolovsky
With other ports. Other ports declare it in mphalport.h, it can be inline or macro.
2016-10-26lib/utils/pyexec: Fix compilation warning of type vs format mismatch.Paul Sokolovsky
This happens with some compilers on some architectures, which don't define size_t as unsigned int. MicroPython's printf() dooesn't support obscure format specifiers for size_t, so the obvious choice is to explicitly cast to unsigned, to match %u used in printf().
2016-10-26lib/utils/pyexec: Add mp_hal_set_interrupt_char() prototype.Vincenzo Frascino
This patch removes a compilation warning in pyexec. Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2016-10-21lib/utils/pyhelp.c: Use mp_printf() instead of printf()Erik Moqvist
This patch introduces MP_PYTHON_PRINTER for general use.
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-17lib/utils/pyexec: Allow behaviour of SystemExit to be configurable.Damien George
Setting the pyexec_system_exit variable to PYEXEC_FORCED_EXT allows SystemExit exceptions to terminate the pyexec functions.
2016-10-14py/vstr: Combine vstr_new_size with vstr_new since they are rarely used.Damien George
Now there is just one function to allocate a new vstr, namely vstr_new (in addition to vstr_init etc). The caller of this function should know what initial size to allocate for the buffer, or at least have some policy or config option, instead of leaving it to a default (as it was before).
2016-10-12lib/utils/pyexec: Don't treat SystemExit as "forced exit".Paul Sokolovsky
"Forced exit" is treated as soft-reboot (Ctrl+D). But expected effect of calling sys.exit() is termination of the current script, not any further and more serious actions like mentioned soft reboot.
2016-09-30lib/cmsis: upgrade CMSIS-CORE to V4.30Krzysztof Blazewicz
2016-09-30lib/cmsis: remove CMSIS-DSP headers, they are unusedKrzysztof Blazewicz
2016-09-30lib/cmsis: move CMSIS headers to lib/Krzysztof Blazewicz
Files in lib/cmsis are generic for all Cortex-M MCU's files left in stmhal/cmsis are all STM32 specific.
2016-09-29lib/interrupt_char: Factor out typical Ctrl+C handling from esp8266 port.Paul Sokolovsky
Utility functions for keyboard interrupt handling, to be reused across (baremetal) ports.
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-30lib/utils/pyexec: qstr_pool_info() requires size_t* parameters.Paul Sokolovsky
2016-08-25lib/berkeley-db-1.xx: Update to upstream, fixes MacOSX build.Paul Sokolovsky
2016-08-25lib/utils/stdout_helpers: Fix function signature to match py/mphal.h.Paul Sokolovsky
2016-08-09lib/berkeley-db-1.xx: Update, sets default page size to 4096.Paul Sokolovsky
This both good default for 4096 and makes less chance to see overflow page issues.
2016-07-31lib/berkeley-db-1.xx: Switch to "embedded" branch.Paul Sokolovsky
It allows to access files via a virtual method tables and thus can integrate with MicroPython's stream objects.
2016-07-30lib/abort_.c: Add prototype to make coverage build happy.Paul Sokolovsky
2016-07-30lib/embed/abort_: Implementation of abort_() function raising uPy exception.Paul Sokolovsky
Helpful when porting existing C libraries to MicroPython. abort()ing in embedded environment isn't a good idea, so when compiling such library, -Dabort=abort_ option can be given to redirect standard abort() to this "safe" version.
2016-07-22lib/utils/stdout_helpers: Move from minimal/uart_extra.c for reuse.Paul Sokolovsky
2016-07-21lib/utils/pyexec: Use full path to readline.h header, per latest conventions.Paul Sokolovsky
2016-07-11lib/axtls: Update, fixes esp8266 build.Paul Sokolovsky
2016-07-10lib/axtls: Upgrade to axTLS 1.5.4 + MicroPython patchset.Paul Sokolovsky
2016-06-25lib/libm: Remove unused definition of "one".Damien George
2016-06-25lib/libm: Format code to pass gcc v6.1.1 warning.Damien George
gcc 6.1.1 warns when indentation is misleading, and in this case the formatting of the code really is misleading. So adjust the formatting to be clear of the meaning of the code.
2016-06-15lib/fatfs/option/ccsbcs: Follow uPy optional features model.Paul Sokolovsky
Don't error out when options is not what you support, just skip your code. This allows to make FatFs support properly configurable.
2016-06-15lib/berkeley-db-1.xx: Update to upstream which builds for uPy.Paul Sokolovsky
Applied "official" patches and fixed various warnings when built with uPy's compile options.
2016-06-14lib/berkeley-db-1.xx: Add Berkeley DB 1.85 as a submodule.Paul Sokolovsky
From https://github.com/pfalcon/berkeley-db-1.xx, which so far contains pristine 1.85, but will get patches and compile warning fixes going forward. Berkeley DB 1.xx is BSD-licensed, and will form the basis of "btree" simple database module.
2016-06-03lib/timeutils/timeutils: Fix pedantic warning in coverage build.Paul Sokolovsky
2016-06-02lib/timeutils/timeutils: timeutils_mktime may accept negative time values.Paul Sokolovsky
And will normalize them.
2016-05-02lib/libc/string0: Remove better-than-standard strncpy() implementation.Paul Sokolovsky
ANSI C doesn't require that strncpy() produced null-terminated string, so it's basicly useless for string manipulation.
2016-05-02lib/libc/string0: Add strncpy() implementation.Paul Sokolovsky
2016-05-01lib/axtls: Update to the latest upstream, fix reported MacOSX build issue.Paul Sokolovsky
2016-04-27lib/timeutils/timeutils: Typo fix in comment.Paul Sokolovsky
2016-04-25lib/utils/pyhelp: Extract implementation of help(obj) to a library function.Colin Hogben
Several ports use identical code for the 1-argument form of the builtin help function. Move this code to a library function to allow easier re-use by ports.
2016-04-19lib/utils/pyexec: Condition-out GC calls from pyexec.Colin Hogben
A port which uses lib/utils/pyexec.c but which does not enable garbage collection should not need to implement the gc_collect function. This patch also moves the gc_collect call to after printing the qstr info. Since qstrs cannot be collected it should not make any difference to the printed statistics.
2016-04-13py: Add ability to have frozen persistent bytecode from .mpy files.Damien George
The config variable MICROPY_MODULE_FROZEN is now made of two separate parts: MICROPY_MODULE_FROZEN_STR and MICROPY_MODULE_FROZEN_MPY. This allows to have none, either or both of frozen strings and frozen mpy files (aka frozen bytecode).
2016-04-13lib/utils/printf: Rework overriding printer of DEBUG_printf().Paul Sokolovsky
By default it uses mp_plat_print, but a port may override it to another value with MICROPY_DEBUG_PRINTER_DEST.
2016-04-08lib/axtls: Update to the latest upstream master.Paul Sokolovsky
2016-04-01esp8266: Disallow recursive calls to REPL.Paul Sokolovsky
Before this change, if REPL blocked executing some code, it was possible to still input new statememts and excuting them, all leading to weird, and portentially dangerous interaction. TODO: Current implementation may have issues processing input accumulated while REPL was blocked.
2016-03-30esp8266: Fix issue when current repl line was garbage-collected.Paul Sokolovsky
Reference it from root pointers section.
2016-02-10lib/fatfs: Add support for sector sizes larger than 512 bytes.Damien George
If MICROPY_FATFS_MAX_SS is defined to power of 2 value between 1024 and 4096, support for dynamic sector size in FatFs will be enabled. Note that FatFs reserves static buffer of MICROPY_FATFS_MAX_SS size for each filesystem in use, so that value should be set sparingly. Initial patch provided by @pfalcon.
2015-12-31lib/libc/string0: Use uintptr_t instead of uint32_t.Damien George
This makes the code portable to non-32-bit architectures.
2015-12-26lib/utils: Add pyexec_frozen_module to load and execute frozen module.Damien George
This is a convenience function similar to pyexec_file. It should be used instead of raw mp_parse_compile_execute because the latter does not catch and report exceptions.
2015-12-18lib/libm: Allow math funcs to be used by non-Thumb archs.Damien George
Requires addition of software implementation of sqrtf function.
2015-12-12lib/utils/printf: Add vsnprintf alias for Clang.Paul Sokolovsky
Was reported to break MacOSX build.