Commit Graph

15417 Commits

Author SHA1 Message Date
jgillick
f884c2b9b6 Incremental update 2020-03-15 19:34:41 -07:00
jgillick
6f153804da Add initial thunderpack port files. 2020-03-14 00:03:14 -07:00
Scott Shawcroft
76ca13b6ed
Fix SAMD51 pulsein 2020-03-13 17:21:15 -07:00
Scott Shawcroft
7100d5e485
Fix autoreload and ticks in general 2020-03-13 16:13:24 -07:00
Scott Shawcroft
df5be65423
Update FrequencyIn for new clock API. 2020-03-13 16:12:52 -07:00
Szymon Klause
9fa270e330 spacing correction 2020-03-13 22:58:39 +01:00
Szymon Klause
c9aa50817c add UARTLogger2 board support for CircuitPython 2020-03-13 21:39:17 +01:00
Scott Shawcroft
4fba4eb133
Switch from 1k RTC input to 32k output 2020-03-13 11:16:41 -07:00
Scott Shawcroft
48b5f2a384
Initial work on SAMD 2020-03-13 11:16:41 -07:00
Scott Shawcroft
affd3fcc2a
Clear the pending IRQ in the NVIC as well. 2020-03-13 11:16:38 -07:00
Scott Shawcroft
00d5f63e7c
Hopefully fix PulseIn 2020-03-13 11:12:31 -07:00
Scott Shawcroft
ed5cdd7e09
Hopefully fix flash flush and hopefully audio as well. 2020-03-13 11:12:31 -07:00
Scott Shawcroft
418333979a
Fix autoreload, neopixel, monotonic_ns and sleep w/o SD 2020-03-13 11:12:31 -07:00
Scott Shawcroft
6f60afe8c5
First try at lowering the power consumption 2020-03-13 11:12:30 -07:00
Scott Shawcroft
3a5f79acef
Merge pull request #2701 from hierophect/stm32-submodule-swap
STM32: Change ST drivers submodule to match TinyUSB
2020-03-13 10:47:54 -07:00
Scott Shawcroft
85f44e20cb
Merge pull request #2695 from TG-Techie/master
Add new TG-Watch02A to the nrf boards directory
2020-03-13 10:46:48 -07:00
TG-Techie
137d5c34fa fix board sorting (due to T being before a anf t) 2020-03-12 20:39:42 -04:00
TG-Techie
7907ef5979 add TG-Watch02A to build workflow 2020-03-12 20:30:45 -04:00
Lucian Copeland
ef7370d023 Change ST drivers submodule to match TinyUSB 2020-03-12 17:14:09 -04:00
hierophect
0f64663c40
Merge pull request #2699 from hierophect/stm32-port-namechange
STM32: port directory name change
2020-03-12 15:45:22 -04:00
Lucian Copeland
18442c5b00 Merge remote-tracking branch 'upstream/master' into stm32-port-namechange 2020-03-12 15:40:44 -04:00
hierophect
dd21ec048a
Merge pull request #2697 from hierophect/stm32-pulsein
STM32: add PulseIn module
2020-03-12 15:39:54 -04:00
Lucian Copeland
0155fab356 Revise style on interrupt handler functions 2020-03-12 15:03:47 -04:00
Lucian Copeland
ead32ea6e6 Comment change for CI 2020-03-12 11:21:32 -04:00
TG-Techie
197dc344af fix requested changes 2020-03-12 02:31:13 -04:00
Lucian Copeland
f81e2c0487 change CI target 2020-03-11 19:00:49 -04:00
Lucian Copeland
7ff336fbc5 Change docs target 2020-03-11 18:50:56 -04:00
Lucian Copeland
127e531271 remove old directory 2020-03-11 18:16:52 -04:00
Lucian Copeland
be7def128a submodule move and sync 2020-03-11 18:16:16 -04:00
Lucian Copeland
53b1544f41 create copy 2020-03-11 18:13:06 -04:00
Lucian Copeland
2a082baa63 Add up to date translations 2020-03-11 17:53:22 -04:00
Lucian Copeland
38064750f9 Merge remote-tracking branch 'upstream/master' into stm32-pulsein 2020-03-11 16:39:11 -04:00
Lucian Copeland
2b161d37df stm32: add PulseIn module 2020-03-11 16:37:40 -04:00
TG-Techie
b967a2071f changed TG-Watch02A HW_BOARD_NAME 2020-03-10 23:07:25 -04:00
TG-Techie
50b451ae0c add TG-Watch02A board def 2020-03-10 22:40:55 -04:00
Scott Shawcroft
d988af02d1
Merge pull request #2690 from jepler/topic-pep-498-fstrings
Implement partial PEP-498 (f-string) support
2020-03-10 10:53:04 -07:00
Dan Halbert
6363b5ad06
Merge pull request #2693 from jepler/ulab-enable
ulab: enable on most builds
2020-03-10 09:48:46 -04:00
Jeff Epler
03a2b2faf1 ulab: don't enable on m0 boards 2020-03-09 23:00:21 -05:00
Jeff Epler
ef195d6e1b Update tests
* string_pep498_fstring.py: Not compatible with python3.5
 * cmd_parsetree.py: enumerated constants changed
2020-03-09 21:13:33 -05:00
Scott Shawcroft
df88939128
Merge pull request #2666 from dhalbert/assert_pin-and-mp_const_none-cleanup
validate various displayio args; new pin validation routines; don't use mp_const_none if NULL will do
2020-03-09 16:35:57 -07:00
Scott Shawcroft
eebe769973
Merge pull request #2692 from jepler/ulab-upstream
ulab: Use https://github.com/v923z/micropython-ulab/
2020-03-09 16:28:56 -07:00
Jeff Epler
491a31a731 circuitpy_mpconfig.mk: Enable ULAB for "full builds"
This enables it on the imxrt and cds56 ports where it was disabled before
2020-03-09 15:54:40 -05:00
Jeff Epler
66aa0dec60 stm32: enable ulab
This is needed because stm32 defines CIRCUITPY_MINIMAL_BUILD "for early
port".
2020-03-09 15:54:40 -05:00
Jeff Epler
e128d770f1 cdx56: prepare to enable ulab
This involves fixing support for SRC_MOD and enabling INTERNAL_LIBM
including adding support for SRC_LIBM.
2020-03-09 15:54:40 -05:00
Jeff Epler
eab9b670d8 ulab: Use https://github.com/v923z/micropython-ulab/
The only delta we were carrying was in the README.
2020-03-09 14:48:52 -05:00
Jeff Epler
473e9c5ffb f-strings: Make optional, defaulting to !CIRCUITPY_MINIMAL_BUILD
This should reclaim *most* code space added to handle f-strings.
However, there may be some small code growth as parse_string_literal
takes a new parameter (which will always be 0, so hopefully the optimizer
eliminates it)
2020-03-09 09:03:25 -05:00
Jeff Epler
32647cd9b4 lexer: catch concatenation of f'' and '' strings
This turns the "edge case" into a parse-time error.
2020-03-09 09:03:25 -05:00
Jeff Epler
acd7b8932f locale: run 'make translate' 2020-03-09 08:19:46 -05:00
Josh Klar
40bc05ee1e Address dpgeorge feedback - largely simplifications 2020-03-09 08:16:07 -05:00
Josh Klar
3a7a5ba686 py: Implement partial PEP-498 (f-string) support
This implements (most of) the PEP-498 spec for f-strings, with two
exceptions:

- raw f-strings (`fr` or `rf` prefixes) raise `NotImplementedError`
- one special corner case does not function as specified in the PEP
(more on that in a moment)

This is implemented in the core as a syntax translation, brute-forcing
all f-strings to run through `String.format`. For example, the statement
`x='world'; print(f'hello {x}')` gets translated *at a syntax level*
(injected into the lexer) to `x='world'; print('hello {}'.format(x))`.
While this may lead to weird column results in tracebacks, it seemed
like the fastest, most efficient, and *likely* most RAM-friendly option,
despite being implemented under the hood with a completely separate
`vstr_t`.

Since [string concatenation of adjacent literals is implemented in the
lexer](534b7c368d),
two side effects emerge:

- All strings with at least one f-string portion are concatenated into a
single literal which *must* be run through `String.format()` wholesale,
and:
- Concatenation of a raw string with interpolation characters with an
f-string will cause `IndexError`/`KeyError`, which is both different
from CPython *and* different from the corner case mentioned in the PEP
(which gave an example of the following:)

```python
x = 10
y = 'hi'
assert ('a' 'b' f'{x}' '{c}' f'str<{y:^4}>' 'd' 'e') == 'ab10{c}str< hi >de'
```

The above-linked commit detailed a pretty solid case for leaving string
concatenation in the lexer rather than putting it in the parser, and
undoing that decision would likely be disproportionately costly on
resources for the sake of a probably-low-impact corner case. An
alternative to become complaint with this corner case of the PEP would
be to revert to string concatenation in the parser *only when an
f-string is part of concatenation*, though I've done no investigation on
the difficulty or costs of doing this.

A decent set of tests is included. I've manually tested this on the
`unix` port on Linux and on a Feather M4 Express (`atmel-samd`) and
things seem sane.
2020-03-09 08:16:07 -05:00