Damien George
4f9858e86d
stmhal: Move pybstdio.c to lib/utils/sys_stdio_mphal.c for common use.
It provides sys.stdin, sys.stdout, sys.stderr for bare-metal targets based
on mp_hal functions.
8 years ago
Damien George
3bedff0b3c
lib/libm/math: Remove implementations of float conversion functions.
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.
8 years ago
Paul Sokolovsky
f01c1c6b35
lib/axtls: Upgrade to axTLS 2.1.3 + MicroPython patchset.
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.
8 years ago
Damien George
ab954ed513
lib/utils/interrupt_char: Remove support for KBD_EXCEPTION disabled.
If a port is using interrupt_char.c then it must enable
MICROPY_KBD_EXCEPTION. This is the case for all official ports.
8 years ago
Damien George
b53a63517a
lib/libm: Use isfinite instead of finitef, for C99 compatibility.
8 years ago
Ville Skyttä
ca16c38210
various: Spelling fixes
8 years ago
Tom Collins
288ea06e7c
lib/utils/pyexec: Update event-driven REPL to match non-event REPL.
Don't print dupe ">>> " prompt when starting event-driven REPL. Clear
incomplete line in transition from raw to friendly REPL.
8 years ago
Damien George
b6c7e4b143
all: Use full path name when including mp-readline/timeutils/netutils.
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.
8 years ago
Damien George
3022e00bbf
lib/netutils: Update for changes to mp_obj_str_get_data.
8 years ago
Damien George
fb161aa45a
lib/libm: Add implementation of nearbyintf, from musl-1.1.16.
8 years ago
Damien George
6e74d24f30
py: Add micropython.schedule() function and associated runtime code.
8 years ago
Damien George
3f7aa330fd
lib/utils/pyexec: Fix bug with pyexec_file not setting flag for source.
8 years ago
Damien George
41b1df6046
lib/memzip: Make lexer constructor raise exception when file not found.
8 years ago
Damien George
56b238393b
lib/utils/pyexec: Refactor to put lexer constructors all in one place.
The lexer can now raise an exception on construction so it must go within
an nlr handler block.
8 years ago
Damien George
3b2fd4df31
lib/utils/pyexec: Allow to compile when the uPy compiler is disabled.
8 years ago
Andrew Gatt
9d3c0d423e
lib/oofatfs/ffconf.h: Add MICROPY_FATFS_NORTC option.
8 years ago
Damien George
b039d93d7e
lib/oofatfs/ffconf.h: Allow to configure FS_EXFAT option.
Using MICROPY_FATFS_EXFAT. Enabling this has licensing implications;
see https://www.microsoft.com/en-us/legal/intellectualproperty/mtl/exfat-licensing.aspx
8 years ago
Damien George
9425bf5b2b
lib/fatfs: Remove old fatfs library component, it's replaced by oofatfs.
8 years ago
Damien George
28899cd971
lib/oofatfs: Update oofatfs library.
From https://github.com/micropython/oofatfs , branch work-R0.12b,
commit 46fb53331e7a583c29a41d37ce4b53f2718597e5.
8 years ago
Damien George
0390bc97ea
lib/oofatfs: Update oofatfs library.
From https://github.com/micropython/oofatfs , branch work-R0.12b,
commit 1e295b40550664bbaac18d95a4b6a58154464d31.
8 years ago
Damien George
9b08faf3ae
lib/oofatfs: Add OO version of FatFS library.
From https://github.com/micropython/oofatfs , branch work-R0.12b,
commit a346ccec123c2e4d887e2751d64156208d03bff4.
8 years ago
Damien George
211244d1f3
lib/utils/pyexec: Only print help prompt if HELP feature is enabled.
8 years ago
Damien George
895807137e
lib/utils: Remove old pyhelp helper, replaced with py/builtinhelp.c.
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.
8 years ago
Damien George
d89cafd5c3
lib/utils/interrupt_char: Use core-provided mp_kbd_exception if enabled.
Ultimately all ports that use lib/utils/interrupt_char would enable
MICROPY_KBD_EXCEPTION, so this is an interim solution.
8 years ago
Damien George
cd527bb324
lib/libm: Move Thumb-specific sqrtf function to separate file.
This allows it to be used only when the hardware supports VFP
instructions, preventing compile errors.
8 years ago
Paul Sokolovsky
3cdccb9b14
zephyr: Fix mp_hal_set_interrupt_char() declaration to be compatible.
With other ports. Other ports declare it in mphalport.h, it can be
inline or macro.
8 years ago
Paul Sokolovsky
6832cbd69d
lib/utils/pyexec: Fix compilation warning of type vs format mismatch.
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().
8 years ago
Vincenzo Frascino
c38ea32810
lib/utils/pyexec: Add mp_hal_set_interrupt_char() prototype.
This patch removes a compilation warning in pyexec.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
8 years ago
Erik Moqvist
f64e806f50
lib/utils/pyhelp.c: Use mp_printf() instead of printf()
This patch introduces MP_PYTHON_PRINTER for general use.
8 years ago
Damien George
4ebdb1f2b2
py: Be more specific with MP_DECLARE_CONST_FUN_OBJ macros.
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.
8 years ago
Damien George
ad3724e0bc
lib/utils/pyexec: Allow behaviour of SystemExit to be configurable.
Setting the pyexec_system_exit variable to PYEXEC_FORCED_EXT allows
SystemExit exceptions to terminate the pyexec functions.
8 years ago
Damien George
824f5c5a32
py/vstr: Combine vstr_new_size with vstr_new since they are rarely used.
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).
8 years ago
Paul Sokolovsky
4021b1e1b8
lib/utils/pyexec: Don't treat SystemExit as "forced exit".
"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.
8 years ago
Krzysztof Blazewicz
b04d4a5b13
lib/cmsis: upgrade CMSIS-CORE to V4.30
8 years ago
Krzysztof Blazewicz
fa6f774b2c
lib/cmsis: remove CMSIS-DSP headers, they are unused
8 years ago
Krzysztof Blazewicz
6aea34ad89
lib/cmsis: move CMSIS headers to lib/
Files in lib/cmsis are generic for all Cortex-M MCU's
files left in stmhal/cmsis are all STM32 specific.
8 years ago
Paul Sokolovsky
6ab2c5e6cc
lib/interrupt_char: Factor out typical Ctrl+C handling from esp8266 port.
Utility functions for keyboard interrupt handling, to be reused across
(baremetal) ports.
8 years ago
Delio Brignoli
e2ac8bb3f1
py: Add MICROPY_USE_INTERNAL_PRINTF option, defaults to enabled.
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.
8 years ago
Paul Sokolovsky
bae62d9abe
lib/utils/pyexec: qstr_pool_info() requires size_t* parameters.
8 years ago
Paul Sokolovsky
b0e2106fb8
lib/berkeley-db-1.xx: Update to upstream, fixes MacOSX build.
8 years ago
Paul Sokolovsky
9897bcaa73
lib/utils/stdout_helpers: Fix function signature to match py/mphal.h.
8 years ago
Paul Sokolovsky
6d11918d49
lib/berkeley-db-1.xx: Update, sets default page size to 4096.
This both good default for 4096 and makes less chance to see overflow page
issues.
8 years ago
Paul Sokolovsky
2ec943284a
lib/berkeley-db-1.xx: Switch to "embedded" branch.
It allows to access files via a virtual method tables and thus can integrate
with MicroPython's stream objects.
8 years ago
Paul Sokolovsky
58d9d85a56
lib/abort_.c: Add prototype to make coverage build happy.
8 years ago
Paul Sokolovsky
c8b80e4740
lib/embed/abort_: Implementation of abort_() function raising uPy exception.
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.
8 years ago
Paul Sokolovsky
43473372e6
lib/utils/stdout_helpers: Move from minimal/uart_extra.c for reuse.
8 years ago
Paul Sokolovsky
04c27e5eaa
lib/utils/pyexec: Use full path to readline.h header, per latest conventions.
8 years ago
Paul Sokolovsky
26d5e91bf3
lib/axtls: Update, fixes esp8266 build.
8 years ago
Paul Sokolovsky
7711d87563
lib/axtls: Upgrade to axTLS 1.5.4 + MicroPython patchset.
8 years ago
Damien George
7ddd85f933
lib/libm: Remove unused definition of "one".
8 years ago