aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-11-03py: Change config default so m_malloc0 uses memset if GC not enabled.Colin Hogben
With MICROPY_ENABLE_GC set to false the alternate memory manager may not clear all memory that is allocated, so it must be cleared in m_malloc0.
2016-11-03tests/extmod/framebuf1: Test framebuffer pixel clear, and text function.Alex March
2016-11-02py: Fix wrong assumption that m_renew will not move if shrinkingColin Hogben
In both parse.c and qstr.c, an internal chunking allocator tidies up by calling m_renew to shrink an allocated chunk to the size used, and assumes that the chunk will not move. However, when MICROPY_ENABLE_GC is false, m_renew calls the system realloc, which does not guarantee this behaviour. Environments where realloc may return a different pointer include: (1) mbed-os with MBED_HEAP_STATS_ENABLED (which adds a wrapper around malloc & friends; this is where I was hit by the bug); (2) valgrind on linux (how I diagnosed it). The fix is to call m_renew_maybe with allow_move=false.
2016-11-02esp8266/modules: Fix negative temperature in ds18x20 driver.ernitron
2016-11-02extmod/utime_mphal: ticks_diff(): Optimize to avoid if conditions.Paul Sokolovsky
2016-11-02esp8266/etshal.h: Adjust size of MD5_CTX structure.Paul Sokolovsky
Size 64 was incorrect and will lead to stack corruption. Size 88 was verified empirically. Also, allow to skip defining it if MD5_CTX preprocessor macro is already defined (to avoid header conflict).
2016-11-02esp8266/etshal.h: Add prototypes for SPIRead/SPIWrite/SPIEraseSector.Paul Sokolovsky
2016-11-02unix: fix symbol references for x86 MacJan Pochyla
2016-11-02esp8266/main: Bump heap size to 36K.Paul Sokolovsky
ESP8266 SDK2.0 fixes (at least, I can't reproduce it) an infamous bug with crash during scan. 36K seams to be a safe value based on a download test (test_dl.py), over 1GB was downloaded. More testing is needed, but let's have other people participate by committing it now.
2016-11-01esp8266/modnetwork.c: Allows AP reconnection without WiFi credentialspuuu
There is no automatic reconnect after wlan.active(False); wlan.active(True). This commit provide the possibility to run wlan.connect() without parameter, to reconnect to the previously connected AP. resolve #2493
2016-11-01esp8266/scripts/port_diag: Add descriptions for esf_buf types.Paul Sokolovsky
2016-11-01docs/utime: Add docs for ticks_add(), improvements for other ticks_*().Paul Sokolovsky
2016-11-01docs/utime: Remove only:: for ticks_diff().Paul Sokolovsky
It's mandatory function which should be present in every port. Even if it's not, in the stdlib intro we waarn users that a particular port can lack anything of described in the docs.
2016-10-31py: remove asserts that are always true in emitbc.cPavol Rusnak
2016-10-31py: fix null pointer dereference in mpz.c, fix missing va_end in warning.cPavol Rusnak
2016-10-31esp8266/modnetwork: config(): Fix copy-paste error in setting "mac".Paul Sokolovsky
2016-10-31docs/utime: Describe new semantics of ticks_diff() (signed ring arithmetics).Paul Sokolovsky
2016-10-30docs/utime: Document ticks_cpu() in more detail.Paul Sokolovsky
Also, drop ::only directive.
2016-10-30docs/library/index: Update TOCs so builtins sorted before modules.Paul Sokolovsky
2016-10-30tools/tinytest-codegen: Exclude ticks_diff test for qemu-arm port.Paul Sokolovsky
2016-10-30tests/extmod/ticks_diff: Test for new semantics of ticks_diff().Paul Sokolovsky
2016-10-30py/sequence: Fix reverse slicing of lists.Fabio Utzig
2016-10-30extmod/utime_mphal: Fix implementation of new semantics of ticks_diff().Paul Sokolovsky
Now the function properly uses ring arithmetic to return signed value in range (inclusive): [-MICROPY_PY_UTIME_TICKS_PERIOD/2, MICROPY_PY_UTIME_TICKS_PERIOD/2-1]. That means that function can properly process 2 time values away from each other within MICROPY_PY_UTIME_TICKS_PERIOD/2 ticks, but away in both directions. For example, if tick value 'a' predates tick value 'b', ticks_diff(a, b) will return negative value, and positive value otherwise. But at positive value of MICROPY_PY_UTIME_TICKS_PERIOD/2-1, the result of the function will wrap around to negative -MICROPY_PY_UTIME_TICKS_PERIOD/2, in other words, if a follows b in more than MICROPY_PY_UTIME_TICKS_PERIOD/2 - 1 ticks, the function will "consider" a to actually predate b.
2016-10-30extmod/utime_mphal: Allow ticks functions period be configurable by a port.Paul Sokolovsky
Using MICROPY_PY_UTIME_TICKS_PERIOD config var.
2016-10-29tests/btree1: Fix out of memory error running on esp8266.Paul Sokolovsky
2016-10-29esp8266/modutime: Consistently convert to MP_ROM_QSTR/MP_ROM_PTR.Paul Sokolovsky
2016-10-29stmhal/modutime: Consistently convert to MP_ROM_QSTR/MP_ROM_PTR.Paul Sokolovsky
2016-10-29extmod/utime_mphal: Implement ticks_add(), add to all maintained ports.Paul Sokolovsky
2016-10-29unix/mphalport.h: Add dummy definition of mp_hal_ticks_cpu().Paul Sokolovsky
To fix coverage build.
2016-10-29windows: Enable utime_mphal following unix, define mp_hal_ticks_*.Paul Sokolovsky
mp_hal_ticks_ms, mp_hal_ticks_us taken from unix port, mp_hal_ticks_cpu dummy.
2016-10-29unix/modtime: Switch ticks/sleep_ms/us() to utime_mphal.Paul Sokolovsky
2016-10-29extmod/utime_mphal: Add MP_THREAD_GIL_EXIT/ENTER warppers for sleep functions.Paul Sokolovsky
Ported from unix port.
2016-10-29unix/mphalport.h: Add warning of mp_hal_delay_ms() implementation.Paul Sokolovsky
It's implemented in terms of usleep(), and POSIX doesn't guarantee that usleep() can sleep for more than a second. This restriction unlikely applies to any real-world system, but...
2016-10-29extmod/utime_mphal: ticks_diff(): switch arg order, return signed value.Paul Sokolovsky
Based on the earlier discussed RFC. Practice showed that the most natural order for arguments corresponds to mathematical subtraction: ticks_diff(x, y) <=> x - y Also, practice showed that in real life, it's hard to order events by time of occurance a priori, events tend to miss deadlines, etc. and the expected order breaks. And then there's a need to detect such cases. And ticks_diff can be used exactly for this purpose, if it returns a signed, instead of unsigned, value. E.g. if x is scheduled time for event, and y is the current time, then if ticks_diff(x, y) < 0 then event has missed a deadline (and e.g. needs to executed ASAP or skipped). Returning in this case a large unsigned number (like ticks_diff behaved previously) doesn't make sense, and such "large unsigned number" can't be reliably detected per our definition of ticks_* function (we don't expose to user level maximum value, it can be anything, relatively small or relatively large).
2016-10-29unix/modtime: Use ticks_diff() implementation from extmod/utime_mphal.c.Paul Sokolovsky
2016-10-28zephyr/README: Update for the current featureset, add more info.Paul Sokolovsky
2016-10-28zephyr: Support time -> utime module "weaklink".Paul Sokolovsky
So, now it's possible to just do normal Python's "import time".
2016-10-28tests/extmod/uhashlib_sha256: Rename sha256.py test.Alex March
2016-10-28tests/extmod/uhashlib_sha1: Coverage for SHA1 algorithm.Alex March
2016-10-28zephyr/zephyr_getchar: Update for recent Zephyr refactor of console hooks.Paul Sokolovsky
uart_irq_input_hook_set() was renamed to uart_console_in_debug_hook_install() and accepts different params.
2016-10-28docs/library/network: Typo fixes, consistent acronym capitalization.Paul Sokolovsky
2016-10-28docs/library/network: Reword intro paragraph.Paul Sokolovsky
2016-10-27tests/basics/gc1: Garbage collector threshold() coverage.Alex March
2016-10-27py/stream: Typo fix in comment.Paul Sokolovsky
2016-10-27qemu-arm: Exclude new vfs_fat tests.Alex March
2016-10-27tests/extmod/vfs_fat_oldproto: Test old block device protocol.Alex March
2016-10-27tests/extmod/vfs_fat_fsusermount: Improve fsusermount test coverage.Alex March
2016-10-27zephyr: Initial implementation of machine.Pin.Daniel Thompson
The integration with Zephyr is fairly clean but as MicroPython Hardware API requires pin ID to be a single value, but Zephyr operates GPIO in terms of ports and pins, not just pins, a "hierarchical" ID is required, using tuple of (port, pin). Port is a string, effectively a device name of a GPIO port, per Zephyr conventions these are "GPIO_0", "GPIO_1", etc.; pin is integer number of pin with the port (supposed to be in range 0-31). Example of pin initialization: pin = Pin(("GPIO_1", 21), Pin.OUT) (an LED on FRDM-K64F's Port B, Pin 21). There is support for in/out pins and pull up/pull down but currently there is no interrupt support. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org> Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2016-10-26zephyr: Use board/SoC values for startup banner based on Zephyr config.Vincenzo Frascino
This patch modifies the HW macro definition in order to let micropython report correctly the BOARD and the SOC on which it is working on.
2016-10-26zephyr: Fix mp_hal_set_interrupt_char() declaration to be compatible.Paul Sokolovsky
With other ports. Other ports declare it in mphalport.h, it can be inline or macro.