Commit Graph

8395 Commits

Author SHA1 Message Date
Damien George f95e4e7782 extmod/vfs_fat_misc: Remove dot-dirs filter since FatFS already does it. 2017-05-13 18:58:46 +10:00
Robert HH 71df60cf42 esp8266/ets_alt_task.c: Prevent spurious large increment of ticks_ms()
This happened when the overflow counter for ticks_ms() was interrupted
by an external hard interrupt (issue #3076).
2017-05-13 17:56:16 +10:00
Scott Shawcroft 790c38e18c atmel-samd: Rework boot, main and REPL order.
Boot will only run once now before USB is started. Its output goes to
boot_out.txt. After main and REPL will run with VM and hardware resets
between each.
2017-05-12 18:26:14 -07:00
Damien George ec534609f6 tools/mpy-tool.py: Use MP_ROM_xxx macros to support nanbox builds. 2017-05-13 10:08:13 +10:00
Scott Shawcroft 7672bf7736 atmel-samd: Rename auto-reset to auto-reload to reduce confusion with physical reset buttons. 2017-05-12 16:45:38 -07:00
Scott Shawcroft e0f931afd3 atmel-samd: Fix pin reset to ensure USB and SWD are not reset. 2017-05-12 16:09:13 -07:00
Scott Shawcroft e1a6f6d584 atmel-samd: Rework SPI flash defines for clarity.
Also add sector protection support for the SAMD Xplained board.
2017-05-12 14:47:39 -07:00
Scott Shawcroft 7ea76e0889 atmel-samd: Pin reset improvements.
* Reset SWD lines to SWD rather than GPIO. This makes OpenOCD happier.
* Default speaker enable lines to False for CircuitPlayground to prevent
  the speaker from buzzing when no sound is playing. Fixes #126
2017-05-12 13:14:01 -07:00
Scott Shawcroft 6984425f5d atmel-samd: Correctly wait for the SPI DMA transaction to finish. 2017-05-12 13:13:50 -07:00
Paul Sokolovsky 5383a50072 zephyr/README: Update to require Zephyr 1.8.
There're a lot of changes and fixes in 1.8 regarding IP stack,
incompatible with previous Zephyr versions, so supporting them
doesn't make sense.

This is  the last commit which should build with Zephyr 1.7.
2017-05-12 22:05:07 +03:00
Paul Sokolovsky d57c6564dc zephyr/prj_qemu_x86.conf: Bump RAM size to 320K. 2017-05-12 21:58:51 +03:00
Paul Sokolovsky 50d7ed325a zephyr/modusocket: Add SOL_SOCKET and SO_REUSEADDR constants. 2017-05-12 21:55:42 +03:00
Paul Sokolovsky 1659c0645d zephyr/modusocket: Add dummy setsockopt() implementation. 2017-05-12 21:54:32 +03:00
Paul Sokolovsky a4e38db30d unix: Move upip to frozen bytecode dir.
For x86_64 build, this saves only 128 bytes on the final executable
size, but still an improvement.
2017-05-12 18:32:25 +03:00
Paul Sokolovsky 5c312861a6 unix/Makefile: Enable frozen bytecode modules dir. 2017-05-12 18:31:22 +03:00
Paul Sokolovsky ddf0b7dbc3 esp8266/scripts: Move initsetup & port_diag tools to modules/. 2017-05-12 17:58:50 +03:00
Paul Sokolovsky e9308c189a esp8266/scripts: Move drivers/modules to modules/ (frozen bytecode). 2017-05-12 17:57:23 +03:00
Paul Sokolovsky 5f7ce2a1ca esp8266/modules/flashbdev: Reserve one sector for native code storage. 2017-05-12 16:08:54 +03:00
Paul Sokolovsky 3e05df7fd1 esp8266/modesp: flash_user_start: Use value from linker script.
Make esp8266_common.ld export size reserved to all code segments, and use
that in esp.flash_user_start() implementation.
2017-05-12 16:00:05 +03:00
Paul Sokolovsky 0987ad5e30 esp8266/esp8266.ld, esp8266_ota.ld: Grow main firmware size by 32KB.
To accommodate both system and user frozen modules.
2017-05-12 16:00:05 +03:00
Tom Collins 760aa0996f tests/basics/lexer: Add line continuation tests for lexer.
Tests for an issue with line continuation failing in paste mode due to the
lexer only checking for \n in the "following" character position, before
next_char() has had a chance to convert \r and \r\n to \n.
2017-05-12 15:14:25 +10:00
Tom Collins 6f56412ec3 py/lexer: Process CR earlier to allow newlines checks on chr1.
Resolves an issue where lexer failed to accept CR after line continuation
character.  It also simplifies the code.
2017-05-12 15:14:24 +10:00
Paul Sokolovsky 5feeba8897 examples/hwapi/hwconfig*: Use inline Signal() args where possible. 2017-05-12 01:19:13 +03:00
Scott Shawcroft c138d0f025 Merge pull request #128 from ntoll/master
Rename LEFT_BUTTON -> BUTTON_A, RIGHT_BUTTON -> BUTTON_B.
2017-05-11 10:04:05 -07:00
Nicholas H.Tollervey f3152571c6
Rename LEFT_BUTTON -> BUTTON_A, RIGHT_BUTTON -> BUTTON_B. 2017-05-11 14:48:17 +01:00
Damien George 1d8c3f4cff mpy-cross/Makefile: Override undefine any inherited variables.
This is a temporary hack to allow othe Makefiles to build mpy-cross
recursively.
2017-05-11 23:40:16 +10:00
Damien George a1f254028d py/mkrules.mk: Add dependency of .mpy files upon mpy-cross.
This ensures that mpy-cross is automatically built (and is up-to-date) for
ports that use frozen bytecode.  It also makes sure that .mpy files are
re-built if mpy-cross is changed.
2017-05-11 23:40:16 +10:00
Damien George 6d221fe284 docs/library/uos: Add description of uos.ilistdir() function. 2017-05-10 12:44:21 +10:00
Damien George d70f688f25 extmod/vfs: Use MP_S_IFDIR, MP_S_IFREG consts instead of magic numbers. 2017-05-10 12:30:34 +10:00
Damien George f1609bc843 ports: Add ilistdir in uos module. 2017-05-10 12:13:53 +10:00
Damien George 852c215d76 tests/extmod/vfs: Update tests to reflect new ilistdir() method. 2017-05-10 11:39:29 +10:00
Damien George d4cd4831b0 extmod/vfs_fat: Replace listdir() with implementation of ilistdir().
VfsFat no longer has the listdir() method.  Rather, if listdir()
functionality is needed then one should use uos.listdir() which will call
VfsFat.ilistdir().
2017-05-10 11:39:28 +10:00
Damien George 87283c1974 extmod/vfs: Implement mp_vfs_ilistdir().
uos.ilistdir() is the core function, returning an iterator that yields
3-tuples.  uos.listdir() is implemented in terms of ilistdir().
2017-05-10 11:39:28 +10:00
Paul Sokolovsky edc02bd952 unix/main: Implement -m option for packages. 2017-05-09 14:22:21 +03:00
Damien George 9bd67d9fbc tests/extmod: Make some vfs tests fully unmount FSs before running.
Otherwise the existing FSs can interfere with the tests, and in some
cases the tests can write to the real FS on the device.
2017-05-09 15:50:40 +10:00
Tom Collins d00d062af2 tests/basics/lexer: Add lexer tests for input starting with newlines. 2017-05-09 14:48:00 +10:00
Tom Collins 2998647c4e py/lexer: Simplify lexer startup by using dummy bytes and next_char().
Now consistently uses the EOL processing ("\r" and "\r\n" convert to "\n")
and EOF processing (ensure "\n" before EOF) provided by next_char().

In particular the lexer can now correctly handle input that starts with CR.
2017-05-09 14:43:23 +10:00
Damien George e711e2d44a tests/basics: Add memoryview test for big ints. 2017-05-09 10:49:19 +10:00
Damien George 2e9e14980d tests/basics: Update array test for big-int with lL typecodes. 2017-05-09 10:46:43 +10:00
Damien George 6cfa61a4cc py/binary: Handle storing big-ints to all arrays types.
Prior to this patch only 'q' and 'Q' type arrays could store big-int
values.  With this patch any big int that is stored to an array is handled
by the big-int implementation, regardless of the typecode of the array.
This allows arrays to work with all type sizes on all architectures.
2017-05-09 10:41:00 +10:00
Scott Shawcroft ef1a4847b3 shared-bindings: Correct PulseIn.resume to match docs. Fixes #125 2017-05-08 11:14:23 -07:00
Paul Sokolovsky 4a4490ffcc py/modio: resource_stream: Implement "package" param handling. 2017-05-06 18:42:35 +03:00
Paul Sokolovsky c1e0eb7afe unix/main: Don't allow to specify too small heap size.
This will lead to crash like:

FATAL: uncaught NLR 80a5420

On x86_32, the minimum heap size is smaller, but not 2 times, so just
use value which works for x86_64.
2017-05-06 11:43:37 +03:00
Damien George 0986675451 stmhal: Convert all module and method tables to use MP_ROM macros. 2017-05-06 17:03:40 +10:00
Damien George 084824f866 tests: Move super-as-local test from cpydiff to basic tests.
It's now possible to use the name "super" as a local variable.
2017-05-06 11:01:57 +10:00
Damien George dce7dd4259 tests/micropython: Add test for int.from_bytes with many zero bytes. 2017-05-06 10:29:09 +10:00
Damien George 58bb73e010 py/objint: In int.from_bytes, only create big-int if really needed.
This patch ensures that int.from_bytes only creates a big-int if necessary,
by checking the value for a small-int overflow as it's being parsed.
2017-05-06 10:29:09 +10:00
Scott Shawcroft c6d539ace3 atmel-samd: Fix sporadic "syntax errors"
The GC was deleting memory that was in use because its scan of the
stack missed the very top. Switching to _estack fixes this by relying
on the location from the linker.

Fixes #124
2017-05-05 12:04:20 -07:00
Tom Collins 288ea06e7c lib/utils/pyexec: Update event-driven REPL to match non-event REPL.
Don't print dupe ">>> " prompt when starting event-driven REPL.  Clear
incomplete line in transition from raw to friendly REPL.
2017-05-05 22:15:47 +10:00
Damien George e62235f8c7 esp8266: Change default settings to mount flash at root dir. 2017-05-05 20:15:10 +10:00