| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
This allows it to be used only when the hardware supports VFP
instructions, preventing compile errors.
|
|
|
|
|
| |
With other ports. Other ports declare it in mphalport.h, it can be
inline or macro.
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
| |
This patch removes a compilation warning in pyexec.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
|
|
|
|
| |
This patch introduces MP_PYTHON_PRINTER for general use.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Setting the pyexec_system_exit variable to PYEXEC_FORCED_EXT allows
SystemExit exceptions to terminate the pyexec functions.
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
| |
"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.
|
| |
|
| |
|
|
|
|
|
| |
Files in lib/cmsis are generic for all Cortex-M MCU's
files left in stmhal/cmsis are all STM32 specific.
|
|
|
|
|
| |
Utility functions for keyboard interrupt handling, to be reused across
(baremetal) ports.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This both good default for 4096 and makes less chance to see overflow page
issues.
|
|
|
|
|
| |
It allows to access files via a virtual method tables and thus can integrate
with MicroPython's stream objects.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Don't error out when options is not what you support, just skip your code.
This allows to make FatFs support properly configurable.
|
|
|
|
|
| |
Applied "official" patches and fixed various warnings when built with uPy's
compile options.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
And will normalize them.
|
|
|
|
|
| |
ANSI C doesn't require that strncpy() produced null-terminated string, so
it's basicly useless for string manipulation.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
By default it uses mp_plat_print, but a port may override it to another
value with MICROPY_DEBUG_PRINTER_DEST.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Reference it from root pointers section.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This makes the code portable to non-32-bit architectures.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Requires addition of software implementation of sqrtf function.
|
|
|
|
| |
Was reported to break MacOSX build.
|
|
|
|
| |
uclibc objects call __GI_vsnprintf().
|
| |
|