Commit Graph

17871 Commits

Author SHA1 Message Date
Scott Shawcroft
62a7eced51
Merge pull request #3503 from pewpew-game/main
Bump circuitpython-stage to 1.1.1
2020-10-02 15:53:34 -07:00
Christian Walther
be8092f4d3 When there is not enough free space, but a matching hole on the other side, use it. 2020-10-02 23:07:07 +02:00
Christian Walther
5bdb8c45dd Allow allocate_memory() to reuse holes when matching exactly.
This requires recovering the pointer of the allocation, which could be done by adding up neighbor lengths, but the simpler way is to stop NULLing it out in the first place and instead mark an allocation as freed by the client by setting the lowest bit of the length (which is always zero in a valid length).
2020-10-02 23:03:21 +02:00
Christian Walther
d6d02c67d2 Fix inconsistent supervisor heap.
When allocations were freed in a different order from the reverse of how they were allocated (leaving holes), the heap would get into an inconsistent state, eventually resulting in crashes.

free_memory() relies on having allocations in order, but allocate_memory() did not guarantee that: It reused the first allocation with a NULL ptr without ensuring that it was between low_address and high_address. When it belongs to a hole in the allocated memory, such an allocation is not really free for reuse, because free_memory() still needs its length.

Instead, explicitly mark allocations available for reuse with a special (invalid) value in the length field. Only allocations that lie between low_address and high_address are marked that way.
2020-10-02 23:03:21 +02:00
Jeff Epler
b1592564b2 displayio: Fix matrixportal crash
An RGBMatrix has no bus and no bus_free method.  It is always possible
to refresh the display.

This was not a problem before, but the fix I suggested (#3449) added
a call to core_bus_free when a FramebufferDisplay was being refreshed.
This was not caught during testing.

This is a band-aid fix and it brings to light a second problem in which
a SharpDisplay + FrameBuffer will not have a 'bus' object, and yet does
operate using a shared SPI bus.  This kind of display will need a
"bus-free" like function to be added, or it can have problems like
#3309.
2020-10-02 15:07:36 -05:00
Radomir Dopieralski
c4e337e234 Bump pew-pewpew-standalone-10.x to 2.0.1 2020-10-02 12:47:31 +02:00
Radomir Dopieralski
dd2b40fdf1 Bump circuitpython-stage to 1.1.1
This adds handling of GameOver exception as SystemExit in anticipation
of the new way of starting games from the menu.
2020-10-02 12:17:49 +02:00
Scott Shawcroft
551f78e10b
Merge pull request #3500 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-10-01 15:47:16 -07:00
Hosted Weblate
d2d768a936
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-10-01 23:24:20 +02:00
Jonny Bergdahl
b51a84d1f8 Translated using Weblate (Swedish)
Currently translated at 100.0% (827 of 827 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2020-10-01 23:24:18 +02:00
Alvaro Figueroa
7652b3046d Translated using Weblate (Spanish)
Currently translated at 100.0% (827 of 827 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/
2020-10-01 23:24:17 +02:00
Alvaro Figueroa
abe98f13df Translated using Weblate (Spanish)
Currently translated at 99.8% (826 of 827 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/
2020-10-01 23:24:17 +02:00
Scott Shawcroft
92d15096d2
Merge pull request #3485 from jepler/framebuffer-zero-size
Framebuffer zero size
2020-10-01 14:24:10 -07:00
Lucian Copeland
a8dfae58d9 Add ADC calibration module support 2020-10-01 17:17:39 -04:00
Scott Shawcroft
d62ac24493
Merge pull request #3469 from jepler/noreturn
Add some NORETURN attributes
2020-10-01 11:18:36 -07:00
Scott Shawcroft
160651785a
Merge pull request #3491 from jepler/makefile-translation-exclude
Makefile: Correct and expand translation excluded directories
2020-10-01 11:05:46 -07:00
Scott Shawcroft
c27e3857b6
Merge branch 'main' into framebuffer-zero-size 2020-10-01 11:04:21 -07:00
Scott Shawcroft
b9890f2d42
Merge pull request #3497 from jepler/issue3473
sharpdisplay: Fix memory corruption across soft-reset
2020-10-01 11:00:25 -07:00
Scott Shawcroft
2ad54f8413
Merge pull request #3463 from UnexpectedCircuitPython/UM_S2_Boards
Updated UM FeatherS2 boards
2020-10-01 10:56:55 -07:00
Scott Shawcroft
f303fb3d41
Merge pull request #3495 from tannewt/esp32s2_metro
Add Metro ESP32S2
2020-10-01 10:54:48 -07:00
Lucian Copeland
9a3bd82f40 Update TinyUSB include compatibility 2020-10-01 13:19:54 -04:00
Scott Shawcroft
be6e6eabd2
Merge pull request #3449 from FoamyGuy/sdcard_odb_fix
Sdcard odb fix
2020-10-01 10:13:13 -07:00
Scott Shawcroft
36bd405380
Merge pull request #3496 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-10-01 10:12:57 -07:00
Lucian Copeland
0bbd067a17 Revert ADC calibration removal, complete merge 2020-10-01 13:06:48 -04:00
Jeff Epler
618d22cd69 Makefile: translate: exclude e.g., ports/unix/build as well 2020-10-01 11:00:33 -05:00
Jeff Epler
e477d27be3
Update shared-bindings/rgbmatrix/RGBMatrix.c
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
2020-10-01 10:59:02 -05:00
Jeff Epler
d7c3f811af sharpdisplay: Fix memory corruption across soft-reset
It was incorrect to NULL out the pointer to our heap allocated buffer in
`reset`, because subsequent to framebuffer_reset, but while
the heap was still active, we could call `get_bufinfo` again,
leading to a fresh allocation on the heap that is about to be destroyed.

Typical stack trace:
```
#1  0x0006c368 in sharpdisplay_framebuffer_get_bufinfo
#2  0x0006ad6e in _refresh_display
#3  0x0006b168 in framebufferio_framebufferdisplay_background
#4  0x00069d22 in displayio_background
#5  0x00045496 in supervisor_background_tasks
#6  0x000446e8 in background_callback_run_all
#7  0x00045546 in supervisor_run_background_tasks_if_tick
#8  0x0005b042 in common_hal_neopixel_write
#9  0x00044c4c in clear_temp_status
#10 0x000497de in spi_flash_flush_keep_cache
#11 0x00049a66 in supervisor_external_flash_flush
#12 0x00044b22 in supervisor_flash_flush
#13 0x0004490e in filesystem_flush
#14 0x00043e18 in cleanup_after_vm
#15 0x0004414c in run_repl
#16 0x000441ce in main
```
When this happened -- which was inconsistent -- the display would keep
some heap allocation across reset which is exactly what we need to avoid.

NULLing the pointer in reconstruct follows what RGBMatrix does, and that
code is a bit more battle-tested anyway.

If I had a motivation for structuring the SharpMemory code differently,
I can no longer recall it.

Testing performed: Ran my complicated calculator program over multiple
iterations without observing signs of heap corruption.

Closes: #3473
2020-10-01 09:22:09 -05:00
Wellington Terumi Uemura
4799333ec2
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (827 of 827 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2020-10-01 16:20:05 +02:00
Jeff Epler
9e66c3aee1
Merge pull request #3494 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-10-01 09:19:52 -05:00
FoamyGuy
422a7d4013 remove remaining top level displayio background check 2020-09-30 17:25:58 -05:00
Unexpected Maker
1a099966ce
Merge pull request #1 from tannewt/UM_S2_Boards
Um s2 boards
2020-10-01 07:27:29 +10:00
Lucian Copeland
c624c1e838 Merge branch 'esp32-update-idf' into esp32-analogin 2020-09-30 16:51:19 -04:00
Lucian Copeland
e01e8dd6b9 Revert HAL refactor changes to avoid USB breaking changes past esp-idf dde6222cd 2020-09-30 16:36:13 -04:00
Scott Shawcroft
a6cfa507b6
Add to board list 2020-09-30 12:59:56 -07:00
Scott Shawcroft
a739d314f1
Add Metro ESP32S2
Also fix two bugs:
* Crash when resetting board.SPI when it hasn't been inited.
* Reading back the output value is always false. Fixes #3353
2020-09-30 12:57:39 -07:00
Hosted Weblate
b26c34d9e2 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-09-30 21:16:22 +02:00
Jonny Bergdahl
cebaf99c64 Translated using Weblate (Swedish)
Currently translated at 100.0% (826 of 826 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2020-09-30 21:16:22 +02:00
Wellington Terumi Uemura
9d0d3e3615 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (826 of 826 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2020-09-30 21:16:22 +02:00
Scott Shawcroft
7f803c0b51
Merge pull request #3489 from astrobokonon/esp32s2-fixconnection
ESP32S2: Enter station mode before connecting
2020-09-30 12:16:15 -07:00
Scott Shawcroft
5ac3c36d64
Merge pull request #3450 from mdroberts1243/New_quirk_for_SH1107
New quirk for sh1107
2020-09-30 12:03:10 -07:00
FoamyGuy
d1bda47d94 removing top level displayio background check 2020-09-30 14:03:03 -05:00
Scott Shawcroft
2ac2f627d5
Merge pull request #3466 from jepler/canbus-api-changes
Canbus: api changes
2020-09-30 11:43:08 -07:00
Scott Shawcroft
5ca10e7849
Merge pull request #3472 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-09-30 11:42:57 -07:00
Scott Shawcroft
a09a158ddc
Fix trailing line 2020-09-30 11:36:51 -07:00
Scott Shawcroft
29af7068d4
Ignore duplicate USB PID for prerelease version 2020-09-30 11:33:54 -07:00
Mark Roberts
ef245ef54e
Removed redundant subrectangle sizing code 2020-09-30 11:06:13 -07:00
Mark Roberts
9f19a8a760
Ran pre-commit locally 2020-09-30 11:06:13 -07:00
Lucian Copeland
66b8559fd4 Change submodule, rework all includes 2020-09-30 11:26:07 -04:00
Jeff Epler
c129c8f296 Merge remote-tracking branch 'origin/main' into canbus-api-changes 2020-09-29 20:15:11 -05:00
Jeff Epler
88cbf772df canio.CAN: clarify read-only status of several properties 2020-09-29 20:13:52 -05:00