aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2015-11-27unix/unix_mphal: Use size_t instead of mp_uint_t in stdout_tx_strn decls.Damien George
2015-11-27py/binary: Make use of MP_ALIGN.Damien George
2015-11-26stmhal: Make stm.mem* support large integers.Dave Hylands
With these you can now do things like: stm.mem32[0x20000000] = 0x80000000 and read 32-bit values. You can also read all the way to the end of memory using either stm.mem32[0xfffffffc] or stm.mem32[-4]. IRQs shouldn't use mem32 at all since they'd fail if the top 2 bits weren't equal, so IRQs should be using 16-bit I/O.
2015-11-26pic16bit: Use global MICROPY_NO_ALLOCA setting.Paul Sokolovsky
2015-11-26stmahl: Fix usbd_conf.c for devices which don't have USB_HS at all.Dave Hylands
The STMCube examples define both USE_USB_HS and USE_USB_HS_IN_FS when they use the HS in FS mode. The STM32F401 doesn't have a USB_HS at all, so the USB_OTG_HS instance doesn't even exist.
2015-11-26unix/modos: Remove duplicate level of #if MICROPY_PY_OS_STATVFS.Paul Sokolovsky
2015-11-26stmhal: Allow make DEBUG=1 to buildDave Hylands
2015-11-25stmhal: Add support for the STM32F429I-DISCO kit by STMicro.Tobias Badertscher
2015-11-25py/mpconfig.h: Allow to build without alloca() for ANSI C compliance.Paul Sokolovsky
Define MICROPY_NO_ALLOCA=1 and memory will be allocated from heap instead and freed by garbage collection.
2015-11-25extmod/fsusermount: Make configurable with MICROPY_FSUSERMOUNT.Paul Sokolovsky
2015-11-25extmod: Move fsusermount.c from stmhal for cross-port reuse.Paul Sokolovsky
2015-11-25stmhal: Increase the priority of UART IRQ.Dave Hylands
The UARTs have no FIFOs, so if interrupts are disabled for more than a character time (10 usec at 1 Mbit/sec) then characters get dropped. The overhead for handling a UART ISR is about 0.5 usec, so even at baud rates of 1 Mbit/sec this only corresponds to about 5% of the CPU. Lower baud rates will have less of an impact.
2015-11-24esp8266/modesp: Implement flash_read(offset, size_bytes) function.Paul Sokolovsky
Based on vendor API documentation, untested on real hardware.
2015-11-24tests/run-tests: Improve robustness of REPL tests.Paul Sokolovsky
Unconditionally wait for MicroPython banner. On overloaded systems, when using emulators, etc. initial executable startup may take more than 20ms.
2015-11-24stmhal: Process storage idle tick handler in different slot to DMA.Damien George
2015-11-24stmhal: In SysTick IRQ handler, make uwTick variable non-volatile.Damien George
uwTick can only change in the SysTick IRQ so this IRQ function does not need to take special care with this variable. It's important to make this IRQ function as efficient as possible.
2015-11-24stmhal: Move flash storage idle tick handler from TIM3 to SysTick.Damien George
Using SysTick to do the counting and dispatch of the flash storage idle handler is more efficient than requiring a dedicated hardware timer. No new counter is needed, just the existing uwTick variable. The processing is not actually done in the SysTick IRQ, it is deferred to the flash IRQ (which runs at lower priority).