| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
| |
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().
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
In other words, unix port now uses overriden printf(), instead of using
libc's. This should remove almost all dependency on libc stdio (which
is bloated).
|
|
|
|
|
| |
This may not seem like the ideal place, but is actually the only place
in py/ where it gets referenced, so is just right.
|
|
|
|
|
| |
This file contains various MicroPython-specific helper functions, so isn't
good fit for lib/libc/.
|
| |
|
|
|
|
|
|
| |
- A single ffcon.h file to configure fatfs settings across ports.
- A single diskio.h file with common drive definitions.
- Removed now reduntand ffconf_template.h.
|
|
|
|
|
|
| |
This patch allows you to stop auto-indent by pressing enter on a second
blank line. Easier than having to use backspace, and prevents new users
from getting stuck in auto-indent mode.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
If VT100 support is not available then a given implementation of
mp_hal_erase_line_from_cursor might need to know the number of characters
to erase.
This patch does not change generated code when VT100 is supported, since
compiler can optimise away the argument.
|
|
|
|
|
|
|
|
|
|
|
| |
This allows to build libffi from source together with micropython, and is
useful for cross-compilation. Support for this was already merged
previously, to use:
make libffi
make MICROPY_STANDALONE=1
(To both commands appropriate cross-compilition flags can be added).
|
|
|
|
|
|
|
|
| |
Use CTRL-E to enter paste mode. Prompt starts with "===" and accepts
all characters verbatim, echoing them back. Only control characters are
CTRL-C which cancels the input and returns to normal REPL, and CTRL-D
which ends the input and executes it. The input is executed as though
it were a file. The input is not added to the prompt history.
|
| |
|
|
|
|
| |
From https://github.com/pfalcon/axtls , branch micropython.
|
|
|
|
|
|
|
|
|
| |
4 spaces are added at start of line to match previous indent, and if
previous line ended in colon.
Backspace deletes 4 space if only spaces begin a line.
Configurable via MICROPY_REPL_AUTO_INDENT. Disabled by default.
|
|
|
|
| |
Disabled by default. Adds 108 bytes to Thumb2 arch when enabled.
|
|
|
|
|
| |
Default implementation uses VT100-style sequences which are not implemented
by all terminals out there
|
|
|
|
| |
xterm and others use the ESC[~3 sequence when pressing the delete key
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In particular, dates prior to Mar 1, 2000 are screwed up.
The easiest way to see this is to do:
>>> import time
>>> time.localtime(0)
(2000, 1, 1, 0, 0, 0, 5, 1)
>>> time.localtime(1)
(2000, 1, 2, 233, 197, 197, 6, 2)
With this patch, we instead get:
>>> import time
>>> time.localtime(1)
(2000, 1, 1, 0, 0, 1, 5, 1)
Doh - In C % is NOT a modulo operator, it's a remainder operator.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Can complete names in the global namespace, as well as a chain of
attributes, eg pyb.Pin.board.<tab> will give a list of all board pins.
Costs 700 bytes ROM on Thumb2 arch, but greatly increases usability of
REPL prompt.
|
| |
|