aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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).
2015-11-24stmhal/irq: Set all IRQ subpriorities to 0, since they aren't used.Damien George
2015-11-24stmhal/irq: Add comment about SDIO priority being higher than DMA.Damien George
2015-11-24stmhal: On SysTick IRQ, only process one DMA channel at a time.Damien George
This can be generalised if/when more processing is needed by SysTick. Thanks to @chuckbook for the idea.
2015-11-24stmhal: Save RAM and ROM by making SD DMA init structure const for tx/rx.Damien George
2015-11-24stmhal: Small simplification of code to tickle DMA idle counter.Damien George
2015-11-24windows/py: Support 64bit mingw-w64 buildsstijn
- add mp_int_t/mp_uint_t typedefs in mpconfigport.h - fix integer suffixes/formatting in mpconfig.h and mpz.h - use MICROPY_NLR_SETJMP=1 in Makefile since the current nlrx64.S implementation causes segfaults in gc_free() - update README
2015-11-24windows: Cleanup makefilestijn
The BSD stuff is a copy from the unix makefile but at least there it makes some sense, a windows makefile on BSD doesn't. The -lmman flag is probably for mmap functions but there is no other build support for it on windows so just that flag won't cut it anyway.
2015-11-24nlr: Use single preprocessor symbol to check if building on Windowsstijn
2015-11-24stmhal: Add dma support for sdcard.Dave Hylands
This started out using IgorLektorovEpam work in PR #1389 and reworked it.
2015-11-24stmhal: Turn off DMA clocks when idle for 100 msecDave Hylands
Turning on each DMA block increases the current consumption by about 8 mA. This code adds an idle timer for each DMA block and turns off the clocks when no streams are in use for 128 msec. Having a small timeout allows for improved performance when back-to-back transfers are being performed. The 128 msec is basically a guess.
2015-11-24stmhal: Put IRQs into priority order.Dave Hylands
- added some comments to explain the priority/sub-priority. - adds an entry for SDIO (to be used in a later patch) - increases DMA priority above USB so that DMA can be used for sdcard I/O when using USB Mass Storage.
2015-11-23stmhal: Fix unused variables when HW_CLK_LAST_FREQ not defined.Damien George
2015-11-23stmhal: Implement delayed RTC initialization with LSI fallback.T S
If RTC is already running at boot then it's left alone. Otherwise, RTC is started at boot but startup function returns straight away. RTC startup is then finished the first time it is used. Fallback to LSI if LSE fails to start in a certain time. Also included: MICROPY_HW_CLK_LAST_FREQ hold pyb.freq() parameters in RTC backup reg MICROPY_HW_RTC_USE_US option to present datetime sub-seconds in microseconds MICROPY_HW_RTC_USE_CALOUT option to enable RTC calibration output CLK_LAST_FREQ and RTC_USE_CALOUT are enabled for PYBv1.0.
2015-11-23docs: Bump version to 1.5.1.Damien George
2015-11-23lib/utils/printf: Use more conservative check for MICROPY_DEBUG_STDERR.Paul Sokolovsky
2015-11-23py/compile: Do proper checking of * and ** in function definition.Damien George
This patch checks that there is only one *, and that ** is last in the arg list.
2015-11-23py: Check that second argument to hasattr is actually a string.Damien George
Fixes issue #1623.
2015-11-23extmod/modure: Use correct integer type for n_args argument.Damien George
2015-11-23py/emitglue: Implement persistent saving and loading of const objects.Damien George
2015-11-23py/emitglue: Add feature-flag header to .mpy to detect bytecode compat.Damien George
Loading .mpy files will now check to make sure that the target VM can support the bytecode.