From fb840159fb7500b9e675585dbfa37920d8366bc8 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 13 Nov 2023 12:55:17 -0600 Subject: [PATCH] Remove some stuff about reserved psram & supervisor allocations this is obsoleted by the new split heap code :tada: --- ports/espressif/bindings/espcamera/Camera.c | 3 --- .../boards/adafruit_esp32s3_camera/mpconfigboard.h | 2 -- .../boards/adafruit_qualia_s3_rgb666/mpconfigboard.h | 3 --- .../espressif/boards/espressif_esp32_eye/mpconfigboard.h | 2 -- .../mpconfigboard.h | 3 --- .../boards/espressif_esp32s3_eye/mpconfigboard.h | 2 -- .../boards/espressif_esp32s3_lcd_ev/mpconfigboard.h | 3 --- .../boards/m5stack_timer_camera_x/mpconfigboard.h | 3 --- ports/espressif/boards/makerfabs_tft7/mpconfigboard.h | 3 --- ports/espressif/common-hal/espidf/__init__.c | 1 - ports/espressif/mpconfigport.h | 9 --------- py/circuitpy_mpconfig.h | 4 ---- 12 files changed, 38 deletions(-) diff --git a/ports/espressif/bindings/espcamera/Camera.c b/ports/espressif/bindings/espcamera/Camera.c index 8e02d80f22..b7a3db9b36 100644 --- a/ports/espressif/bindings/espcamera/Camera.c +++ b/ports/espressif/bindings/espcamera/Camera.c @@ -63,9 +63,6 @@ //| """ //| Configure and initialize a camera with the given properties //| -//| This driver requires that the ``CIRCUITPY_RESERVED_PSRAM`` in ``settings.toml`` be large enough to hold the camera framebuffer(s). Generally, boards with built-in cameras will have a default setting that is large enough. If the constructor raises a MemoryError or an IDFError, this probably indicates the setting is too small and should be increased. -//| -//| //| .. important:: //| //| Not all supported sensors have all diff --git a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.h b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.h index 54b52d9d7d..8fd2a70337 100644 --- a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.h @@ -40,5 +40,3 @@ #define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) #define DOUBLE_TAP_PIN (&pin_GPIO42) - -#define DEFAULT_RESERVED_PSRAM (1048576) diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h index bb7e0ead9b..4b6ae9066f 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h @@ -37,6 +37,3 @@ #define DEFAULT_SPI_BUS_MOSI (&pin_GPIO7) #define DOUBLE_TAP_PIN (&pin_GPIO4) - -// a 1024x768 16BPP framebuffer + some breathing room -#define DEFAULT_RESERVED_PSRAM (1024 * 1024 * 2) diff --git a/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.h b/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.h index accf539428..58107752eb 100644 --- a/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.h +++ b/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.h @@ -37,5 +37,3 @@ // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) - -#define DEFAULT_RESERVED_PSRAM (1048576) diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.h index a11798ee22..4f0fb33116 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.h +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.h @@ -40,6 +40,3 @@ // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44) - -// a 800x480 16BPP framebuffer + some breathing room -#define DEFAULT_RESERVED_PSRAM (800 * 800 * 2) diff --git a/ports/espressif/boards/espressif_esp32s3_eye/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_eye/mpconfigboard.h index 43ade4f6c8..711df80402 100644 --- a/ports/espressif/boards/espressif_esp32s3_eye/mpconfigboard.h +++ b/ports/espressif/boards/espressif_esp32s3_eye/mpconfigboard.h @@ -43,5 +43,3 @@ {.clock = &pin_GPIO21, .mosi = &pin_GPIO47, .miso = NULL}, \ {.clock = &pin_GPIO39, .mosi = &pin_GPIO40, .miso = &pin_GPIO38}, \ } - -#define DEFAULT_RESERVED_PSRAM (1048576) diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.h index 98b0e04122..83b879e21c 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.h +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.h @@ -37,6 +37,3 @@ // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44) - -// a 1024x768 16BPP framebuffer + some breathing room -#define DEFAULT_RESERVED_PSRAM (1024 * 1024 * 2) diff --git a/ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.h b/ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.h index 395e7590eb..e42e27bd57 100644 --- a/ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.h +++ b/ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.h @@ -43,6 +43,3 @@ #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) #define CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP (1) - -// espcamera.FrameSize.QXGA, half a megabyte result image.jpeg -#define DEFAULT_RESERVED_PSRAM (1572864) diff --git a/ports/espressif/boards/makerfabs_tft7/mpconfigboard.h b/ports/espressif/boards/makerfabs_tft7/mpconfigboard.h index 6dc58e9ef3..6414a2f12a 100644 --- a/ports/espressif/boards/makerfabs_tft7/mpconfigboard.h +++ b/ports/espressif/boards/makerfabs_tft7/mpconfigboard.h @@ -39,6 +39,3 @@ // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44) - -// a 1024x768 16BPP framebuffer + some breathing room -#define DEFAULT_RESERVED_PSRAM (1024 * 1024 * 2) diff --git a/ports/espressif/common-hal/espidf/__init__.c b/ports/espressif/common-hal/espidf/__init__.c index a3fc1872e8..f1fa2a0ed7 100644 --- a/ports/espressif/common-hal/espidf/__init__.c +++ b/ports/espressif/common-hal/espidf/__init__.c @@ -42,7 +42,6 @@ #else #define esp_himem_reserved_area_size() (0) #endif -size_t reserved_psram = DEFAULT_RESERVED_PSRAM; #endif static size_t psram_size_usable(void) { diff --git a/ports/espressif/mpconfigport.h b/ports/espressif/mpconfigport.h index 96b4d4af14..f94fd1ce0c 100644 --- a/ports/espressif/mpconfigport.h +++ b/ports/espressif/mpconfigport.h @@ -71,13 +71,4 @@ #define CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP (0) #endif -#ifndef DEFAULT_RESERVED_PSRAM -#define DEFAULT_RESERVED_PSRAM (0) -#endif - -#if defined(CONFIG_SPIRAM) -#undef CIRCUITPY_PORT_NUM_SUPERVISOR_ALLOCATIONS -#define CIRCUITPY_PORT_NUM_SUPERVISOR_ALLOCATIONS (1) -#endif - #endif // MICROPY_INCLUDED_ESPRESSIF_MPCONFIGPORT_H diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 99bbc7e571..badc2bd556 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -545,10 +545,6 @@ void background_callback_run_all(void); #error "CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR must be at least 1" #endif -#ifndef CIRCUITPY_PORT_NUM_SUPERVISOR_ALLOCATIONS -#define CIRCUITPY_PORT_NUM_SUPERVISOR_ALLOCATIONS (0) -#endif - #ifndef USB_MIDI_EP_NUM_OUT #define USB_MIDI_EP_NUM_OUT (0) #endif