Commit Graph

4743 Commits

Author SHA1 Message Date
Max Holliday f16a4754ba changed boot counter #ifdef to safer #if 2021-09-17 14:40:16 -06:00
Max Holliday 818020d4c9
Merge branch 'adafruit:main' into pycubed_v05c 2021-09-17 14:35:17 -06:00
Jeff Epler 2916167bf4 paralleldisplay: make it actually importable 2021-09-16 14:11:16 -05:00
Max Holliday 5b69aa0a58
Merge branch 'adafruit:main' into pycubed_v05c 2021-09-15 14:23:56 -06:00
Scott Shawcroft e544909b5b
Clear the buffer byte between ATB and FTB
This ensures it has a known start state. An unknown state risks it
looking like a tail block similar to the problem fixed by #5245.

Fixes #5305
2021-09-14 16:24:37 -07:00
Scott Shawcroft 973a90f2aa
Rename esp32s2 port to espressif
This is in preparation for ESP32-S3 support and potentially others.

Related to #4363
2021-09-13 16:44:55 -07:00
Max Holliday fa83c1c2f9
adding boot counter to main.c
The boot counter is a uint8_t single-byte counter stored in the first NVM byte position (`micrcontroller.nvm[0]`). The counter increments by 1 each time the board boots, regardless if it's a hard or soft reset. 

Enable the boot counter by adding `#define CIRCUITPY_BOOT_COUNTER 1` to your board's mpconfigboard.h file. Note that an error will be thrown during the build if `CIRCUITPY_INTERNAL_NVM_SIZE` is not also set within mpconfigboard.h.
2021-09-08 19:56:23 -06:00
microDev 86221b9895
revert localization of repl messages 2021-09-07 16:28:00 +05:30
microDev d526925d49
make aesio module full build dependent 2021-09-02 19:02:01 +05:30
Rob Capellini 9002f351b4 Convert more modules to use MP_REGISTER_MODULE
Convert _eve, _pew, aesio, alarm, audiopwmio, bitops, camera, canio, dualbank, gnss, i2cperipheral, imagecapture, ipaddress, memorymonitor, sdioio, socketpool, ssl, uheap, ustack, watchdog, and wifi modules to use MP_REGISTER_MODULE.

Related to #5183.
2021-09-01 00:19:05 -04:00
Scott Shawcroft 92a43192f8
Fix mpy-cross by providing default 2021-08-31 13:38:37 -07:00
Scott Shawcroft 771b4c7464
Add two space saving knobs
* Reduce the number of supported HID reports of IDs per descriptor.
  This saves ~200 bytes in the default HID objects.
* (Not enabled) Compute QSTR attrs on init. This trades 1k RAM for
  flash. Flash is the default (1).
2021-08-31 13:02:34 -07:00
Rob Capellini 1c8828223f Convert more modules to use MP_REGISTER_MODULE
Convert neopixel_write, onewireio, ps2io, pulseio, pwmio, rainbowio, random, rgbmatrix, rotaryio, rtc, sdcardio, sharpdisplay, _stage, storage, struct, supervisor, synthio, touchio, traceback, usb_cdc, usb_hid, usb_midi, and vectorio modules to use MP_REGISTER_MODULE.

Related to #5183.
2021-08-30 22:29:51 -04:00
Scott Shawcroft 5fb4fa6f12
Merge pull request #5260 from jepler/paralleldisplay
Split out paralleldisplay to its own module
2021-08-30 18:35:15 -07:00
Jeff Epler db3945edfe Make %p include the 0x prefix
.. and modify some messages where 0x was specified "manually".

This involves updating some tests to expect the new 0x to appear.
2021-08-29 11:36:29 -05:00
Jeff Epler 266b6a1dd9 mkrules: Fix warning preprocessing C++ files
Messages like 'command-line option is [not valid] for C++' can result
from the way the preprocessor is invoked by `genlast`.  Instead, cause
the files to be preprocessed as though their content is "C".  This
should generally be OK, as they'll eventually be _compiled_ as C++.
When preprocessed as C, the file simply needs to generate all the same
QSTRS and TRANSLATEs.
2021-08-29 11:36:17 -05:00
Jeff Epler 7520feed1c Move ParallelBus to its own module 2021-08-29 07:33:54 -05:00
Scott Shawcroft 31b9dd408d
Merge pull request #5245 from jepler/pool-fix-circuitpython
gc.c: Ensure a gap of one byte before the finaliser table.
2021-08-27 09:33:05 -07:00
Jeff Epler 955c0276c2 Merge remote-tracking branch 'origin/main' into pool-fix-circuitpython 2021-08-27 09:26:29 -05:00
Jeff Epler 5a162eb168 gc.c: Ensure a gap of one byte before the finaliser table.
.. or, for !MICROPY_ENABLE_FINALISER, before the first block of the pool.

Closes: adafruit/circuitpython#5021
Closes: micropython/micropython#7116
Signed-off-by: Jeff Epler <jepler@gmail.com>
2021-08-27 09:23:08 -05:00
Jeff Epler 15133cbf59 gc.c: Avoid valgrind false positives.
When you wish to use the valgrind memory analysis tool on micropython,
you can arrange to define MICROPY_DEBUG_VALGRIND to enable use of
special valgrind macros. For now, this only fixes `gc_get_ptr`
so that it never emits the diagnostic "Conditional jump or move depends
on uninitialised value(s)".

Signed-off-by: Jeff Epler <jepler@gmail.com>
2021-08-27 09:23:08 -05:00
Rob Capellini b8f2799609 Convert more modules to use MP_REGISTER_MODULE
Convert bitbangio, bitmaptools, _bleio, board, busio, countio, digitalio, framebufferio, frequencyio, gamepadshift, getpass, keypad, math, microcontroller, and msgpack modules to use MP_REGISTER_MODULE.

Related to #5183.
2021-08-26 21:35:02 -04:00
Dan Halbert a608934f31 restrict WaveFile buffer size to 8-1024 2021-08-26 09:34:02 -04:00
microDev 5425454341
Merge pull request #5208 from jepler/small-memory-savings
Small memory savings
2021-08-26 09:22:14 +05:30
Rob Capellini ad103ac6f1 Convert more modules to use MP_REGISTER_MODULE
Convert adafruit_bus_device, adafruit_pixelbuf, analogio, atexit, audiobusio, audiocore, audioio, audiomixer, and audiomp3 modules to use MP_REGISTER_MODULE.

Related to #5183.
2021-08-25 20:48:55 -04:00
Rob Capellini deb8e2a50a Remove comment that no longer applies 2021-08-24 20:55:39 -04:00
Rob Capellini 17af5cd492 Use MP_REGISTER_MODULE with displayio, terminalio, and fontio
Convert from using MICROPY_PORT_BUILTIN_MODULES_STRONG_LINKS to using MP_REGISTER_MODULE for displayio, terminalio, and fontio modules.

Related to #5183.
2021-08-24 20:07:10 -04:00
Jeff Epler 6d26225b60 objgenerator: Unify two messages 2021-08-23 20:27:20 -05:00
Jeff Epler c310a618e8 objtraceback: merge with an existing message in objtype 2021-08-23 20:23:23 -05:00
microDev 57b4d0176f
Merge pull request #5077 from microDev1/atexit
Add atexit module
2021-08-23 19:49:46 +05:30
Dan Halbert 57841dc92b
Merge pull request #5171 from tannewt/unicode_filenames
Turn on unicode for FATFS
2021-08-21 16:31:54 -04:00
microDev 25437dcb33
Merge branch 'main' into atexit 2021-08-20 09:45:54 +05:30
microDev dd5b711dc7
Merge pull request #5166 from jepler/issue5154
Don't double-list modules that MP_REGISTER_MODULE
2021-08-20 09:25:03 +05:30
Scott Shawcroft 5c6e80a2bb
Shrink builds by defining advanced micropython API
Also, ignore more pins on SAMD boards and disable EXFAT on others.
2021-08-19 16:49:33 -07:00
Jeff Epler f1bbf406c4 remove a straggling QRIO_MODULE mention 2021-08-19 14:01:14 -05:00
Scott Shawcroft e0ce5ff045
Fix some builds by disabling exfat 2021-08-18 08:22:29 -07:00
Scott Shawcroft 11f1c42bb5
Turn on unicode for FATFS
This also tweaks the repr for unicode strings to only escape a few
utf-8 code points. This makes emoji show in os.listdir() for
example.

Also, enable exfat support on full builds.

Fixes #5146
2021-08-17 17:41:59 -07:00
Dan Halbert 5b0009cbc4
Merge pull request #5151 from dhalbert/usb_hid-changes
Support multiple reports per device in usb_hid
2021-08-17 17:14:28 -04:00
microDev 6c763762d4
restore sys.atexit() to prevent merge conflict 2021-08-17 10:13:01 +05:30
Scott Shawcroft 58b3b48939
Merge pull request #5157 from DavePutz/issue_5155
Make MICROPY_CPYTHON_COMPAT settable
2021-08-16 12:15:35 -07:00
microDev 1c4a6c3667
atexit module refinements
- add test for atexit module
- add callback to gc collection
- fix callback memory allocation
- execute callback on both code and repl exit
2021-08-16 21:37:32 +05:30
Jeff Epler ccc371ed53 Don't double-list modules that MP_REGISTER_MODULE
Closes: #5154
2021-08-16 08:50:57 -05:00
root 6c0e983658 Make MICROPY_CPYTHON_COMPAT settable 2021-08-15 20:49:24 -05:00
microDev 27563936ed
fix crash on raise of reload exception 2021-08-15 11:11:11 +05:30
Dan Halbert 4f8ff12afa wip 2021-08-14 12:36:40 -04:00
Scott Shawcroft 49dcdef512
Fix copy pasta 2021-08-13 11:32:26 -07:00
Scott Shawcroft de796e2304
Move OneWire to `onewireio` from `busio`
This will allow finer grained inclusion in 8.0.0

Fixes #5135
2021-08-12 10:47:14 -07:00
Scott Shawcroft fb6b438580
Make `getpass` and `traceback` full build only
This leaves much more space on SAMD21 builds that aren't "full builds".
These are new APIs that we don't need to add to old boards.

Also, tweak two Arduino boards to save space on them.
2021-08-11 14:47:35 -07:00
Scott Shawcroft 0c1d6cef75
Merge remote-tracking branch 'adafruit/main' into fix_cp_irremote 2021-08-11 13:43:59 -07:00
Scott Shawcroft 083960ce90
Fix SAMD51 builds and Prox Trinkey
Adds CIRCUITPY_BUSIO_UART to disable UART by raising ValueError
that no pins work.
2021-08-11 11:53:26 -07:00