summaryrefslogtreecommitdiffstats
path: root/spec/build/bsps/riscv
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-09-12 10:35:21 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2023-01-17 08:31:48 +0100
commitf20078acea88f7c38f14cbc206053e50c313c357 (patch)
treeb00ad4ff46b7da85f4b5206561961d0317b86375 /spec/build/bsps/riscv
parentbuild: Replace variant patterns with a list (diff)
downloadrtems-f20078acea88f7c38f14cbc206053e50c313c357.tar.bz2
build: Use enabled by for defaults
Merge the "default" and "default-by-variant" attributes. Use an "enabled-by" expression to select the default value based on the enabled set. This makes it possible to select default values depending on other options. For example you could choose memory settings based on whether RTEMS_SMP is enabled or disabled. The change was tested by comparing the output of ./waf bspdefaults before and after the change.
Diffstat (limited to 'spec/build/bsps/riscv')
-rw-r--r--spec/build/bsps/riscv/griscv/abi.yml27
-rw-r--r--spec/build/bsps/riscv/noel/abi.yml36
-rw-r--r--spec/build/bsps/riscv/noel/optapbuartmax.yml5
-rw-r--r--spec/build/bsps/riscv/optextirqmax.yml10
-rw-r--r--spec/build/bsps/riscv/optrambegin.yml19
-rw-r--r--spec/build/bsps/riscv/optramsize.yml16
-rw-r--r--spec/build/bsps/riscv/riscv/abi.yml64
-rw-r--r--spec/build/bsps/riscv/riscv/optfrdme310arty.yml10
-rw-r--r--spec/build/bsps/riscv/riscv/opthtif.yml5
-rw-r--r--spec/build/bsps/riscv/riscv/optmpfs.yml10
-rw-r--r--spec/build/bsps/riscv/riscv/optns16550max.yml15
11 files changed, 96 insertions, 121 deletions
diff --git a/spec/build/bsps/riscv/griscv/abi.yml b/spec/build/bsps/riscv/griscv/abi.yml
index fc915468ae..20c7e46e31 100644
--- a/spec/build/bsps/riscv/griscv/abi.yml
+++ b/spec/build/bsps/riscv/griscv/abi.yml
@@ -7,29 +7,26 @@ build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
default:
-- -march=rv32imafdc
-- -mabi=ilp32d
-default-by-variant:
-- value:
+- enabled-by: riscv/grv32imac
+ value:
- -march=rv32imac
- -mabi=ilp32
- variants:
- - riscv/grv32imac
-- value:
+- enabled-by: riscv/grv32im
+ value:
- -march=rv32im
- -mabi=ilp32
- variants:
- - riscv/grv32im
-- value:
+- enabled-by: riscv/grv32i
+ value:
- -march=rv32i
- -mabi=ilp32
- variants:
- - riscv/grv32i
-- value:
+- enabled-by: riscv/griscv
+ value:
- -march=rv32imafd
- -mabi=ilp32d
- variants:
- - riscv/griscv
+- enabled-by: true
+ value:
+ - -march=rv32imafdc
+ - -mabi=ilp32d
description: |
ABI flags
enabled-by: true
diff --git a/spec/build/bsps/riscv/noel/abi.yml b/spec/build/bsps/riscv/noel/abi.yml
index 558ba70c95..841fb17175 100644
--- a/spec/build/bsps/riscv/noel/abi.yml
+++ b/spec/build/bsps/riscv/noel/abi.yml
@@ -7,38 +7,34 @@ build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
default:
-- -march=rv32ima
-- -mabi=ilp32
-default-by-variant:
-- value:
+- enabled-by: riscv/noel64imafdc
+ value:
- -march=rv64imafdc
- -mabi=lp64d
- variants:
- - riscv/noel64imafdc
-- value:
+- enabled-by: riscv/noel64imafd
+ value:
- -march=rv64imafd
- -mabi=lp64d
- variants:
- - riscv/noel64imafd
-- value:
+- enabled-by: riscv/noel64imac
+ value:
- -march=rv64imac
- -mabi=lp64
- variants:
- - riscv/noel64imac
-- value:
+- enabled-by: []
+ value:
- -march=rv64im
- -mabi=lp64
- variants: []
-- value:
+- enabled-by: riscv/noel32imafd
+ value:
- -march=rv32imafd
- -mabi=ilp32d
- variants:
- - riscv/noel32imafd
-- value:
+- enabled-by: riscv/noel32im
+ value:
- -march=rv32im
- -mabi=ilp32
- variants:
- - riscv/noel32im
+- enabled-by: true
+ value:
+ - -march=rv32ima
+ - -mabi=ilp32
description: |
ABI flags
enabled-by: true
diff --git a/spec/build/bsps/riscv/noel/optapbuartmax.yml b/spec/build/bsps/riscv/noel/optapbuartmax.yml
index c120816868..fd6fef8a46 100644
--- a/spec/build/bsps/riscv/noel/optapbuartmax.yml
+++ b/spec/build/bsps/riscv/noel/optapbuartmax.yml
@@ -5,8 +5,9 @@ actions:
build-type: option
copyrights:
- Copyright (C) 2022 Cobham Gaisler AB
-default: 2
-default-by-variant: []
+default:
+- enabled-by: true
+ value: 2
description: |
maximum number of APBUART devices supported by the console driver (2 by default)
enabled-by: true
diff --git a/spec/build/bsps/riscv/optextirqmax.yml b/spec/build/bsps/riscv/optextirqmax.yml
index eddb0a78d5..a56e9c3ccc 100644
--- a/spec/build/bsps/riscv/optextirqmax.yml
+++ b/spec/build/bsps/riscv/optextirqmax.yml
@@ -5,11 +5,11 @@ actions:
build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-default: 128
-default-by-variant:
-- value: 187
- variants:
- - riscv/mpfs64imafdc
+default:
+- enabled-by: riscv/mpfs64imafdc
+ value: 187
+- enabled-by: true
+ value: 128
description: |
maximum number of external interrupts supported by the BSP (default 128)
enabled-by: true
diff --git a/spec/build/bsps/riscv/optrambegin.yml b/spec/build/bsps/riscv/optrambegin.yml
index 632a9dc8cd..12b0b42392 100644
--- a/spec/build/bsps/riscv/optrambegin.yml
+++ b/spec/build/bsps/riscv/optrambegin.yml
@@ -8,21 +8,20 @@ actions:
build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-default: 0x80000000
-default-by-variant:
-- value: 0x00000000
- variants:
+default:
+- enabled-by:
- riscv/noel32im
- riscv/noel32imafd
- riscv/noel64imac
- riscv/noel64imafd
- riscv/noel64imafdc
-- value: 0x40000000
- variants:
- - riscv/griscv
-- value: 0x1000000000
- variants:
- - riscv/mpfs64imafdc
+ value: 0x00000000
+- enabled-by: riscv/griscv
+ value: 0x40000000
+- enabled-by: riscv/mpfs64imafdc
+ value: 0x1000000000
+- enabled-by: true
+ value: 0x80000000
description: ''
enabled-by: true
format: '{:#010x}'
diff --git a/spec/build/bsps/riscv/optramsize.yml b/spec/build/bsps/riscv/optramsize.yml
index 86e9175ac2..be80c0f462 100644
--- a/spec/build/bsps/riscv/optramsize.yml
+++ b/spec/build/bsps/riscv/optramsize.yml
@@ -8,17 +8,15 @@ actions:
build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-default: 0x04000000
-default-by-variant:
-- value: 0x10000000
- variants:
+default:
+- enabled-by:
- riscv/frdme310arty
-- value: 0x01000000
- variants:
- - riscv/griscv
-- value: 0x10000000
- variants:
- riscv/mpfs64imafdc
+ value: 0x10000000
+- enabled-by: riscv/griscv
+ value: 0x01000000
+- enabled-by: true
+ value: 0x04000000
description: ''
enabled-by: true
format: '{:#010x}'
diff --git a/spec/build/bsps/riscv/riscv/abi.yml b/spec/build/bsps/riscv/riscv/abi.yml
index 29dd7b449d..ab3046ee24 100644
--- a/spec/build/bsps/riscv/riscv/abi.yml
+++ b/spec/build/bsps/riscv/riscv/abi.yml
@@ -7,67 +7,51 @@ build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
default:
-- -march=rv32imac
-- -mabi=ilp32
-default-by-variant:
-- value:
- - -march=rv64imafdc
- - -mabi=lp64d
- - -mcmodel=medany
- variants:
+- enabled-by:
- riscv/mpfs64imafdc
-- value:
- - -march=rv64imafdc
- - -mabi=lp64d
- - -mcmodel=medany
- variants:
- riscv/rv64imafdc
-- value:
- - -march=rv64imafd
+ value:
+ - -march=rv64imafdc
- -mabi=lp64d
- -mcmodel=medany
- variants:
+- enabled-by:
+ - riscv/rv64imafd
- riscv/rv64imafd
-- value:
+ value:
- -march=rv64imafd
- -mabi=lp64d
- -mcmodel=medany
- variants:
- - riscv/rv64imafd
-- value:
+- enabled-by: riscv/rv64imac
+ value:
- -march=rv64imac
- -mabi=lp64
- -mcmodel=medany
- variants:
- - riscv/rv64imac
-- value: []
- variants:
- - riscv/rv32imafdc
-- value:
+- enabled-by: riscv/rv32imafdc
+ value: []
+- enabled-by: riscv/rv32imafd
+ value:
- -march=rv32imafd
- -mabi=ilp32d
- variants:
- - riscv/rv32imafd
-- value:
+- enabled-by: riscv/rv32imafc
+ value:
- -march=rv32imafc
- -mabi=ilp32f
- variants:
- - riscv/rv32imafc
-- value:
+- enabled-by: riscv/rv32im
+ value:
- -march=rv32im
- -mabi=ilp32
- variants:
- - riscv/rv32im
-- value:
+- enabled-by: riscv/rv32iac
+ value:
- -march=rv32iac
- -mabi=ilp32
- variants:
- - riscv/rv32iac
-- value:
+- enabled-by: riscv/rv32i
+ value:
- -march=rv32i
- -mabi=ilp32
- variants:
- - riscv/rv32i
+- enabled-by: true
+ value:
+ - -march=rv32imac
+ - -mabi=ilp32
description: |
ABI flags
enabled-by: true
diff --git a/spec/build/bsps/riscv/riscv/optfrdme310arty.yml b/spec/build/bsps/riscv/riscv/optfrdme310arty.yml
index 4bb43a9a18..4f30ce1f4d 100644
--- a/spec/build/bsps/riscv/riscv/optfrdme310arty.yml
+++ b/spec/build/bsps/riscv/riscv/optfrdme310arty.yml
@@ -5,11 +5,11 @@ actions:
build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-default: false
-default-by-variant:
-- value: true
- variants:
- - riscv/frdme310arty
+default:
+- enabled-by: riscv/frdme310arty
+ value: true
+- enabled-by: true
+ value: false
description: |
enables support sifive Freedom E310 Arty board if defined to a non-zero value,otherwise it is disabled (disabled by default)
enabled-by: true
diff --git a/spec/build/bsps/riscv/riscv/opthtif.yml b/spec/build/bsps/riscv/riscv/opthtif.yml
index af174f82ea..cd85f1d9e4 100644
--- a/spec/build/bsps/riscv/riscv/opthtif.yml
+++ b/spec/build/bsps/riscv/riscv/opthtif.yml
@@ -5,8 +5,9 @@ actions:
build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-default: true
-default-by-variant: []
+default:
+- enabled-by: true
+ value: true
description: |
Enable the Host/Target Interface (HTIF) support.
enabled-by: true
diff --git a/spec/build/bsps/riscv/riscv/optmpfs.yml b/spec/build/bsps/riscv/riscv/optmpfs.yml
index 2b734c203b..65534874cf 100644
--- a/spec/build/bsps/riscv/riscv/optmpfs.yml
+++ b/spec/build/bsps/riscv/riscv/optmpfs.yml
@@ -5,11 +5,11 @@ actions:
build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-default: false
-default-by-variant:
-- value: true
- variants:
- - riscv/mpfs64imafdc
+default:
+- enabled-by: riscv/mpfs64imafdc
+ value: true
+- enabled-by: true
+ value: false
description: |
enables support Microchip PolarFire SoC if defined to a non-zero value,otherwise it is disabled (disabled by default)
enabled-by: true
diff --git a/spec/build/bsps/riscv/riscv/optns16550max.yml b/spec/build/bsps/riscv/riscv/optns16550max.yml
index 41a23ee10d..423bb5f74f 100644
--- a/spec/build/bsps/riscv/riscv/optns16550max.yml
+++ b/spec/build/bsps/riscv/riscv/optns16550max.yml
@@ -5,14 +5,13 @@ actions:
build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-default: 2
-default-by-variant:
-- value: null
- variants:
- - riscv/frdme310arty
-- value: 1
- variants:
- - riscv/mpfs64imafdc
+default:
+- enabled-by: riscv/frdme310arty
+ value: null
+- enabled-by: riscv/mpfs64imafdc
+ value: 1
+- enabled-by: true
+ value: 2
description: |
maximum number of NS16550 devices supported by the console driver (2 by default)
enabled-by: true