Skip to content

Commit cca6cfe

Browse files
authored
Merge pull request #4247 from tannewt/rp2040_flash_size
Board specific flash sizes for RP2040
2 parents b19e7c9 + 3fdf29e commit cca6cfe

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@
1212

1313
// #define DEFAULT_UART_BUS_RX (&pin_PA11)
1414
// #define DEFAULT_UART_BUS_TX (&pin_PA10)
15+
16+
// Flash chip is GD25Q32 connected over QSPI
17+
#define TOTAL_FLASH_SIZE (4 * 1024 * 1024)

ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@
1212

1313
// #define DEFAULT_UART_BUS_RX (&pin_PA11)
1414
// #define DEFAULT_UART_BUS_TX (&pin_PA10)
15+
16+
// Flash chip is GD25Q32 connected over QSPI
17+
#define TOTAL_FLASH_SIZE (4 * 1024 * 1024)

ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@
1313

1414
// #define DEFAULT_UART_BUS_RX (&pin_PA11)
1515
// #define DEFAULT_UART_BUS_TX (&pin_PA10)
16+
17+
// Flash chip is W25Q16JVUXIQ connected over QSPI
18+
#define TOTAL_FLASH_SIZE (2 * 1024 * 1024)

ports/raspberrypi/supervisor/internal_flash.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@
4444
#include "src/rp2_common/hardware_flash/include/hardware/flash.h"
4545
#include "src/common/pico_binary_info/include/pico/binary_info.h"
4646

47-
#define RESERVED_FLASH 1 * 1024 * 1024
48-
49-
// TODO: Parameterize flash size based on the configured flash.
50-
#define TOTAL_FLASH_SIZE 2 * 1024 * 1024
47+
#define RESERVED_FLASH (1 * 1024 * 1024)
5148

5249
// TODO: Split the caching out of supervisor/shared/external_flash so we can use it.
5350
#define SECTOR_SIZE 4096

0 commit comments

Comments
 (0)