summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
* py/modgc: Remove obsolete extern declaration.Damien George2015-12-17
|
* py/compile: Use size_t or uintptr_t instead of mp_uint_t.Damien George2015-12-17
|
* py/parse: Replace mp_int_t/mp_uint_t with size_t etc, where appropriate.Damien George2015-12-17
|
* py/qstr: Change type of qstr from mp_uint_t to size_t.Damien George2015-12-17
| | | | | | | | | | For builds where mp_uint_t is larger than size_t, it doesn't make sense to use such a wide type for qstrs. There can only be as many qstrs as there is address space on the machine, so size_t is the correct type to use. Saves about 3000 bytes of code size when building unix/ port with MICROPY_OBJ_REPR_D.
* py/qstr: Use size_t instead of mp_uint_t when counting allocated bytes.Damien George2015-12-17
|
* py/bc: Use size_t instead of mp_uint_t to count size of state and args.Damien George2015-12-17
|
* py: Fix MICROPY_STACKLESS mode to compile with MICROPY_OBJ_REPR_D.Damien George2015-12-17
|
* py/mpprint: Implement %llu and %lld format specifiers for mp_printf.Damien George2015-12-17
| | | | Only enabled for MICROPY_OBJ_REPR_D.
* py/gc: Use size_t instead of mp_uint_t to count things related to heap.Damien George2015-12-16
| | | | | | | size_t is the correct type to use to count things related to the size of the address space. Using size_t (instead of mp_uint_t) is important for the efficiency of ports that configure mp_uint_t to larger than the machine word size.
* py/gc: For finaliser, interpret a pointer into the heap as concrete obj.Damien George2015-12-16
|
* py/gc: Scan GC blocks as an array of pointers, not an array of objects.Damien George2015-12-16
| | | | | | The GC should search for pointers within the heap. This patch makes a difference when an object is larger than a pointer (eg 64-bit NaN boxing).
* py/modsys: Fix module globals table to use MP_ROM_QSTR.Damien George2015-12-16
|
* docs/library: Add network server example.danicampora2015-12-16
|
* unix: Change define logic of _DIRENT_HAVE_D_INO to match other macros.Damien George2015-12-16
|
* unix: Add FreeDos targetpohmelie2015-12-16
|
* unix/modos: Fix silly bugs in ilistdir tuple creation.Damien George2015-12-16
|
* unix/modos: Allow to configure use of d_ino using _DIRENT_HAVE_D_INO.Damien George2015-12-16
| | | | Ports will need to #define _DIRENT_HAVE_D_INO (0) to disable d_ino use.
* stmhal/moduselect: Implement "oneshot polling" flag.Paul Sokolovsky2015-12-16
| | | | | | Similar to recently added feature in unix port: if event triggers for an objects, its polling flags are automatically reset, so it won't be polled until they are set again explicitly.
* stmhal: Extend SPI support to fully support all SPI devices on STM32F429.Tobias Badertscher2015-12-16
| | | | This includes SPI4, SPI5 and SPI6.
* uos: Add errno() function to get/set errno value.Paul Sokolovsky2015-12-16
|
* msvc: Use new modmachine infrastructure per changes in f925165stijn2015-12-15
|
* unix/modos: Implement ilistdir().Paul Sokolovsky2015-12-14
| | | | | | | | | | | | ilistdir() returns iterator which yields triples of (name, type, ino) where ino is inode number for entry's data, type of entry (file/dir/etc.), and name of file/dir. listdir() can be easily implemented in terms of this iterator (which is otherwise more efficient in terms of memory use and may save expensive call to stat() for each returned entry). CPython has os.scandir() which also returns an iterator, but it yields more complex objects of DirEntry type. scandir() can also be easily implemented in terms of ilistdir().
* py/objpolyiter: Implement instance-polymorphic iterator type.Paul Sokolovsky2015-12-14
| | | | | | | This allows to have single itertaor type for various internal iterator types (save rodata space by not having repeating almost-empty type structures). It works by looking "iternext" method stored in particular object instance (should be first object field after "base").
* unix/modtime: Add strftime() function (only single argument is supported).Paul Sokolovsky2015-12-14
| | | | Following "don't rely on FFI for basic functionality" approach.
* unix/moduselect: Make configurable with MICROPY_PY_USELECT.Paul Sokolovsky2015-12-13
|
* unix: Move modmachine into unix directoryDave Hylands2015-12-13
| | | | | This leaves behind the common functionality in extmod/machine_mem.c which can be used by all ports.
* lib/utils/printf: Add vsnprintf alias for Clang.Paul Sokolovsky2015-12-12
| | | | Was reported to break MacOSX build.
* stmhal: Make uart init use struct instead of array for parsing args.Damien George2015-12-12
| | | | | This makes it much easier to understand which arg is which, less error prone, and simpler to add a new arg.
* py/modmath: Add domain error checking to sqrt, log, log2, log10.Michael Buesch2015-12-12
| | | | | These functions will raise 'ValueError: math domain error' on invalid input.
* stmhal: For SPI config, use HW_SPIx_SCK instead of HW_ENABLE_SPIx.Damien George2015-12-12
| | | | | | Previously, SPI was configured by a board defining MICROPY_HW_ENABLE_SPIx to 0 or 1. Now, the board should define MICROPY_HW_SPIx_SCK, MISO, MOSI and NSS. This makes it the same as how I2C is configured.
* py: Fix compiler to handle lambdas used as default arguments.Damien George2015-12-12
| | | | Addresses issue #1709.
* tools: Upgrade upip to 0.6.3.Paul Sokolovsky2015-12-12
| | | | Updated for _os -> uos builtin module rename.
* unix: Rename "_os" module to "uos" for consistency with baremetal ports.Paul Sokolovsky2015-12-12
|
* msvc: Use different output directories depending on build typestijn2015-12-11
| | | | | | | | | | | | | | | | | | This allows multiple versions (e.g. Debug/Release, x86/x64) of micropython.exe to co-exist instead and also solves potential problems where msbuild does not completely rebuild the output and/or pdb files when switching between builds, which in turn can cause linker errors in dependent projects. By default exe/map/... files go in windows/build/$(Configuration)$(Platform) After each build micropython.exe is still copied from the above directory to the windows directory though, as that is consistent with the other ports and the test runner by default uses that location as well. Also rename env.props -> path.props which is a clearer name, and add ample documentation in the affected build files. (also see discussion in #1538)
* unix/moduselect: Implement "one-shot" flag for poll.poll().Paul Sokolovsky2015-12-11
| | | | | | | | | After an I/O event is triggered for fd, event flags are automatically reset, so no further events are reported until new event flags are set. This is an optimization for uasyncio, required to account for coroutine semantics: each coroutine issues explicit read/write async call, and once that trigger, no events should be reported to coroutine, unless it again explicitly requests it. One-shot mode saves one linear scan over the poll array.
* stmhal: add order-only dependency on build directorySven Wegener2015-12-10
| | | | Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
* tests: Add test for "not" of a user defined class.Damien George2015-12-10
|
* py: Make UNARY_OP_NOT a first-class op, to agree with Py not semantics.Damien George2015-12-10
| | | | | | | | | | | | | | | Fixes #1684 and makes "not" match Python semantics. The code is also simplified (the separate MP_BC_NOT opcode is removed) and the patch saves 68 bytes for bare-arm/ and 52 bytes for minimal/. Previously "not x" was implemented as !mp_unary_op(x, MP_UNARY_OP_BOOL), so any given object only needs to implement MP_UNARY_OP_BOOL (and the VM had a special opcode to do the ! bit). With this patch "not x" is implemented as mp_unary_op(x, MP_UNARY_OP_NOT), but this operation is caught at the start of mp_unary_op and dispatched as !mp_obj_is_true(x). mp_obj_is_true has special logic to test for truthness, and is the correct way to handle the not operation.
* py/emitinlinethumb: Add support for MRS instruction.Henrik Sölver2015-12-10
| | | | | Only IPSR and BASEPRI special registers supported at the moment, but easy to extend in the future.
* lib/utils/printf: Apply workaround for static linking with uclibc.Paul Sokolovsky2015-12-10
| | | | uclibc objects call __GI_vsnprintf().
* py/mkrules.mk: Don't pass COPT to linker.Paul Sokolovsky2015-12-10
| | | | | | Oftentimes, libc, libm, etc. don't come compiled with CPU compressed code option (Thumb, MIPS16, etc.), but we may still want to use such compressed code for MicroPython itself.
* unix/modtermios: DJGPP appears to have unicode-capable cc_t type.Paul Sokolovsky2015-12-09
| | | | | At least it's defined as "unsiged". We don't try to support unicode still, but at least apply workaround for DJGPP build.
* unix/modtermios: Provide B57600 and B115200 constants only if defined.Paul Sokolovsky2015-12-09
|
* extmod/moductypes: sizeof operation depends on layout type of structure.Paul Sokolovsky2015-12-09
| | | | | | | Previously, sizeof() blindly assumed LAYOUT_NATIVE and tried to align size even for packed LAYOUT_LITTLE_ENDIAN & LAYOUT_BIG_ENDIAN. As sizeof() is implemented on a strucuture descriptor dictionary (not an structure object), resolving this required passing layout type around.
* extmod: Add test which demonstrates LITTLE_ENDIAN packing failureDave Hylands2015-12-09
|
* py: Add mp_get_stream_raise to factor out check for stream methods.Damien George2015-12-09
|
* stmhal/timer: Use mp_float_t instead of float.Damien George2015-12-09
| | | | This way mp_float_t can be changed to, eg, double.
* py: Fix calling of parent classmethod from instance of subclass.Damien George2015-12-09
| | | | Addresses issue #1697.
* stmhal: Enable two USB phys to be supported together.neilh102015-12-09
| | | | | | | | | | | | | This is refactoring to enable support for the two USB PHYs available on some STM32F4 processors to be used at the same time. The F405/7 & F429 have two USB PHYs, others such as the F411 only have one PHY. This has been tested separately on a pyb10 (USB_FS PHY) and F429DISC (USB_HS PHY) to be able to invoke a REPL/USB. I have modified a PYBV10 to support two PHYs. The long term objective is to support a 2nd USB PHY to be brought up as a USB HOST, and possibly a single USB PHY to be OTG.
* tests: Disable for_range.py test for native emitter (it requires yield).Damien George2015-12-08
|