summaryrefslogtreecommitdiff
path: root/supervisor/flash.h
AgeCommit message (Collapse)Author
2021-03-18Redo RP2040 flash settingsScott Shawcroft
This switches stage2 to C and uses Jinja to change the C code based on flash settings from https://github.com/adafruit/nvm.toml. It produces the fastest settings for the given set of external flashes. Flash size is no longer hard coded so switching flashes with similar capabilities but different sizes should *just work*. This PR also places "ITCM" code in RAM to save the XIP cache for code execution. Further optimization is possible. A blink code.py still requires a number of flash fetches every blink. Fixes #4041
2021-03-07Automatically count EXTERNAL_FLASH_DEVICES (mk2)Jeff Epler
Instead of counting words in make, which is slightly awful, notice that possible_devices is local to external_flash.c, so we can declare the array with an automatic bound, and then get the count as the element-count (MP_ARRAY_SIZE) of the array. Since EXTERNAL_FLASH_DEVICE_COUNT is no longer a global macro, switch a few sites to using EXTERNAL_FLASH_DEVICES in `#if` checks instead.
2020-07-06Add license to some obvious files.Diego Elio Pettenò
2020-03-13Hopefully fix flash flush and hopefully audio as well.Scott Shawcroft
2019-04-03Rework flash flush so it preserves the cacheScott Shawcroft
This should make filesystem writes quicker and cause less heap churn.
2019-02-21Add option to disable the concurrent write protectionScott Shawcroft
This allows writing to the filesystem from the host computer and CircuitPython by increasing the risk of filesystem corruption.
2018-11-08Move atmel-samd to tinyusb and support nRF flash.Scott Shawcroft
This started while adding USB MIDI support (and descriptor support is in this change.) When seeing that I'd have to implement the MIDI class logic twice, once for atmel-samd and once for nrf, I decided to refactor the USB stack so its shared across ports. This has led to a number of changes that remove items from the ports folder and move them into supervisor. Furthermore, we had external SPI flash support for nrf pending so I factored out the connection between the usb stack and the flash API as well. This PR also includes the QSPI support for nRF.