aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-12-09unix/modtermios: Provide B57600 and B115200 constants only if defined.Paul Sokolovsky
2015-12-09extmod/moductypes: sizeof operation depends on layout type of structure.Paul Sokolovsky
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.
2015-12-09extmod: Add test which demonstrates LITTLE_ENDIAN packing failureDave Hylands
2015-12-09py: Add mp_get_stream_raise to factor out check for stream methods.Damien George
2015-12-09stmhal/timer: Use mp_float_t instead of float.Damien George
This way mp_float_t can be changed to, eg, double.
2015-12-09py: Fix calling of parent classmethod from instance of subclass.Damien George
Addresses issue #1697.
2015-12-09stmhal: Enable two USB phys to be supported together.neilh10
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.
2015-12-08tests: Disable for_range.py test for native emitter (it requires yield).Damien George
2015-12-08py: Don't try to optimise for+range when args are not simple expressions.Damien George
Addresses issue #1693.
2015-12-08tools: Fix pyboard.py to work under Python 3.Damien George
2015-12-08tools: Add option to pyboard.py to wait for serial device to be ready.Peter Hinch
Also prints a nicer error message if the serial connection could not be established.
2015-12-08py/misc.h: Include stdint.h only once (unconditionally at the top).Paul Sokolovsky
2015-12-07unix/main: mp_verbose_flag available only if MICROPY_DEBUG_PRINTERS is true.Paul Sokolovsky
Not available for minimal build for example.
2015-12-07py/misc.h: Include stdint.h, as large share of code now depends on it.Paul Sokolovsky
2015-12-07tests/builtin_minmax: Make compatible with @native codegen.Paul Sokolovsky
2015-12-07stmhal: Print exception information in nlr_jump_failedDave Hylands
Currently nlr_jump_fail prints that there was an uncaught exception but nothing about the exception. This patch causes nlr_jump_failed to try to print the exception. Given that printf was called on the line above, I think that the call to mp_obj_print_exception has about as much likelyhood of succeeding as the printf does.
2015-12-07tests/builtin_minmax: Add testcase for lazy iterable (generator).Paul Sokolovsky
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