summaryrefslogtreecommitdiff
path: root/supervisor
AgeCommit message (Collapse)Author
2021-01-12Merge remote-tracking branch 'origin/main' into audioout-esp32Jeff Epler
2021-01-11Merge pull request #3973 from kattni/update-code-pyDan Halbert
Update created code.py file formatting.
2021-01-11Adding escape characters.Kattni Rembor
2021-01-11Update created code.py file formatting.Kattni Rembor
2021-01-09background tasks: Add, use port_wake_main_taskJeff Epler
Some ports need an extra operation to ensure that the main task is awoken so that a queued background task will execute during an ongoing light sleep. This removes the need to enable supervisor ticks while I2SOut is operating. Closes: #3952
2021-01-08avoid inline compile errorsDan Halbert
2021-01-04Fix size of memset in board_reset_user_neopixels()DavePutz
2020-12-26Add include to tick.c for mp_hal_is_interrupted()Dan Halbert
2020-12-23Merge branch 'main' into pin_alarmDan Halbert
2020-12-22Merge pull request #3862 from dhalbert/storage-remountScott Shawcroft
unmounted filesystems start as ejected
2020-12-22Merge pull request #3864 from djix123/w25q64fvDan Halbert
Add support for Winbond W25Q64FV
2020-12-22Add support for Winbond W25Q64FVJonathan Giles
2020-12-21unmounted filesystems start as ejectedDan Halbert
2020-12-21Merge pull request #3824 from skerr92/add_more_spi_flashDan Halbert
Adding Support for AT25DF641A SPI Flash
2020-12-17Update devices.hHany Elkomy
Correct capacity value for the MX25R1635F from 0x18 to 0x15 (tested and working) refer to https://github.com/adafruit/circuitpython/issues/3558
2020-12-16removed comments on 64MiB SPI flash causing build test issuesSeth Kerr
2020-12-15Add alarm.pin that wakes on pin levelScott Shawcroft
Fixes #3787
2020-12-14fixing line comment issue with CI build testsSeth Kerr
2020-12-14this should be it.Seth Kerr
2020-12-08Fix build and more commentsScott Shawcroft
2020-12-08Add `board_deinit` for use with sleepScott Shawcroft
This changes lots of files to unify `board.h` across ports. It adds `board_deinit` when CIRCUITPY_ALARM is set. `main.c` uses it to deinit the board before deep sleeping (even when pretending.) Deep sleep is now a two step process for the port. First, the port should prepare to deep sleep based on the given alarms. It should set alarms for both deep and pretend sleep. In particular, the pretend versions should be set immediately so that we don't miss an alarm as we shutdown. These alarms should also wake from `port_idle_until_interrupt` which is used when pretending to deep sleep. Second, when real deep sleeping, `alarm_enter_deep_sleep` is called. The port should set any alarms it didn't during prepare based on data it saved internally during prepare. ESP32-S2 sleep is a bit reorganized to locate more logic with TimeAlarm. This will help it scale to more alarm types. Fixes #3786
2020-12-02Merge pull request #3767 from dhalbert/sleepScott Shawcroft
Initial alarm and sleep PR: time alarms with light and deep sleep; PinAlarms not yet implemented
2020-11-30Eliminate goto.Christian Walther
2020-11-29Optimize out allocation moving code on boards that don't need it.Christian Walther
When no features are enabled that use movable allocations, supervisor_move_memory() is not needed.
2020-11-29Unify redundant low/high_address computation to save a bit of code size.Christian Walther
2020-11-28Make CIRCUITPY_SUPERVISOR_ALLOC_COUNT dependent on enabled features.Christian Walther
Avoids wasted memory and makes it easier to keep track of who needs how much for future additions.
2020-11-28Fix align32_size().Christian Walther
It not only caused crashes with requests larger than 64K (can happen with RGBMatrix), but also generated a lot longer code than necessary.
2020-11-28Use movable allocation system for terminal tilegrid.Christian Walther
Moving memory is now done by the infrastructure and neither necessary nor correct here anymore.
2020-11-28Add movable allocation system.Christian Walther
This allows calls to `allocate_memory()` while the VM is running, it will then allocate from the GC heap (unless there is a suitable hole among the supervisor allocations), and when the VM exits and the GC heap is freed, the allocation will be moved to the bottom of the former GC heap and transformed into a proper supervisor allocation. Existing movable allocations will also be moved to defragment the supervisor heap and ensure that the next VM run gets as much memory as possible for the GC heap. By itself this breaks terminalio because it violates the assumption that supervisor_display_move_memory() still has access to an undisturbed heap to copy the tilegrid from. It will work in many cases, but if you're unlucky you will get garbled terminal contents after exiting from the vm run that created the display. This will be fixed in the following commit, which is separate to simplify review.
2020-11-27working! PinAlarm not implemented yet.Dan Halbert
2020-11-25merge from upstream + wipDan Halbert
2020-11-23working, but need to avoid deep sleeping too fast before USB readyDan Halbert
2020-11-22wipDan Halbert
2020-11-21wip: ResetReason to microcontroller.cpuDan Halbert
2020-11-20compilesDan Halbert
2020-11-19wip; not compiling yetDan Halbert
2020-11-19wipDan Halbert
2020-11-19displayio: When the display is tall, move blinka above the textJeff Epler
This makes a more useful display on the portrait magtag, allowing 21 characters across instead of just 18. There are 20 full rows of text, instead of 21. The total number of characters increases slightly from 378 to 420. For comparison, the Commodore VIC 20 had 22 rows of 23 characters for a total of 506 characters. :-P
2020-11-16Merge remote-tracking branch 'adafruit/main' into sleepDan Halbert
2020-11-16wip: initial code changes, starting from @tannewt's sleepio branchDan Halbert
2020-11-13Save flash spaceScott Shawcroft
* No weak link for modules. It only impacts _os and _time and is already disabled for non-full builds. * Turn off PA00 and PA01 because they are the crystal on the Metro M0 Express. * Change ejected default to false to move it to BSS. It is set on USB connection anyway. * Set sinc_filter to const. Doesn't help flash but keeps it out of RAM.
2020-10-31Merge pull request #3627 from adafruit/6.0.xDan Halbert
Merge 6.0.x bugfixes to main
2020-10-30improve USB CDC disconnect/reconnect checkingDan Halbert
2020-10-27Start tweaking the workflow to sleepScott Shawcroft
2020-10-16Merge pull request #3482 from cwalther/allocJeff Epler
Fix inconsistent supervisor heap
2020-10-12Finer grained, per port tick lockingScott Shawcroft
Fixes #3504 hopefully.
2020-10-07Unify iMX flash config and add Metro M7 1011Scott Shawcroft
This unifies the flash config to the settings used by the Boot ROM. This makes the config unique per board which allows for changing quad enable and status bit differences per flash device. It also allows for timing differences due to the board layout. This change also tweaks linker layout to leave more ram space for the CircuitPython heap.
2020-10-02When there is not enough free space, but a matching hole on the other side, ↵Christian Walther
use it.
2020-10-02Allow allocate_memory() to reuse holes when matching exactly.Christian Walther
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-02Fix inconsistent supervisor heap.Christian Walther
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.