Scott Shawcroft
e54e5e3575
Merge pull request #4564 from tyomitch/patch-1
...
[build] simplify makeqstrdata heuristic
2021-04-19 14:50:42 -07:00
Jeff Epler
76d68f21ac
displayio: Add RGB555/565/_SWAPPED format support
...
This is helpful when displaying frames from an OV7670 camera, which
uses the RGB565_SWAPPED format internally.
2021-04-19 10:23:47 -05:00
Jeff Epler
fc4538f845
WIP: Implement 'ParallelImageCapture' for samd51
2021-04-16 17:18:59 -05:00
Scott Shawcroft
5ccd5dc08b
Fix struct.pack with padding bytes
...
It used to validate the following arg could fit in a single byte.
Now, it always uses zero to pad.
2021-04-16 12:39:23 -07:00
Artyom Skrobov
d9e15adb01
[repl] Don't autocomplete globals after "import "
2021-04-14 12:16:28 -04:00
Dan Halbert
4a7e129287
wip: latent usb device enabling/disabling
2021-04-13 23:33:44 -04:00
Artyom Skrobov
c6ee471b52
Merge branch 'main' of https://github.com/adafruit/circuitpython into patch-3
2021-04-13 00:32:19 -04:00
Scott Shawcroft
bd5a3a3ba4
Merge pull request #4583 from tyomitch/patch-2
...
[qstr] Separate hash and len from string data
2021-04-12 15:06:40 -07:00
Dan Halbert
c333acdbad
Merge pull request #4589 from hugodahl/feature/Remove-MicroPython-mention-in-error-messages
...
Make error messages platform agnostic
2021-04-10 21:30:17 -04:00
Hugo Dahl
36f3897fe3
Make error messages platform agnostic
...
Remove mentions of 'MicroPython' in error messages as they could lead to confusion in lesser-experienced users
2021-04-10 18:36:53 -05:00
Artyom Skrobov
dcee89ade7
build: simplify compute_huffman_coding()
...
No functional change.
2021-04-09 08:36:26 -04:00
Artyom Skrobov
68920682b6
[build] simplify makeqstrdata heuristic
...
The simpler one saves, on average, 51 more bytes per translation;
the biggest translation per board is reduced, on average, by 85 bytes.
2021-04-09 07:18:40 -04:00
Jeff Epler
3ce0b512f8
rasberrypi: IncrementalEncoder: factor out state machine
2021-04-08 16:25:47 -05:00
Artyom Skrobov
c3e40d50ab
[qstr] Separate hash and len from string data
...
This allows the compiler to merge strings: e.g. "update",
"difference_update" and "symmetric_difference_update"
will all point to the same memory.
Shaves ~1KB off the image size, and potentially allows
bigger savings if qstr attrs are initialized in qstr_init(),
and not stored in the image.
2021-04-06 12:58:42 -04:00
Artyom Skrobov
59fa9b01ad
[repl] Autocomplete builtin modules
2021-04-03 16:56:02 -04:00
Artyom Skrobov
1d55dee15b
[repl] Refactor autocomplete, extracting reusable parts
2021-04-03 16:54:34 -04:00
Artyom Skrobov
6e17db3286
[repl] Refactor autocomplete to reduce nesting
2021-04-03 15:54:36 -04:00
Jeff Epler
fb7b968b10
py.mk: locate ulab sources with shell-find.
2021-04-02 13:09:23 -05:00
Jeff Epler
dc9daba906
update ulab to 2.1.5
2021-04-02 13:09:23 -05:00
Artyom Skrobov
8056af8648
[synthio] add a simple MidiTrack implementation
2021-03-26 16:38:10 -04:00
Artyom Skrobov
d7dc3801ab
[ure] to save space, disable debug dumps by default
...
Has to stay enabled in unix port for the sake of tests/extmod/ure_debug.py
2021-03-26 13:24:20 -04:00
microDev
a52eb88031
run code formatting script
2021-03-15 19:27:36 +05:30
Dan Halbert
5ace7af933
disable default usb_cdc
2021-03-11 11:20:29 -05:00
Jeff Epler
1e5ffe1a53
Revert "circuitpy_mpconfig: Disable flash multi-partition"
...
This reverts commit 156ee4833a
.
2021-03-09 11:08:36 -06:00
Scott Shawcroft
b5a955a168
Merge pull request #4354 from jepler/disable-fat-partition
...
circuitpy_mpconfig: Disable flash multi-partition
2021-03-08 15:25:58 -08:00
Jeff Epler
156ee4833a
circuitpy_mpconfig: Disable flash multi-partition
...
This adds some additional code in mkfs which doesn't seem necessary, and
Disabling it saves 172 bytes flash.
Testing performed: Using a Feather M0 Adalogger, checked that
* an sdcard could still be mounted (using adafruit_sdcard)
* os.listdir() of "/" and "/sd" worked
* CIRCUITPY still mounted
2021-03-07 09:37:18 -06:00
Jeff Epler
4f040af481
vm: Make the speed-size trade-off compile time settable
...
.. and enable for all samd21 boards
2021-03-05 18:29:27 -06:00
Jeff Epler
7b359d7a8a
vm: Consolodate all dispatch instructions
...
Flash savings: 1268 bytes
Performance: 10,000 iteration loop .665 -> .676s (+1.7%)
2021-03-05 16:52:35 -06:00
Jeff Epler
28638df589
vm: cut vmentrytable size
...
This also adds a bit of code everywhere we DISPATCH(), but the net is
+232 bytes free on Feather M0 Adalogger.
Key assumption: All of the offsets in mp_execute_bytecode fit in 16 bits;
it is not clear whether the compiler will verify this assumption (e.g.,
by warning that a constant will be truncated)
2021-03-05 16:52:35 -06:00
Scott Shawcroft
e4f0e47d9f
Merge pull request #4233 from pewpew-game/displayio-group-list
...
displayio: make Group use a python list internally
2021-03-02 09:59:58 -08:00
Scott Shawcroft
d0eab5c561
Merge pull request #4256 from kmatch98/bt_cleanup
...
Add `bitmaptools` module
2021-03-01 18:24:12 -08:00
Radomir Dopieralski
24473b7983
Separate out mp_obj_list_insert for use in display.Group
...
Note that for some reason this makes the binary 500 bytes larger!
2021-02-27 21:13:55 +01:00
Radomir Dopieralski
e505c59ed8
Separate mp_obj_list_pop so it can be used outside of objlist.c
2021-02-27 20:52:38 +01:00
Scott Shawcroft
3f08cb47b8
Merge remote-tracking branch 'adafruit/main' into busio-uart-rp
2021-02-25 16:59:15 -08:00
Scott Shawcroft
52bc935fa7
A few minor fixes for corner cases
...
* Always clear the peripheral interrupt so we don't hang when full
* Store the ringbuf in the object so it gets collected when we're alive
* Make UART objects have a finaliser so they are deinit when their
memory is freed
* Copy bytes into the ringbuf from the FIFO after we read to ensure
the interrupt is enabled ASAP
* Copy bytes into the ringbuf from the FIFO before measuring our
rx available because the interrupt is based on a threshold (not
> 0). For example, a single byte won't trigger an interrupt.
2021-02-25 16:50:57 -08:00
Kevin Matocha
a7a4f93ff8
Updated build configs to turn off BITMAPTOOLS for smaller builds
2021-02-25 15:44:32 -06:00
Kevin Matocha
b720028642
Add bitmaptools module
2021-02-23 23:23:14 -06:00
Dan Halbert
7a4198885e
Fix typos for CIRCUITPY_USB_HID_SYS_CONTROL
2021-02-23 09:22:20 -05:00
Dan Halbert
93bf269c0d
Avoid pulling in extra float-uint64 routines
2021-02-21 12:05:03 -05:00
Jeff Epler
a04369e0f5
add ifdef-guard
2021-02-20 17:41:08 -06:00
Jeff Epler
646eb9a7db
py: memoryview: implement memoryview.cast if CPYTHON_COMPAT
2021-02-20 10:35:36 -06:00
Dan Halbert
076a7b7161
CIRCUITPY_BITOPS merge error
2021-02-19 15:30:27 -05:00
Dan Halbert
67406488d1
merge from upstream; re-alphabetize
2021-02-19 14:22:50 -05:00
Jeff Epler
72e8fb085c
remove debug print during build
2021-02-18 16:01:23 -06:00
Jeff Epler
7fd4567893
bitops: rename from _bit_transpose, describe the algorithm
2021-02-18 15:41:23 -06:00
Jeff Epler
9cf7d73c6c
core: add bit_transpose function
...
.. this version can only handle exactly 8 bits "across". The restriction
may be relaxed in a future revision.
2021-02-18 11:32:47 -06:00
Dan Halbert
ed49c02feb
add timeout; finish up for PR
2021-02-17 23:24:11 -05:00
Dan Halbert
93d788543c
Merge remote-tracking branch 'adafruit/main' into secondary-cdc
2021-02-15 20:03:53 -05:00
Bernhard Boser
f8f59598c7
memoryview is valid argument to exec
2021-02-15 10:05:57 -08:00
Dan Halbert
d54b5861a3
wip
2021-02-12 19:01:14 -05:00
Dan Halbert
f0564b4986
merge from upstream; complicated webusb merge
2021-02-11 18:50:02 -05:00
Dan Halbert
0802b22ed6
usb descriptors all set; rework of enabling for USB devices
2021-02-04 19:23:40 -05:00
Kevin Banks
215a56c920
Merge branch 'main' into webusb (trying to get CI back online)
2021-02-03 16:48:28 -06:00
Damien George
78b23c3a1f
all: Bump version to 1.14.
...
Signed-off-by: Damien George <damien@micropython.org>
2021-02-03 00:59:07 +11:00
Lucian Copeland
66639b237f
Merge remote-tracking branch 'upstream/main' into sslsocket
2021-02-01 11:43:01 -05:00
iTitou
4fb5f012c3
py/makeversionhdr: Honor SOURCE_DATE_EPOCH if present.
...
This environment variable, if defined during the build process,
indicates a fixed time that should be used in place of "now" when
such a time is explicitely referenced.
This allows for reproducible builds of micropython.
See https://reproducible-builds.org/specs/source-date-epoch/
Signed-off-by: iTitou <moiandme@gmail.com>
2021-01-31 17:48:59 +01:00
David CARLIER
cb30928ac8
py/persistentcode: Introduce MICROPY_PERSISTENT_CODE_SAVE_FILE option.
...
This should be enabled when the mp_raw_code_save_file function is needed.
It is enabled for mpy-cross, and a check for defined(__APPLE__) is added to
cover Mac M1 systems.
2021-01-30 15:13:24 +11:00
stijn
cb8e2f02ab
py/gc: Fix debug printing of pointer.
...
When DEBUG_printf is the standard printf, compilers require the value for
%p to be an actual pointer instead of an integer.
2021-01-30 14:41:29 +11:00
stijn
b9a35bebf7
py/qstr.h: Remove QSTR_FROM_STR_STATIC macro.
...
It practically does the same as qstr_from_str and was only used in one
place, which should actually use the compile-time MP_QSTR_XXX form for
consistency; qstr_from_str is for runtime strings only.
2021-01-30 13:40:48 +11:00
graham sanderson
794df0f1d5
py/emitnative: Support binary ops on ARMv6M without use of ite instr.
2021-01-29 23:57:10 +11:00
Damien George
75fea330bf
py/emitinlinethumb: Exclude code using #if when ARMV7M disabled.
...
So there are no references to undeclared asm_thumb_mov_reg_i16().
Signed-off-by: Damien George <damien@micropython.org>
2021-01-29 23:57:10 +11:00
Damien George
c9f4c5acd6
py/emitnative: Ensure encoding to load prelude_offset doesn't change sz.
...
Based on change made by Graham Sanderson.
Signed-off-by: Damien George <damien@micropython.org>
2021-01-29 23:57:10 +11:00
graham sanderson
40d2010882
py/asmthumb: Add support for ARMv6M in native emitter.
...
Adds a new compile-time option MICROPY_EMIT_THUMB_ARMV7M which is enabled
by default (to get existing behaviour) and which should be disabled (set to
0) when building native emitter support (@micropython.native) on ARMv6M
targets.
2021-01-29 23:57:10 +11:00
Damien George
925bd67cfb
py/objfun: Support fun.__globals__ attribute.
...
This returns a reference to the globals dict associated with the function,
ie the global scope that the function was defined in. This attribute is
read-only but the dict itself is modifiable, per CPython behaviour.
Signed-off-by: Damien George <damien@micropython.org>
2021-01-29 23:57:10 +11:00
Kevin Banks
b152c658e2
Making WebUSB default to off (build unbreakage, caught by CI)
2021-01-26 18:18:39 -06:00
Dan Halbert
13812a788f
Merge pull request #4060 from dhalbert/regularize-extmod-modules
...
CIRCUITPY_* switches for JSON, RE, etc. Doc cleanup
2021-01-26 12:54:21 -05:00
Dan Halbert
da6869dbd5
Set MICROPY_PY_UERRNO_ERRORCODE correctly
2021-01-26 08:37:05 -05:00
Dan Halbert
a9f339b461
typo in circuitpy_mpconfig.h; forgot cxd56 port
2021-01-25 22:40:31 -05:00
Kevin Banks
fbfb7b68cc
Most of the code we need has been pulled in from the tinyusb webusb_serial demo. Still LOTS to do regarding descriptors.
2021-01-25 20:37:58 -06:00
Scott Shawcroft
a2ac2da7cc
Merge pull request #3936 from gamblor21/busdevice_fixes
...
Changing adafruit_bus_device to duck typing
2021-01-25 14:41:53 -08:00
Lucian Copeland
9f34ec78c4
Separate Socket and SSLSocket, add LWIP connect
2021-01-25 17:07:25 -05:00
Dan Halbert
69869e1439
CIRCUITPY_* switches for JSON, RE, etc. Doc cleanup
2021-01-24 23:10:20 -05:00
Dan Halbert
e3275be8b1
Merge pull request #3911 from hugodahl/add-translation-for-builtin-object-help
...
Update built-in help output for localization (Issue #3907 )
2021-01-22 03:49:19 -05:00
Scott Shawcroft
b7a63dc498
Alphabetical
2021-01-21 10:18:04 -08:00
Scott Shawcroft
733094aead
Add initial RP2040 support
...
The RP2040 is new microcontroller from Raspberry Pi that features
two Cortex M0s and eight PIO state machines that are good for
crunching lots of data. It has 264k RAM and a built in UF2
bootloader too.
Datasheet: https://pico.raspberrypi.org/files/rp2040_datasheet.pdf
2021-01-20 19:16:56 -08:00
gamblor21
f50c9f4145
Reenabling busdevice in core
2021-01-16 14:21:57 -06:00
Hugo Dahl
8094435193
Merge branch 'main' of https://github.com/adafruit/circuitpython into add-translation-for-builtin-object-help
2021-01-14 22:12:30 -06:00
Jeff Epler
1ca29ec47c
Merge remote-tracking branch 'origin/main' into audioout-esp32
2021-01-12 09:23:07 -06:00
Hugo Dahl
2d8404c599
Merge branch 'main' into add-translation-for-builtin-object-help
2021-01-11 18:32:07 -06:00
Scott Shawcroft
ba507a8193
Merge pull request #3957 from dhalbert/gcc10-debug-builds
...
new CIRCUITPY_DEBUG flag passes DEBUG into C preprocessor
2021-01-11 15:36:12 -08:00
Dan Halbert
255ffa979c
avoid inline compile errors
2021-01-08 23:07:21 -05:00
Jeff Epler
30c6dd3f76
Merge remote-tracking branch 'origin/main' into audioout-esp32
2021-01-07 14:11:14 -06:00
iot49
1a82555803
Merge branch 'main' into msgpack
2021-01-05 11:19:11 -08:00
Hugo Dahl
ad7f4d8ae9
Merge branch 'main' of https://github.com/adafruit/circuitpython into add-translation-for-builtin-object-help
...
* 'main' of https://github.com/adafruit/circuitpython :
update wake-alarm implementation
enable light-sleep functionality
update frozen libs for 6.1.0-beta.3
Revert "Removing frozen libs"
add pretend-to-sleep functionality
expose wake pin parameter and more tweaks
add touch alarm support for esp32s2
implement touch alarm
2020-12-30 23:37:55 -06:00
Hugo Dahl
1407af7291
Add localization for built-in help
...
Support localizing the output of a call to to match the
firmware's language.
2020-12-30 18:20:43 -06:00
microDev
28ce5e8988
Merge branch 'main' into touch-s2
2020-12-30 22:44:22 +05:30
Jeff Epler
2cd377f1a7
audiobusio: Make PDMIn optional
2020-12-29 14:06:32 -06:00
Dan Halbert
8061a2574d
Merge branch 'main' into pin_alarm
2020-12-23 22:05:02 -05:00
Jeff Epler
42a229c08b
circuitpy_mpconfig.mk: Unconditionally disable CIRCUITPY_BUSDEVICE
...
Several issues have been found in the implementation. While they're
unresolved, it may be better to disable the built-in module. (This
means that to work on fixing the module, it'll be necessary to
revert this commit)
2020-12-23 10:45:07 -06:00
Scott Shawcroft
1fca297a2d
A couple sleep fixes
...
* Better messaging when code is stopped by an auto-reload.
* Auto-reload works during sleeps on ESP32-S2. Ticks wake up the
main task each time.
* Made internal naming consistent. CamelCase Python names are NOT
separated by an underscore.
2020-12-22 16:13:02 -08:00
microDev
8eaf2b0c19
implement touch alarm
2020-12-18 12:54:36 +05:30
microDev
4512290ba0
Merge branch 'main' into ota-s2
2020-12-18 00:44:00 +05:30
microDev
4863413bc9
rename ota to dualbank
2020-12-18 00:34:56 +05:30
Dan Halbert
8f9cd7075e
Merge pull request #3752 from jepler/gcc10
...
build: Update to gcc10
2020-12-17 11:03:40 -05:00
Scott Shawcroft
1ad49d9a18
Add alarm.pin that wakes on pin level
...
Fixes #3787
2020-12-15 18:12:59 -08:00
Jeff Epler
afcc00fed4
Merge pull request #3771 from cwalther/exceptionprint
...
#3702 breaks printing an exception twice
2020-12-15 08:11:28 -06:00
Scott Shawcroft
d076296659
Merge pull request #3816 from dhalbert/sleepmemory
...
alarm.sleep_memory + alarm.wake_alarm
2020-12-14 17:40:02 -08:00
Dan Halbert
6abe3cd0ef
-Os for SAMD51; fix CSUPEROPT typo
2020-12-14 18:57:31 -05:00
Damien George
246b2e016a
py/mkrules.mk: Remove stray vpath and unused -Itmp, add $(Q) for $(AR).
...
Signed-off-by: Damien George <damien@micropython.org>
2020-12-14 13:57:15 +11:00
Damien George
0091041f5a
py/modmath: Simplify handling of positional args to reduce code size.
...
As a general pattern, required positional arguments that are not named do
not need to be parsed using mp_arg_parse_all().
Signed-off-by: Damien George <damien@micropython.org>
2020-12-14 13:30:56 +11:00