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>
This commit is contained in:
parent
b5836e7252
commit
45845acf6d
|
@ -9,18 +9,15 @@ repository containing information on the board.
|
||||||
|
|
||||||
## Build notes
|
## Build notes
|
||||||
|
|
||||||
Builds can be configured with the `BOARD_VARIANT` parameter. Valid variants
|
By default the firmware supports boards with 16MiB flash. This can be
|
||||||
can be displayed with the `query-variant` target. An example:
|
configured using the `BOARD_VARIANT` parameter. The valid options are
|
||||||
|
`FLASH_2M`, 'FLASH_4M', and 'FLASH_8M'.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
> cd ports/rp2
|
> cd ports/rp2
|
||||||
> make BOARD=WEACTSTUDIO query-variants
|
> make BOARD=WEACTSTUDIO BOARD_VARIANT=FLASH_8M submodules all # Build the 8 MiB variant
|
||||||
VARIANTS: flash_2mb flash_4mb flash_8mb flash_16mb
|
|
||||||
> make BOARD=WEACTSTUDIO BOARD_VARIANT=flash_8mb submodules all # Build the 8 MiB variant
|
|
||||||
```
|
```
|
||||||
|
|
||||||
`flash_16mb` is the default if `BOARD_VARIANT` is not supplied.
|
|
||||||
|
|
||||||
## Board-specific modules
|
## Board-specific modules
|
||||||
|
|
||||||
The `board` module contains definitions for the onboard LED and user button.
|
The `board` module contains definitions for the onboard LED and user button.
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
"product": "WeAct Studio RP2040",
|
"product": "WeAct Studio RP2040",
|
||||||
"url": "https://github.com/WeActTC/WeActStudio.RP2040CoreBoard",
|
"url": "https://github.com/WeActTC/WeActStudio.RP2040CoreBoard",
|
||||||
"variants": {
|
"variants": {
|
||||||
"flash_2mb": "2 MiB Flash",
|
"FLASH_2MB": "2 MiB Flash",
|
||||||
"flash_4mb": "4 MiB Flash",
|
"FLASH_4MB": "4 MiB Flash",
|
||||||
"flash_8mb": "8 MiB Flash"
|
"FLASH_8MB": "8 MiB Flash"
|
||||||
},
|
},
|
||||||
"vendor": "WeAct"
|
"vendor": "WeAct"
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,17 +8,17 @@ list(APPEND PICO_BOARD_HEADER_DIRS ${MICROPY_BOARD_DIR})
|
||||||
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|
||||||
|
|
||||||
# Select the 16MB variant as the default
|
# Select the 16MB variant as the default
|
||||||
set(PICO_BOARD "weactstudio_16mb")
|
set(PICO_BOARD "weactstudio_16MiB")
|
||||||
|
|
||||||
# Provide different variants for the downloads page
|
# Provide different variants for the downloads page
|
||||||
if(MICROPY_BOARD_VARIANT STREQUAL "flash_2mb")
|
if(MICROPY_BOARD_VARIANT STREQUAL "FLASH_2M")
|
||||||
set(PICO_BOARD "weactstudio_2mb")
|
set(PICO_BOARD "weactstudio_2MiB")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MICROPY_BOARD_VARIANT STREQUAL "flash_4mb")
|
if(MICROPY_BOARD_VARIANT STREQUAL "FLASH_4M")
|
||||||
set(PICO_BOARD "weactstudio_4mb")
|
set(PICO_BOARD "weactstudio_4MiB")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MICROPY_BOARD_VARIANT STREQUAL "flash_8mb")
|
if(MICROPY_BOARD_VARIANT STREQUAL "FLASH_8M")
|
||||||
set(PICO_BOARD "weactstudio_8mb")
|
set(PICO_BOARD "weactstudio_8MiB")
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue