| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
| |
This should pretty much resolve issue #50.
|
|
|
|
| |
Addresses issue #859.
|
| |
|
|
|
|
|
|
| |
It seems most sensible to use size_t for measuring "number of bytes" in
malloc and vstr functions (since that's what size_t is for). We don't
use mp_uint_t because malloc and vstr are not Micro Python specific.
|
|
|
|
| |
Add more specific comments describing what is going on.
|
| |
|
|
|
|
|
|
|
| |
Force OSX to compile with clang even if gcc is available
Change LDFLAGS syntax to be compatible with clang
Fix questionable syntax on line 90
Remove extraneous tab character
|
|
|
|
|
| |
Also add start of ujson module with dumps implemented. Enabled in unix
and stmhal ports. Test passes on both.
|
|
|
|
|
|
|
|
| |
sys.exit always raises SystemExit so doesn't need a special
implementation for each port. If C exit() is really needed, use the
standard os._exit function.
Also initialise mp_sys_path and mp_sys_argv in teensy port.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
For the sake of older versions of gcc (and other compilers), don't use
the #warning CPP directive, nor the -Wno-error=cpp option.
Also, fix a strict alias warning in modffi.c for older compilers, and
add a test for ffi module.
Addresses issue #847.
|
|
|
|
| |
And move the MAP_ANON redefinition from py/asmx64.c to unix/alloc.c.
|
|
|
|
|
|
| |
If not set, MICROPY_EMIT_X64 is set only if on x86-64 machine.
If not set, MICROPY_GCREGS_SETJMP is set when on MIPS.
|
|
|
|
|
|
| |
MP_PLAT_FREE_EXEC macros
Fixes issue #840
|
|
|
|
| |
Part of code cleanup, working towards resolving issue #50.
|
|
|
|
| |
Part of code cleanup, working towards resolving issue #50.
|
|
|
|
| |
Part of code cleanup, to resolve issue #50.
|
|
|
|
| |
Addressing issue #50, still some way to go yet.
|
|
|
|
|
|
|
| |
Also add -t/--target option to pip-micropython to allowing installing to
the pyboard.
Thanks to turbinenreiter/Sebastian Plamauer for the patch.
|
|
|
|
|
|
|
|
| |
Because (for Thumb) a function pointer has the LSB set, pointers to
dynamic functions in RAM (eg native, viper or asm functions) were not
being traced by the GC. This patch is a comprehensive fix for this.
Addresses issue #820.
|
| |
|
|
|
|
|
|
|
|
| |
Also provides setraw() function from "tty" module (which in CPython is
implemented in Python). The idea here is that 95% of "termios" module usage
is to set raw mode to allow access to normal serial devices. Then, instead
of exporting gazillion termios symbols, it's better to implement it in C,
and export minimal number of symbols (mostly baud rates and drain values).
|
|\
| |
| | |
unix: Added install/uninstall
|
| | |
|
| |
| |
| |
| | |
Also fix unix port so that SystemExit with no arg exits with value 0.
|
|/ |
|
| |
|
|
|
|
|
|
|
| |
qstr_init is always called exactly before mp_init, so makes sense to
just have mp_init call it. Similarly with
mp_init_emergency_exception_buf. Doing this makes the ports simpler and
less error prone (ie they can no longer forget to call these).
|
|
|
|
| |
Addresses issue #724.
|
|\
| |
| | |
Add support for storing args during an exception raised by an irq.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The user code should call micropython.alloc_emergency_exception_buf(size)
where size is the size of the buffer used to print the argument
passed to the exception.
With the test code from #732, and a call to
micropython.alloc_emergenncy_exception_buf(100) the following error is
now printed:
```python
>>> import heartbeat_irq
Uncaught exception in Timer(4) interrupt handler
Traceback (most recent call last):
File "0://heartbeat_irq.py", line 14, in heartbeat_cb
NameError: name 'led' is not defined
```
|
| | |
|
|/ |
|
|\
| |
| | |
Add fsync for windows, i.e. _commit. See dce8876
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
With unicode enabled, this patch allows reading a fixed number of
characters from text-mode streams; eg file.read(5) will read 5 unicode
chars, which can made of more than 5 bytes.
For an ASCII stream (ie no chars > 127) it only needs to do 1 read. If
there are lots of non-ASCII chars in a stream, then it needs multiple
reads of the underlying object.
Adds a new test for this case. Enables unicode support by default on
unix and stmhal ports.
|
| |
|
|
|
|
| |
This method apparently should be part of stream interface.
|
|
|
|
|
| |
emitnative in particular requires nlr_* to be real functions, so doesn't
compile with MICROPY_NLR_SETJMP=1.
|
|
|
|
|
| |
But much smaller and memory-efficient. Uses Python builtin data structures
(dict, tuple, int) to describe structure layout.
|
|
|
|
|
| |
Implementing it as a static constant is a bit peculiar and require cooperation
from long int implementation.
|
|
|
|
| |
See discussion in issue #50.
|
| |
|
| |
|
|\
| |
| | |
windows: Sync mpconfigport.h with the unix' version
|
| |
| |
| |
| |
| |
| | |
- rearrange/add definitions that were not there so it's easier to compare both
- use MICROPY_PY_SYS_PLATFORM in main.c since it's available anyway
- define EWOULDBLOCK, it is missing from ingw32
|
|/ |
|