aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-07-31esp8266/esp_mphal: Implement libc's errno.Paul Sokolovsky
Using __errno() function, and redirect it to use mp_stream_errno from stream module. This is pre-requisite for integrating with 3rd-party libs, like BerkeleyDB.
2016-07-31tests/extmod/btree1: Tests against in-memory DB (using io.BytesIO).Paul Sokolovsky
2016-07-31unix/Makefile: And note why btree module is disabled for coverage build.Paul Sokolovsky
2016-07-31extmod/modbtree: Switch to accepting stream object instead of filename.Paul Sokolovsky
Requires "embedded" BerkeleyDB BTree implementation.
2016-07-31py/py.mk: Extra switches to build "embedded" BerkeleyDB BTree lib.Paul Sokolovsky
2016-07-31lib/berkeley-db-1.xx: Switch to "embedded" branch.Paul Sokolovsky
It allows to access files via a virtual method tables and thus can integrate with MicroPython's stream objects.
2016-07-30stmhal: Make SPI NSS pin definition optional.Dave Hylands
Some boards (like the GHI Electronics G30 Dev Board) don't use NSS at all and rather just use GPIO chip selects.
2016-07-30stmhal: fixing malloc when used with external librariesMatt Brejza
2016-07-30mpy-cross: Fix mingw and msys2 compilationstijn
When compiling with msys2's gcc there's no need to apply the binary fmode so adjust the Makefile to reflect that. When compiling with mingw we need to include malloc.h since there is no alloca.h, and the 64bit detection in mpconfigport.h needs some adjustment.
2016-07-30py/mpconfig.h: Add MICROPY_STREAMS_POSIX_API setting.Paul Sokolovsky
To filter out even prototypes of mp_stream_posix_*() functions, which require POSIX types like ssize_t & off_t, which may be not available in some ports.
2016-07-30lib/abort_.c: Add prototype to make coverage build happy.Paul Sokolovsky
2016-07-30esp8266/mpconfigport.h: Include sys/types.h for POSIX types definitions.Paul Sokolovsky
As required for related functions in stream.h.
2016-07-30esp8266/axtls_helpers: Remove abort_(), now in lib/embed/.Paul Sokolovsky
2016-07-30lib/embed/abort_: Implementation of abort_() function raising uPy exception.Paul Sokolovsky
Helpful when porting existing C libraries to MicroPython. abort()ing in embedded environment isn't a good idea, so when compiling such library, -Dabort=abort_ option can be given to redirect standard abort() to this "safe" version.
2016-07-30py/stream: Add adapter methods with POSIX-compatible signatures.Paul Sokolovsky
Previoussly such read() and write() methods were used by modussl_axtls, move to py/stream for reuse.
2016-07-29tests/io/bytesio_ext: Test for .seek()/.flush() on BytesIO.Paul Sokolovsky
2016-07-28py/objstringio: Implement MP_STREAM_SEEK ioctl and add seek() method.Paul Sokolovsky
2016-07-28py/objstringio: Add MP_STREAM_FLUSH ioctl and flush() method.Paul Sokolovsky
No-op for this object.
2016-07-28unix/file: Use generic stream flush() method.Paul Sokolovsky
2016-07-27esp8266/modpybuart: Fix UART parity setting.daniel-k
The configuration bits for the UART register were wrong and the parity couldn't be enabled, because the exist_parity member hasn't been updated. I took this ESP8266 register description (http://esp8266.ru/esp8266-uart-reg/) as reference. Verification has been done with a logic analyzer.
2016-07-27unix/file: fdfile_ioctl(): Fix argument to check_fd_is_open().Paul Sokolovsky
2016-07-27py/stream: Implement generic flush() method, in terms of C-level ioctl.Paul Sokolovsky
2016-07-27unix/file: ioctl(): Check that file is open before operations.Paul Sokolovsky
2016-07-27unix/file: Implement MP_STREAM_FLUSH ioctl.Paul Sokolovsky
2016-07-26tests/run-tests: Make "regex'ed .exp" facility available to device tests.Paul Sokolovsky
Required to pass bytes_compare3.py (opptional warnings) on devices.
2016-07-26py/stream: Stream module works with errno's, so should include mperrno.h.Paul Sokolovsky
2016-07-26unix/mpconfigport.h: Include stdio.h by default.Paul Sokolovsky
This allows to use printf() in a any source file with unix port, for quick debugging.
2016-07-25tests/unicode_subscr.py: Detailed test for subscripting unicode strings.Paul Sokolovsky
2016-07-25py/objstrunicode: str_index_to_ptr: Implement positive indexing properly.Paul Sokolovsky
Order out-of-bounds check, completion check, and increment in the right way.
2016-07-25py/objstrunicode: str_index_to_ptr: Should handle bytes too.Paul Sokolovsky
There's single str_index_to_ptr() function, called for both bytes and unicode objects, so should handle each properly.
2016-07-25py/stream.h: Remove dated comment of POSIX-specificity of EAGAIN.Paul Sokolovsky
We have adopted POSIX-compatible error numbers as MicroPython's native.
2016-07-25py/stream.h: Move mp_stream_write_adaptor() inside ifdef block.Paul Sokolovsky
2016-07-24tests/extmod/btree1: Close database at the end of test.Paul Sokolovsky
2016-07-24extmod/modbtree: Check __bt_open() return value for error.Paul Sokolovsky
2016-07-23esp8266/_boot.py: Decrease GC alloc threshold to quarter of heap size.Paul Sokolovsky
The idea behind decrease is: bytecode and other static data is also kept on heap, and can easily become half of heap, then setting threshold to half of heap will have null effect - GC will happen on complete heap exhaustion like before. But exactly in such config maintaining heap defragmented is very important, so lower threshold to accommodate that.
2016-07-23extmod/modwebrepl: Use mp_stream_close() method.Paul Sokolovsky
2016-07-23examples/http_client*: Be sure to close socket.Paul Sokolovsky
Otherwise, on bare-metal/RTOS systems can lead to resource leaks.
2016-07-23extmod/modussl_axtls: Use mp_stream_close() method.Paul Sokolovsky
2016-07-23esp8266/_boot.py: Set GC alloc threshold to half of heap size.Paul Sokolovsky
Should keep good chunk of heap unfragmented, if a user application allows that at all.
2016-07-23esp8266: dupterm_task_init() should be called before running _boot.py, etc.Paul Sokolovsky
Because they may use dupterm functionality (e.g. WebREPL running on boot).
2016-07-22examples/embedding: Add README.Paul Sokolovsky
2016-07-22examples/embedding: Example for embedding MicroPython in an app.Paul Sokolovsky
2016-07-22wundows/README: Typo fix.Paul Sokolovsky
2016-07-22mpy-cross: Use binary file translation mode for creating mpy files on windowsstijn
This is a fix for https://github.com/micropython/micropython/issues/2209: by default a file created using open() uses text translation mode so writing \n to it will result in the file having \r\n. This is obviously problematic for binary .mpy files, so provide functions for setting the open mode and use binary mode in mpy-cross' main().
2016-07-22lib/utils/stdout_helpers: Move from minimal/uart_extra.c for reuse.Paul Sokolovsky
2016-07-22tests/bytes_compare: Rework test for bytes <-> str comparison.Paul Sokolovsky
This may produce a warning, depending on MicroPython configuration.
2016-07-22esp8266: Enable MICROPY_PY_STR_BYTES_CMP_WARN.Paul Sokolovsky
2016-07-22unix: Enable MICROPY_PY_STR_BYTES_CMP_WARN.Paul Sokolovsky
Also, fix a warning text (remove "duplicate" BytesWarning).
2016-07-22py/mpconfig.h: Fix description for MICROPY_PY_STR_BYTES_CMP_WARN.Paul Sokolovsky
2016-07-22py/obj: Issue a warning when str and bytes objects are compared.Paul Sokolovsky
Something like: if foo == "bar": will be always false if foo is b"bar". In CPython, warning is issued if interpreter is started as "python3 -b". In MicroPython, MICROPY_PY_STR_BYTES_CMP_WARN setting controls it.