Commit Graph

12048 Commits

Author SHA1 Message Date
Dan Halbert 990da6d363 wasn't always clearing boot_output_file 2018-05-19 01:01:37 -04:00
Keith Wiley 3ea0862a6e tools/pydfu.py: Fix typo in comments. 2018-05-18 23:33:19 +10:00
Damien George 828ce16dc8 py/compile: Change comment about ITER_BUF_NSLOTS to a static assertion. 2018-05-18 23:31:00 +10:00
Damien George 43d08d6dd6 py/misc.h: Add MP_STATIC_ASSERT macro to do static assertions. 2018-05-18 23:31:00 +10:00
Tobias Badertscher 769e37b646 stm32/boards: Add config files for new board, STM32L496GDISC. 2018-05-18 22:39:49 +10:00
Tobias Badertscher 4005c63571 stm32/boards: Add board ld and af.csv files for STM32L496 MCU. 2018-05-18 22:39:44 +10:00
Tobias Badertscher 708cdb6276 stm32: Add support for STM32L496 MCU. 2018-05-18 22:37:30 +10:00
Noralf Trønnes 95e70cd0ea time: Use 1970 epoch
Use UNIX epoch to match CPython.
This overflows small int so time.{time,localtime,mktime} is only supported with long int.
Also remove some comment cruft in time_time().
2018-05-18 12:35:33 +02:00
Noralf Trønnes cf33ad9a54 atmel-samd/samd21: Enable long int on Express boards
This is necessary for using 1970 epoch in the time module.
2018-05-18 12:35:26 +02:00
Li Weiwei 3e6ab82179 py/repl: Fix handling of unmatched brackets and unfinished quotes.
Before this patch:

    >>> print(')
    ... ')
    Traceback (most recent call last):
      File "<stdin>", line 1
    SyntaxError: invalid syntax

After this patch:

    >>> print(')
    Traceback (most recent call last):
      File "<stdin>", line 1
    SyntaxError: invalid syntax

This matches CPython and prevents getting stuck in REPL continuation when a
1-quote is unmatched.
2018-05-18 15:23:02 +10:00
Damien George 869024dd6e py/vm: Improve performance of opcode dispatch when using switch stmt.
Before this patch, when using the switch statement for dispatch in the VM
(not computed goto) a pending exception check was done after each opcode.
This is not necessary and this patch makes the pending exception check only
happen when explicitly requested by certain opcodes, like jump.  This
improves performance of the VM by about 2.5% when using the switch.
2018-05-18 11:47:03 +10:00
Damien George 46ce395130 py/vm: Use enum names instead of magic numbers in multi-opcode dispatch. 2018-05-18 11:44:26 +10:00
Scott Shawcroft 1eb412b44d
Merge pull request #845 from matt-land/feature-default-serial
Feature: default UART (serial)
2018-05-17 13:59:15 -05:00
Matt Land 06b293af29 pirkey, trinket, ugame 2018-05-17 13:56:10 -04:00
Matt Land a84845c0ae itsbitsy, metro 2018-05-17 13:48:33 -04:00
Matt Land 173a0a5faa arduino, circuitplayground, feather boards 2018-05-17 13:42:08 -04:00
Matt Land fc2b4526d3 worked 2018-05-17 13:33:26 -04:00
Matt Land e1cccd3dac rename to UART 2018-05-17 13:21:15 -04:00
Matt Land 2210fc60b1 Merge branch 'master' of https://github.com/adafruit/circuitpython into feature-default-serial 2018-05-17 13:08:43 -04:00
Scott Shawcroft 8581ee3f0e
Merge pull request #844 from matt-land/feature-default-spi-circuit-playground
Feature: 'default' SPI support for atmel-samd boards
2018-05-17 12:07:38 -05:00
Matt Land c846f4bdae remove newline 2018-05-17 12:17:06 -04:00
Matt Land 75cb1d1746 Merge branch 'master' of https://github.com/adafruit/circuitpython into feature-default-spi-circuit-playground 2018-05-17 12:15:15 -04:00
Matt Land 4fd4adf974 not working 2018-05-17 12:14:51 -04:00
Scott Shawcroft 91db71ed45
Merge pull request #841 from matt-land/feature-i2c-gemma
Feature: shortcut I2C support for atmel-samd boards
2018-05-17 11:13:48 -05:00
Damien George 58331e3c28 esp8266/modmachine: Allow I2C and SPI to be configured out of the build.
I2C costs about 3000 bytes of code, and SPI costs about 4400 bytes.
2018-05-17 23:37:12 +10:00
Damien George 1e2a6a84a2 extmod/modlwip: Set POLLHUP flag for sockets that are new.
This matches CPython behaviour on Linux: a socket that is new and not
listening or connected is considered "hung up".

Thanks to @rkojedzinszky for the initial patch, PR #3457.
2018-05-17 23:17:36 +10:00
Damien George dd13065843 esp8266/modnetwork: Raise ValueError when getting invalid WLAN id.
Instead of crashing due to out-of-bounds array access.  Fixes #3348.
2018-05-17 22:12:24 +10:00
Damien George f8a5cd24d8 esp8266/modnetwork: Return empty str for hostname if STA is inactive.
Instead of crashing due to NULL pointer dereference.  Fixes issue #3341.
2018-05-17 22:11:22 +10:00
hathach 6d4a2f5524 Merge branch 'master' into usbboot 2018-05-17 15:23:45 +07:00
hathach 52ebfd07a5 update nrfutil to 0.5.2d with singlebank option 2018-05-17 15:20:07 +07:00
Damien George 94a79f340d esp8266/mpconfigport.h: Add some weak links to common Python modules.
To make it easier/simpler to write code that can run under both CPython and
on an ESP8266 board.
2018-05-17 13:27:18 +10:00
Damien George 7d7b9cd5df lib/lwip: Update lwIP to v2.0.3, tag STABLE-2_0_3_RELEASE. 2018-05-17 13:11:31 +10:00
Damien George 9c2044717c extmod/modlwip: Update to work with lwIP v2.0.
lwIP v2.0.3 has been tested with this lwip module and it works very well.
2018-05-17 12:58:34 +10:00
Tom Collins a883fe12d9 py/objfun: Fix variable name in DECODE_CODESTATE_SIZE() macro.
This patch fixes the macro so you can pass any name in, and the macro will
make more sense if you're reading it on its own.  It worked previously
because n_state is always passed in as n_state_out_var.
2018-05-17 11:20:06 +10:00
Matt Land 30c625ff46 Merge branch 'feature-i2c-gemma' into feature-default-spi-circuit-playground 2018-05-16 17:58:03 -04:00
Matt Land 0511becd55 Merge branch 'master' of https://github.com/adafruit/circuitpython into feature-i2c-gemma 2018-05-16 17:55:43 -04:00
Scott Shawcroft 6a8db03ade
Merge pull request #838 from rhooper/master
add supervisor.reload() to soft reboot from code
2018-05-16 17:52:16 -04:00
Matt Land b9b742cc69 add spi def to all boards pins file 2018-05-16 17:43:14 -04:00
Matt Land c2fa892a02 fix formatting 2018-05-16 17:38:44 -04:00
Matt Land cc52f8efd9 Merge branch 'feature-i2c-gemma' into feature-default-spi-circuit-playground 2018-05-16 17:32:50 -04:00
Scott Shawcroft 918d30cb97
Rephrase the doc 2018-05-16 16:28:43 -05:00
Matt Land 0a185c4d2d Merge branch 'master' of https://github.com/adafruit/circuitpython into feature-i2c-gemma 2018-05-16 17:07:58 -04:00
Matt Land e8e75c056a For the two boards without SCL and SDA can you still add the board global entry for I2C? That way they'll raise the NotImplementedError with the better message instead of a NameError. 2018-05-16 17:02:41 -04:00
Scott Shawcroft 07c0a3227d
Merge pull request #843 from jerryneedell/jerryn_errno
fix ESP8266 build - clear MICROPY_USE_INTERNAL_ERRNO
2018-05-16 16:55:35 -04:00
Jerry Needell 4f93467841 set #define MICROPY_USE_INTERNAL_ERRNO (0) in mpconfigport for ESP8266 to fix compile error 2018-05-16 16:10:32 -04:00
Matt Land de885e81b1 Merge branch 'feature-i2c-gemma' into feature-default-spi-circuit-playground 2018-05-16 16:07:55 -04:00
Matt Land 8a351595ef formatting, trailing newlines 2018-05-16 15:57:25 -04:00
Matt Land 2c067edf54 used pins.c instead of README.rst 2018-05-16 15:54:01 -04:00
Matt Land 3144654854 SPI for all boards 2018-05-16 15:36:36 -04:00
Matt Land 244866c2c3 spi on much 2018-05-16 15:25:24 -04:00