Commit Graph

16847 Commits

Author SHA1 Message Date
Jeff Epler 6669cedf5b make translate 2020-08-04 14:45:45 -05:00
Jeff Epler 65e26f4a06 py: mp_obj_get_type_qstr as macro saves 24 bytes 2020-08-04 14:45:45 -05:00
Jeff Epler c0b32976e8 libm: rem_pio2: Reduce size of static array
This array was of 32-bit values, but the entries were only ever
in the 0-255 range.  Convert to uint8_t.

Testing performed: The result of the sum-of-sin was unchanged
>>> import math; sum(math.sin(2.**i) for i in range(21))
1.42069
2020-08-04 14:45:45 -05:00
Jeff Epler d3fb6c96da libm: ef_rem_pio2.c: Save ROM-tables at the expense of speed
This function computes the remainder of a value `x` modulo pi/2, to high
precision.

It does this by dividing the flotaing point values into several ranges
by magnitude, and applies successively slower but more accurate algorithms.

The last two steps, one covering values up to around 2^7 * pi/2
(called "medium size") and a final one covering all possible float values,
require big tables.

By eliminating the "medium size" case, a table and some code are removed
from the binary.  This makes some cases take longer, but saves hundreds
of bytes.  It does _NOT_ affect the result, only the speed.

```
[desktop python]
>>> sum(math.sin(2.**i) for i in range(21))
1.4206898748939305

[trinket m0, before change to ef_rem_pio2.c]
>>> sum(math.sin(2.**i) for i in range(21))
1.42069

[trinket m0, after change to ef_rem_pio2.c]
>>> sum(math.sin(2.**i) for i in range(21))
1.42069
```
2020-08-04 14:45:45 -05:00
Jeff Epler 710c2dc54b safe_mode: Exclude NORDIC_SOFT_DEVICE_ASSERT str if possible 2020-08-04 14:45:45 -05:00
Jeff Epler d92a77fdd3 main: Allow these arrays to reside in ROM
The missing second "const" made these mutable arrays pointing to
const string data.
2020-08-04 14:45:45 -05:00
Jeff Epler a85b6441fc main: Drop "double extension" detection if not FULL_BUILD
This saves nearly 200 bytes.  Curiously, it also saves RAM.
2020-08-04 14:45:45 -05:00
Jeff Epler 024c8da578 Combine some "can't convert" messages 2020-08-04 14:45:45 -05:00
Jeff Epler d0427cf60c Combine some "safe mode" messages 2020-08-04 14:45:45 -05:00
Jeff Epler c849b781c0 Combine 'index out of range' messages 2020-08-04 14:45:45 -05:00
Jeff Epler 89797fd3f9 various: Use mp_obj_get_type_qstr more widely
This removes runtime allocations of the cstring version of the qstring.

It is not a size improvement
2020-08-04 14:45:45 -05:00
Jeff Epler c37a25f0e5 Use qstrs to save an additional 4 bytes 2020-08-04 14:45:45 -05:00
Jeff Epler 92917b84f1 fix exception type for pop from empty set 2020-08-04 13:58:29 -05:00
Jeff Epler 67eb93fc98 py: introduce, use mp_raise_msg_vlist
This saves a very small amount of flash, 8 bytes on trinket_m0
2020-08-04 13:34:29 -05:00
Jeff Epler dddd25a776 Combine similar strings to reduce size of translations
This is a slight trade-off with code size, in places where a "_varg"
mp_raise variant is now used.  The net savings on trinket_m0 is
just 32 bytes.

It also means that the translation will include the original English
text, and cannot be translated.  These are usually names of Python
types such as int, set, or dict or special values such as "inf" or
"Nan".
2020-08-04 13:34:29 -05:00
Scott Shawcroft c394af4128
Merge pull request #3241 from jepler/translation-percent-space-fixes
locale: Fix percent-space in several translations
2020-08-03 13:29:41 -07:00
Scott Shawcroft 93d76778c9
Merge pull request #3239 from jepler/mpy-cross-dependency-analysis
mpy-cross: fix dependency analysis
2020-08-03 13:14:26 -07:00
Jeff Epler 04734ca7ae locale: Fix percent-space in several translations 2020-08-03 07:13:32 -05:00
Jeff Epler 034b1bb903
Merge pull request #3240 from jerryneedell/jerryn_frozen
update frozen libraries
2020-08-03 07:10:11 -05:00
Jerry Needell 9b3af2b7e3 update frozen submodules 2020-08-03 06:25:29 -04:00
Jeff Epler e666e86035 mpy-cross: fix dependency analysis
Closes: #3074
2020-08-02 20:42:10 -05:00
Jeff Epler 16b7d99041
Merge pull request #3229 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-08-02 16:41:43 -05:00
_fonzlate accc454644
Translated using Weblate (Dutch)
Currently translated at 100.0% (786 of 786 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/nl/
2020-08-02 22:41:59 +02:00
Wellington Terumi Uemura 9477f222be Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (786 of 786 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2020-08-01 20:04:08 +02:00
Jeff Epler e7a78e0847
Merge pull request #3230 from jepler/firmware-size-gemma-trinket
Reduce firmware size on gemma m0, trinket m0
change esp-idf cache tag
2020-08-01 13:04:01 -05:00
Dan Halbert 4860e0cf62 change esp-idf cache tag 2020-08-01 13:21:20 -04:00
Dan Halbert 1771858f4a add RELEASE_NEEDS_CLEAN_BUILD for lang-specific CFLAGS_INLINE_LIMIT changes 2020-08-01 13:20:46 -04:00
Dan Halbert 4b71831d8b
SUPEROPT_VM = 0 for de_DE 2020-08-01 12:36:20 -04:00
Jeff Epler 27c6ffb9a2 atmel-samd: gemma, trinket: Make space for de_DE translation 2020-07-30 11:29:47 -05:00
Hosted Weblate b49f7d1da5
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2020-07-30 14:26:05 +02:00
Jeff Epler 2b1fc15707
Merge pull request #3217 from dhalbert/blm_badge
add blm_badge; add CIRCUITPY_AUDIOBUSIOIO_I2SOUT
2020-07-30 07:25:58 -05:00
Jeff Epler d69f081c04 Merge remote-tracking branch 'origin/main' into blm_badge 2020-07-30 07:24:48 -05:00
Jeff Epler 531c1e046c
Merge pull request #3226 from joeycastillo/main
Small updates to Open Book board
2020-07-30 07:21:50 -05:00
Jeff Epler d4801b8c54
Merge pull request #3225 from hathach/improve-highspeed-usb
Improve highspeed usb
2020-07-30 07:15:20 -05:00
Jeff Epler 510985ffbc
Merge pull request #3227 from cwalther/32bitmap
Cannot assign values to 32-bit Bitmap
2020-07-30 07:13:37 -05:00
Jeff Epler 31b8ecdcbd
Merge pull request #3198 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-07-30 07:13:23 -05:00
Jeff Epler 40eab95d3d
Added translation using Weblate (Hindi) 2020-07-30 04:27:32 +02:00
Christian Walther 8498e7f2cd Fix inability to set values in 32-bit Bitmap. 2020-07-30 00:35:25 +02:00
Hosted Weblate 1b5f171081 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2020-07-29 20:28:33 +02:00
Wellington Terumi Uemura 887f6f3f23 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (782 of 782 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2020-07-29 20:28:33 +02:00
Hosted Weblate 7c387c6d2b Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2020-07-29 20:28:33 +02:00
_fonzlate 31bea079cf Translated using Weblate (Dutch)
Currently translated at 100.0% (784 of 784 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/nl/
2020-07-29 20:28:33 +02:00
Wellington Terumi Uemura 5c4fab744e Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (784 of 784 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2020-07-29 20:28:33 +02:00
Nathan 1c6bff6755 Translated using Weblate (French)
Currently translated at 98.5% (773 of 784 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/
2020-07-29 20:28:33 +02:00
Jonny Bergdahl 7316644bb4 Translated using Weblate (Swedish)
Currently translated at 100.0% (784 of 784 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2020-07-29 20:28:33 +02:00
Alvaro Figueroa 3563c3725c Translated using Weblate (Spanish)
Currently translated at 100.0% (784 of 784 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/
2020-07-29 20:28:33 +02:00
Hosted Weblate 6dc01e179a Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2020-07-29 20:28:33 +02:00
Wellington Terumi Uemura 06f820c0d6 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (783 of 783 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2020-07-29 20:28:33 +02:00
Hosted Weblate 1ea227716d Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2020-07-29 20:28:33 +02:00
dherrada 9f8823e455 Translated using Weblate (Spanish)
Currently translated at 99.8% (782 of 783 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/
2020-07-29 20:28:33 +02:00