summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2023-08-15 23:12:57 +1000
committerJim Mussared <jim.mussared@gmail.com>2023-08-23 13:54:37 +1000
commit45845acf6d1cba5705f11abd08d8491bcc35c0a5 (patch)
tree07e692e111791d06d07bfb496f1215a8d72a8fd3
parentb5836e7252f78831d4ce45778a5f84c46f096df5 (diff)
rp2: Use uppercase variant names.
This is to support a future change to add the variant name to the build directory and therefore should be the same style as the board name. This only affects the WEACTSTUDIO board. Also standardises on a convention for naming flash-size variants. Normally we would write e.g. 2MiB, but in uppercase, it's awkward to write 2MIB, so instead use 2M, 512K, etc for variant names, but use 2MiB when not constrained by case (e.g. a regular filename). This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-rw-r--r--ports/rp2/boards/WEACTSTUDIO/README.md11
-rw-r--r--ports/rp2/boards/WEACTSTUDIO/board.json6
-rw-r--r--ports/rp2/boards/WEACTSTUDIO/mpconfigboard.cmake14
-rw-r--r--ports/rp2/boards/WEACTSTUDIO/weactstudio_16MiB.h (renamed from ports/rp2/boards/WEACTSTUDIO/weactstudio_16mb.h)0
-rw-r--r--ports/rp2/boards/WEACTSTUDIO/weactstudio_2MiB.h (renamed from ports/rp2/boards/WEACTSTUDIO/weactstudio_2mb.h)0
-rw-r--r--ports/rp2/boards/WEACTSTUDIO/weactstudio_4MiB.h (renamed from ports/rp2/boards/WEACTSTUDIO/weactstudio_4mb.h)0
-rw-r--r--ports/rp2/boards/WEACTSTUDIO/weactstudio_8MiB.h (renamed from ports/rp2/boards/WEACTSTUDIO/weactstudio_8mb.h)0
7 files changed, 14 insertions, 17 deletions
diff --git a/ports/rp2/boards/WEACTSTUDIO/README.md b/ports/rp2/boards/WEACTSTUDIO/README.md
index ae0acfd2c..1d5535090 100644
--- a/ports/rp2/boards/WEACTSTUDIO/README.md
+++ b/ports/rp2/boards/WEACTSTUDIO/README.md
@@ -9,18 +9,15 @@ repository containing information on the board.
## Build notes
-Builds can be configured with the `BOARD_VARIANT` parameter. Valid variants
-can be displayed with the `query-variant` target. An example:
+By default the firmware supports boards with 16MiB flash. This can be
+configured using the `BOARD_VARIANT` parameter. The valid options are
+`FLASH_2M`, 'FLASH_4M', and 'FLASH_8M'.
```bash
> cd ports/rp2
-> make BOARD=WEACTSTUDIO query-variants
-VARIANTS: flash_2mb flash_4mb flash_8mb flash_16mb
-> make BOARD=WEACTSTUDIO BOARD_VARIANT=flash_8mb submodules all # Build the 8 MiB variant
+> make BOARD=WEACTSTUDIO BOARD_VARIANT=FLASH_8M submodules all # Build the 8 MiB variant
```
-`flash_16mb` is the default if `BOARD_VARIANT` is not supplied.
-
## Board-specific modules
The `board` module contains definitions for the onboard LED and user button.
diff --git a/ports/rp2/boards/WEACTSTUDIO/board.json b/ports/rp2/boards/WEACTSTUDIO/board.json
index 3a3f2f741..223bbdc07 100644
--- a/ports/rp2/boards/WEACTSTUDIO/board.json
+++ b/ports/rp2/boards/WEACTSTUDIO/board.json
@@ -15,9 +15,9 @@
"product": "WeAct Studio RP2040",
"url": "https://github.com/WeActTC/WeActStudio.RP2040CoreBoard",
"variants": {
- "flash_2mb": "2 MiB Flash",
- "flash_4mb": "4 MiB Flash",
- "flash_8mb": "8 MiB Flash"
+ "FLASH_2MB": "2 MiB Flash",
+ "FLASH_4MB": "4 MiB Flash",
+ "FLASH_8MB": "8 MiB Flash"
},
"vendor": "WeAct"
}
diff --git a/ports/rp2/boards/WEACTSTUDIO/mpconfigboard.cmake b/ports/rp2/boards/WEACTSTUDIO/mpconfigboard.cmake
index 28a30f458..848b50f60 100644
--- a/ports/rp2/boards/WEACTSTUDIO/mpconfigboard.cmake
+++ b/ports/rp2/boards/WEACTSTUDIO/mpconfigboard.cmake
@@ -8,17 +8,17 @@ list(APPEND PICO_BOARD_HEADER_DIRS ${MICROPY_BOARD_DIR})
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
# Select the 16MB variant as the default
-set(PICO_BOARD "weactstudio_16mb")
+set(PICO_BOARD "weactstudio_16MiB")
# Provide different variants for the downloads page
-if(MICROPY_BOARD_VARIANT STREQUAL "flash_2mb")
- set(PICO_BOARD "weactstudio_2mb")
+if(MICROPY_BOARD_VARIANT STREQUAL "FLASH_2M")
+ set(PICO_BOARD "weactstudio_2MiB")
endif()
-if(MICROPY_BOARD_VARIANT STREQUAL "flash_4mb")
- set(PICO_BOARD "weactstudio_4mb")
+if(MICROPY_BOARD_VARIANT STREQUAL "FLASH_4M")
+ set(PICO_BOARD "weactstudio_4MiB")
endif()
-if(MICROPY_BOARD_VARIANT STREQUAL "flash_8mb")
- set(PICO_BOARD "weactstudio_8mb")
+if(MICROPY_BOARD_VARIANT STREQUAL "FLASH_8M")
+ set(PICO_BOARD "weactstudio_8MiB")
endif()
diff --git a/ports/rp2/boards/WEACTSTUDIO/weactstudio_16mb.h b/ports/rp2/boards/WEACTSTUDIO/weactstudio_16MiB.h
index b6208c689..b6208c689 100644
--- a/ports/rp2/boards/WEACTSTUDIO/weactstudio_16mb.h
+++ b/ports/rp2/boards/WEACTSTUDIO/weactstudio_16MiB.h
diff --git a/ports/rp2/boards/WEACTSTUDIO/weactstudio_2mb.h b/ports/rp2/boards/WEACTSTUDIO/weactstudio_2MiB.h
index e6a21ea3b..e6a21ea3b 100644
--- a/ports/rp2/boards/WEACTSTUDIO/weactstudio_2mb.h
+++ b/ports/rp2/boards/WEACTSTUDIO/weactstudio_2MiB.h
diff --git a/ports/rp2/boards/WEACTSTUDIO/weactstudio_4mb.h b/ports/rp2/boards/WEACTSTUDIO/weactstudio_4MiB.h
index 7a2836ab4..7a2836ab4 100644
--- a/ports/rp2/boards/WEACTSTUDIO/weactstudio_4mb.h
+++ b/ports/rp2/boards/WEACTSTUDIO/weactstudio_4MiB.h
diff --git a/ports/rp2/boards/WEACTSTUDIO/weactstudio_8mb.h b/ports/rp2/boards/WEACTSTUDIO/weactstudio_8MiB.h
index 82baf6688..82baf6688 100644
--- a/ports/rp2/boards/WEACTSTUDIO/weactstudio_8mb.h
+++ b/ports/rp2/boards/WEACTSTUDIO/weactstudio_8MiB.h