diff options
| author | Dan Halbert <halbert@adafruit.com> | 2021-03-23 15:18:29 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-23 15:18:29 -0400 |
| commit | c81007afb098f51c2ab8694720a22d47da0a016e (patch) | |
| tree | c17dc44798b924e91ebf97451e5dd7fa80e60c06 /supervisor | |
| parent | f8cea3ba3b650607608f27e5c6d415e667f6dcd0 (diff) | |
| parent | 36edc4bb89a01d3dcb5d7694dc889c91ddbdf50b (diff) | |
Merge pull request #4446 from tannewt/rp2040_flash
Switch RP2040 flash settings to nvm.toml
Diffstat (limited to 'supervisor')
| -rw-r--r-- | supervisor/flash.h | 6 | ||||
| -rw-r--r-- | supervisor/linker.h | 2 | ||||
| -rw-r--r-- | supervisor/shared/memory.c | 2 | ||||
| -rw-r--r-- | supervisor/supervisor.mk | 14 |
4 files changed, 12 insertions, 12 deletions
diff --git a/supervisor/flash.h b/supervisor/flash.h index 289c76c2d..21d76c998 100644 --- a/supervisor/flash.h +++ b/supervisor/flash.h @@ -31,10 +31,10 @@ #include "py/mpconfig.h" -#ifdef EXTERNAL_FLASH_DEVICES -#include "supervisor/shared/external_flash/external_flash.h" -#else +#if INTERNAL_FLASH_FILESYSTEM #include "supervisor/shared/internal_flash.h" +#else +#include "supervisor/shared/external_flash/external_flash.h" #endif void supervisor_flash_init(void); diff --git a/supervisor/linker.h b/supervisor/linker.h index 43050b907..58068c1a4 100644 --- a/supervisor/linker.h +++ b/supervisor/linker.h @@ -29,7 +29,7 @@ #ifndef MICROPY_INCLUDED_SUPERVISOR_LINKER_H #define MICROPY_INCLUDED_SUPERVISOR_LINKER_H -#if defined(IMXRT10XX) || defined(FOMU) || defined(STM32H7) +#if defined(IMXRT10XX) || defined(FOMU) || defined(STM32H7) || defined(RASPBERRYPI) #define PLACE_IN_DTCM_DATA(name) name __attribute__((section(".dtcm_data." #name))) #define PLACE_IN_DTCM_BSS(name) name __attribute__((section(".dtcm_bss." #name))) #define PLACE_IN_ITCM(name) __attribute__((section(".itcm." #name))) name diff --git a/supervisor/shared/memory.c b/supervisor/shared/memory.c index 83c9d6323..30482ea7b 100644 --- a/supervisor/shared/memory.c +++ b/supervisor/shared/memory.c @@ -36,7 +36,7 @@ enum { CIRCUITPY_SUPERVISOR_IMMOVABLE_ALLOC_COUNT = // stack + heap 2 - #ifdef EXTERNAL_FLASH_DEVICES + #if INTERNAL_FLASH_FILESYSTEM == 0 + 1 #endif #if CIRCUITPY_USB_MIDI diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index 083e7fb35..946b4b0bf 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -32,7 +32,13 @@ endif # Choose which flash filesystem impl to use. # (Right now INTERNAL_FLASH_FILESYSTEM and (Q)SPI_FLASH_FILESYSTEM are mutually exclusive. # But that might not be true in the future.) -ifdef EXTERNAL_FLASH_DEVICES +ifeq ($(INTERNAL_FLASH_FILESYSTEM),1) + ifeq ($(DISABLE_FILESYSTEM),1) + SRC_SUPERVISOR += supervisor/stub/internal_flash.c + else + SRC_SUPERVISOR += supervisor/internal_flash.c + endif +else CFLAGS += -DEXTERNAL_FLASH_DEVICES=$(EXTERNAL_FLASH_DEVICES) \ SRC_SUPERVISOR += supervisor/shared/external_flash/external_flash.c @@ -42,12 +48,6 @@ ifdef EXTERNAL_FLASH_DEVICES ifeq ($(QSPI_FLASH_FILESYSTEM),1) SRC_SUPERVISOR += supervisor/qspi_flash.c supervisor/shared/external_flash/qspi_flash.c endif -else - ifeq ($(DISABLE_FILESYSTEM),1) - SRC_SUPERVISOR += supervisor/stub/internal_flash.c - else - SRC_SUPERVISOR += supervisor/internal_flash.c - endif endif ifeq ($(USB),FALSE) |
