aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-12-07tests: Add min/max "default" agrument testpohmelie
2015-12-07py: Add min/max "default" keyword argumentpohmelie
2015-12-07py: Add MICROPY_PY_BUILTINS_MIN_MAX, disable for minimal ports.pohmelie
2015-12-07stmhal: Execute boot.py and main.py when formatting the file system.Dave Hylands
When you use the USER button to perform a filesystem reset at boot time then it wipes out the filesystem and creates a new boot.py and main.py. With this patch these files are executed after formatting, ensuring that pyb and machine modules get imported.
2015-12-07py: Make it easy to build without MICROPY_PY_BUILTINS_COMPLEX.Paul Sokolovsky
Automagically skip related modules.
2015-12-06tools: Allow pyboard.py to work when boot.py prints things.Dave Hylands
2015-12-06tests: Actuall add feature check for complex type being available.Paul Sokolovsky
2015-12-06tests/run-tests: Allow to skip complex tests if it's not compiled in.Paul Sokolovsky
2015-12-05unix/moduselect: register(): Allow to call with duplicate file descriptor.Paul Sokolovsky
Per CPython docs, "Registering a file descriptor that’s already registered is not an error, and has the same effect as registering the descriptor exactly once." https://docs.python.org/3/library/select.html#select.poll.register That's somewhat ambiguous, what's implemented here is that if fd si not yet registered, it is registered. Otherwise, the effect is equivalent to modify() method.
2015-12-05py/modsys: Use MP_ROM_PTR() initializer for sys.modules.Paul Sokolovsky
Based on similar usage for sys.argv/sys.path.
2015-12-04stmhal: Fix uart off by 1 circular buffer size.Ryan Shaw
2015-12-05tests/extra_coverage: Update for sys.modules addition.Paul Sokolovsky
2015-12-05py/modsys: Implement sys.modules.Paul Sokolovsky
This for example will allow people to reload modules which didn't load successfully (e.g. due to syntax error).
2015-12-04unix/main: Check pending exception at the end of code block execution.Paul Sokolovsky
Usually this checking is done by VM on jump instructions, but for linear sequences of instructions and builtin functions this won't happen. Particular target of this change is long-running builtin functions like time.sleep().
2015-12-04stmhal: Add option to free up TIM3 from USB VCP polling.Damien George
This is a hack to free up TIM3 so that it can be used by the user. Instead we use the PVD irq to call the USB VCP polling function, and trigger it from SysTick (so SysTick itself does not do any processing). The feature is enabled for pyboard lite only, since it lacks timers.
2015-12-04cc3200: Add __get_BASEPRI and __set_BASEPRI inline function definitions.Damien George
2015-12-04stmhal: Only use BASEPRI irq stuff if Cortex is M3 or higher.Damien George
2015-12-04stmhal: Add rtc.init() method to force RTC to re-initialise.Damien George
2015-12-04stmhal: Protect SD card DMA transactions against USB MSC contention.Damien George
Consider the following scenario: SD card is being read by pyboard; USB irq comes in for MSC read request; SD card needs to be read from within USB irq while SD read is already ongoing. Such contention needs to be avoided. This patch provides a simple solution, to raise the irq priority above that of the USB irq during SD DMA transfers. Pyboard and PC can now read from the SD card at the same time (well, reads are interleaved).
2015-12-04stmhal: Add raise_irq_pri and restore_irq_pri functions.Damien George
These can be used to disable only certain interrupts, ones at or above the given priority value.
2015-12-04extmod/moductypes: set_aligned(): Handle INT64/UINT64.Paul Sokolovsky
2015-12-03py: Fix function calls that have positional and a star-arg-with-iterator.Damien George
Addresses issue #1678.
2015-12-03py/mpconfig: Actually allow to override MICROPY_BYTES_PER_GC_BLOCK.Paul Sokolovsky
2015-12-03unix/mpconfigport: Typo fix in comment.Paul Sokolovsky
2015-12-03py/gc: Make GC block size be configurable.Paul Sokolovsky
2015-12-02stmhal: Put all DMA channel & stream definitions in dma.hDave Hylands
2015-12-02unix/mpconfigport.h: For MICROPY_NO_ALLOCA=1, don't even include alloca.h.Paul Sokolovsky
2015-12-02stmhal: Add board config files for PYBv1.1 and PYBLITEv1.0.Damien George
2015-12-02py/mpprint: Printing of doubles is now supported (by uPy own routine).fabien.lementec
2015-12-02unix/modtime: sleep(): Return early if KeyboardInterrupt is pendingPaul Sokolovsky
As set by signal handler. This assumes that exception will be raised somewhere else, which so far doesn't happen for single function call. Still, it makes sense to handle that in some common place.
2015-11-30stmhal: Make uart.write() function correctly for timeout=0.Damien George
In non-blocking mode (timeout=0), uart.write() can now transmit all of its data without raising an exception. uart.read() also works correctly in this mode. As part of this patch, timout_char now has a minimum value which is long enough to transfer 1 character. Addresses issue #1533.
2015-11-30stmhal: uart.any() function now returns number of bytes available.Ryan Shaw
2015-11-30unix/moduselect: Support growing of poll array.Paul Sokolovsky
2015-11-29cc3200: Correct buffer offset in serial flash diskio module.danicampora
2015-11-29py: Add support for 64-bit NaN-boxing object model, on 32-bit machine.Damien George
To use, put the following in mpconfigport.h: #define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_D) #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE) typedef int64_t mp_int_t; typedef uint64_t mp_uint_t; #define UINT_FMT "%llu" #define INT_FMT "%lld" Currently does not work with native emitter enabled.
2015-11-29py: Wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR.Damien George
This allows the mp_obj_t type to be configured to something other than a pointer-sized primitive type. This patch also includes additional changes to allow the code to compile when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of mp_uint_t, and various casts.
2015-11-29py: Add MP_ROM_* macros and mp_rom_* types and use them.Damien George
2015-11-29py/gc: Move away from using mp_uint_t, instead use uintptr_t and size_t.Damien George
The GC works with concrete pointers and so the types should reflect this.
2015-11-29py: Use uintptr_t instead of mp_uint_t in MP_TAGPTR_* macros.Damien George
2015-11-29py: Make mp_setup_code_state take concrete pointer for func arg.Damien George
2015-11-29extmod/modmachine: Use uintptr_t instead of mp_uint_t for address type.Damien George
2015-11-29py/emit: Change type of arg of load_const_obj from void* to mp_obj_t.Damien George
2015-11-29py: Change qstr_* functions to use size_t as the type for str len arg.Damien George
2015-11-29py: Change mp_print_strn_t func type to use size_t for the str length.Damien George
2015-11-29unix/modtime: Unbreak Windows build after changes to check select() result.Paul Sokolovsky
2015-11-29unix/modtime: sleep(): Automatically restart after receiving EINTR.Paul Sokolovsky
THis is required to deal well with signals, signals being the closest analogue of hardware interrupts for POSIX. This is also CPython 3.5 compliant behavior (PEP 475). The main problem implementing this is to figure out how much time was spent in waiting so far/how much is remaining. It's well-known fact that Linux updates select()'s timeout value when returning with EINTR to the remaining wait time. Here's what POSIX-based standards say about this: (http://pubs.opengroup.org/onlinepubs/9699919799/functions/pselect.html): "Upon successful completion, the select() function may modify the object pointed to by the timeout argument." I.e. it allows to modify timeout value, but doesn't say how exactly it is modified. And actually, it allows such modification only "upon successful completion", which returning with EINTR error hardly is. POSIX also allows to request automatic EINTR restart for system calls using sigaction call with SA_RESTART flag, but here's what the same document says about it: "If SA_RESTART has been set for the interrupting signal, it is implementation-defined whether the function restarts or returns with [EINTR]." In other words, POSIX doesn't leave room for both portable and efficient handling of this matter, so the code just allows to manually select Linux-compatible behavior with MICROPY_SELECT_REMAINING_TIME option, or otherwise will just raise OSError. When systems with non-Linux behavior are found, they can be handled separately.
2015-11-29examples/accel_i2c.py: Switch to "machine" module.Paul Sokolovsky
2015-11-29unix/moduselect: poll.register(): Reuse freed entries in poll array.Paul Sokolovsky
2015-11-28unix/moduselect: Fix bug in poll.poll() scanning loop.Paul Sokolovsky
2015-11-27py/asmx86: Fix function definition to use int32_t instead of int.Damien George