summaryrefslogtreecommitdiffstatshomepage
path: root/lib
Commit message (Collapse)AuthorAge
* all: Raise exceptions via mp_raise_XXXJavier Candeira2017-08-13
| | | | | | | | - Changed: ValueError, TypeError, NotImplementedError - OSError invocations unchanged, because the corresponding utility function takes ints, not strings like the long form invocation. - OverflowError, IndexError and RuntimeError etc. not changed for now until we decide whether to add new utility functions.
* all: Use the name MicroPython consistently in commentsAlexander Steffen2017-07-31
| | | | | There were several different spellings of MicroPython present in comments, when there should be only one.
* all: Unify header guard usage.Alexander Steffen2017-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code conventions suggest using header guards, but do not define how those should look like and instead point to existing files. However, not all existing files follow the same scheme, sometimes omitting header guards altogether, sometimes using non-standard names, making it easy to accidentally pick a "wrong" example. This commit ensures that all header files of the MicroPython project (that were not simply copied from somewhere else) follow the same pattern, that was already present in the majority of files, especially in the py folder. The rules are as follows. Naming convention: * start with the words MICROPY_INCLUDED * contain the full path to the file * replace special characters with _ In addition, there are no empty lines before #ifndef, between #ifndef and one empty line before #endif. #endif is followed by a comment containing the name of the guard macro. py/grammar.h cannot use header guards by design, since it has to be included multiple times in a single C file. Several other files also do not need header guards as they are only used internally and guaranteed to be included only once: * MICROPY_MPHALPORT_H * mpconfigboard.h * mpconfigport.h * mpthreadport.h * pin_defs_*.h * qstrdefs*.h
* py/repl: Change mp_uint_t to size_t in repl helpers.Damien George2017-07-04
|
* lib: Add libm_dbl, a double-precision math library, from musl-1.1.16.Damien George2017-06-28
|
* stmhal: Move pybstdio.c to lib/utils/sys_stdio_mphal.c for common use.Damien George2017-06-15
| | | | | It provides sys.stdin, sys.stdout, sys.stderr for bare-metal targets based on mp_hal functions.
* lib/libm/math: Remove implementations of float conversion functions.Damien George2017-06-14
| | | | | | | | | These implementations are incorrect (eg f2d and d2f don't handle special values like 0.0) and proper versions can be provided by libgcc (or equivalent depending on the toolchain). libgcc is now linked with the stmhal port so that library will provide these functions from now on.
* lib/axtls: Upgrade to axTLS 2.1.3 + MicroPython patchset.Paul Sokolovsky2017-06-13
| | | | | axTLS 2.1.3 brings support for TLS 1.2 and SNI. With MicroPython patchset on top of it, the code size growth (x86) is ~2K.
* lib/utils/interrupt_char: Remove support for KBD_EXCEPTION disabled.Damien George2017-06-02
| | | | | If a port is using interrupt_char.c then it must enable MICROPY_KBD_EXCEPTION. This is the case for all official ports.
* lib/libm: Use isfinite instead of finitef, for C99 compatibility.Damien George2017-05-31
|
* various: Spelling fixesVille Skyttä2017-05-29
|
* lib/utils/pyexec: Update event-driven REPL to match non-event REPL.Tom Collins2017-05-05
| | | | | Don't print dupe ">>> " prompt when starting event-driven REPL. Clear incomplete line in transition from raw to friendly REPL.
* all: Use full path name when including mp-readline/timeutils/netutils.Damien George2017-03-31
| | | | | | | 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.
* lib/netutils: Update for changes to mp_obj_str_get_data.Damien George2017-03-29
|
* lib/libm: Add implementation of nearbyintf, from musl-1.1.16.Damien George2017-03-24
|
* py: Add micropython.schedule() function and associated runtime code.Damien George2017-03-20
|
* lib/utils/pyexec: Fix bug with pyexec_file not setting flag for source.Damien George2017-03-14
|
* lib/memzip: Make lexer constructor raise exception when file not found.Damien George2017-03-14
|
* lib/utils/pyexec: Refactor to put lexer constructors all in one place.Damien George2017-03-14
| | | | | The lexer can now raise an exception on construction so it must go within an nlr handler block.
* lib/utils/pyexec: Allow to compile when the uPy compiler is disabled.Damien George2017-02-27
|
* lib/oofatfs/ffconf.h: Add MICROPY_FATFS_NORTC option.Andrew Gatt2017-01-31
|
* lib/oofatfs/ffconf.h: Allow to configure FS_EXFAT option.Damien George2017-01-31
| | | | | Using MICROPY_FATFS_EXFAT. Enabling this has licensing implications; see https://www.microsoft.com/en-us/legal/intellectualproperty/mtl/exfat-licensing.aspx
* lib/fatfs: Remove old fatfs library component, it's replaced by oofatfs.Damien George2017-01-30
|
* lib/oofatfs: Update oofatfs library.Damien George2017-01-30
| | | | | From https://github.com/micropython/oofatfs, branch work-R0.12b, commit 46fb53331e7a583c29a41d37ce4b53f2718597e5.
* lib/oofatfs: Update oofatfs library.Damien George2017-01-27
| | | | | From https://github.com/micropython/oofatfs, branch work-R0.12b, commit 1e295b40550664bbaac18d95a4b6a58154464d31.
* lib/oofatfs: Add OO version of FatFS library.Damien George2017-01-27
| | | | | From https://github.com/micropython/oofatfs, branch work-R0.12b, commit a346ccec123c2e4d887e2751d64156208d03bff4.
* lib/utils/pyexec: Only print help prompt if HELP feature is enabled.Damien George2017-01-22
|
* lib/utils: Remove old pyhelp helper, replaced with py/builtinhelp.c.Damien George2017-01-22
| | | | | | 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.
* lib/utils/interrupt_char: Use core-provided mp_kbd_exception if enabled.Damien George2016-12-15
| | | | | Ultimately all ports that use lib/utils/interrupt_char would enable MICROPY_KBD_EXCEPTION, so this is an interim solution.
* lib/libm: Move Thumb-specific sqrtf function to separate file.Damien George2016-11-03
| | | | | This allows it to be used only when the hardware supports VFP instructions, preventing compile errors.
* zephyr: Fix mp_hal_set_interrupt_char() declaration to be compatible.Paul Sokolovsky2016-10-26
| | | | | With other ports. Other ports declare it in mphalport.h, it can be inline or macro.
* lib/utils/pyexec: Fix compilation warning of type vs format mismatch.Paul Sokolovsky2016-10-26
| | | | | | | 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().
* lib/utils/pyexec: Add mp_hal_set_interrupt_char() prototype.Vincenzo Frascino2016-10-26
| | | | | | This patch removes a compilation warning in pyexec. Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
* lib/utils/pyhelp.c: Use mp_printf() instead of printf()Erik Moqvist2016-10-21
| | | | This patch introduces MP_PYTHON_PRINTER for general use.
* py: Be more specific with MP_DECLARE_CONST_FUN_OBJ macros.Damien George2016-10-21
| | | | | | | 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.
* lib/utils/pyexec: Allow behaviour of SystemExit to be configurable.Damien George2016-10-17
| | | | | Setting the pyexec_system_exit variable to PYEXEC_FORCED_EXT allows SystemExit exceptions to terminate the pyexec functions.
* py/vstr: Combine vstr_new_size with vstr_new since they are rarely used.Damien George2016-10-14
| | | | | | | 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).
* lib/utils/pyexec: Don't treat SystemExit as "forced exit".Paul Sokolovsky2016-10-12
| | | | | | "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.
* lib/cmsis: upgrade CMSIS-CORE to V4.30Krzysztof Blazewicz2016-09-30
|
* lib/cmsis: remove CMSIS-DSP headers, they are unusedKrzysztof Blazewicz2016-09-30
|
* lib/cmsis: move CMSIS headers to lib/Krzysztof Blazewicz2016-09-30
| | | | | Files in lib/cmsis are generic for all Cortex-M MCU's files left in stmhal/cmsis are all STM32 specific.
* lib/interrupt_char: Factor out typical Ctrl+C handling from esp8266 port.Paul Sokolovsky2016-09-29
| | | | | Utility functions for keyboard interrupt handling, to be reused across (baremetal) ports.
* py: Add MICROPY_USE_INTERNAL_PRINTF option, defaults to enabled.Delio Brignoli2016-09-05
| | | | | | | | 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.
* lib/utils/pyexec: qstr_pool_info() requires size_t* parameters.Paul Sokolovsky2016-08-30
|
* lib/berkeley-db-1.xx: Update to upstream, fixes MacOSX build.Paul Sokolovsky2016-08-25
|
* lib/utils/stdout_helpers: Fix function signature to match py/mphal.h.Paul Sokolovsky2016-08-25
|
* lib/berkeley-db-1.xx: Update, sets default page size to 4096.Paul Sokolovsky2016-08-09
| | | | | This both good default for 4096 and makes less chance to see overflow page issues.
* lib/berkeley-db-1.xx: Switch to "embedded" branch.Paul Sokolovsky2016-07-31
| | | | | It allows to access files via a virtual method tables and thus can integrate with MicroPython's stream objects.
* lib/abort_.c: Add prototype to make coverage build happy.Paul Sokolovsky2016-07-30
|
* lib/embed/abort_: Implementation of abort_() function raising uPy exception.Paul Sokolovsky2016-07-30
| | | | | | | 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.