From affef6db836dfe7388416c44b5c3c608b86e222b Mon Sep 17 00:00:00 2001 From: Andrzej Kaczmarek Date: Tue, 6 Sep 2022 16:04:12 +0200 Subject: [PATCH] hw/mcu: Add family and series defs to syscfg Those allow for conditional configurations to be implemented. It may be possible to retrieve the same information via vendor provided defs in header files, but with syscfg defs we can also use this in pkg or syscfg deps. --- hw/mcu/ambiq/apollo2/syscfg.yml | 2 ++ hw/mcu/ambiq/apollo3/syscfg.yml | 2 ++ hw/mcu/dialog/da1469x/syscfg.yml | 3 +++ hw/mcu/microchip/pic32mx470f512h/syscfg.yml | 3 +++ hw/mcu/microchip/pic32mz/syscfg.yml | 2 ++ hw/mcu/nordic/nrf51xxx/syscfg.yml | 3 +++ hw/mcu/nordic/nrf52xxx/syscfg.yml | 3 +++ hw/mcu/nordic/nrf5340/syscfg.yml | 3 +++ hw/mcu/nordic/nrf5340_net/syscfg.yml | 3 +++ hw/mcu/nordic/nrf91xx/syscfg.yml | 3 +++ hw/mcu/sifive/fe310/syscfg.yml | 3 +++ hw/mcu/stm/stm32_common/syscfg.yml | 2 ++ hw/mcu/stm/stm32f1xx/syscfg.yml | 2 ++ hw/mcu/stm/stm32f3xx/syscfg.yml | 2 ++ hw/mcu/stm/stm32f4xx/syscfg.yml | 2 ++ hw/mcu/stm/stm32f7xx/syscfg.yml | 2 ++ hw/mcu/stm/stm32h7xx/syscfg.yml | 2 ++ hw/mcu/stm/stm32l0xx/syscfg.yml | 2 ++ hw/mcu/stm/stm32l1xx/syscfg.yml | 2 ++ hw/mcu/stm/stm32l4xx/syscfg.yml | 2 ++ hw/mcu/stm/stm32wbxx/syscfg.yml | 2 ++ 21 files changed, 50 insertions(+) diff --git a/hw/mcu/ambiq/apollo2/syscfg.yml b/hw/mcu/ambiq/apollo2/syscfg.yml index d0ccde471d..8b54a05765 100644 --- a/hw/mcu/ambiq/apollo2/syscfg.yml +++ b/hw/mcu/ambiq/apollo2/syscfg.yml @@ -17,6 +17,8 @@ # syscfg.defs: + MCU_SERIES_APOLLO2: 1 + MCU_FLASH_MIN_WRITE_SIZE: description: > Specifies the required alignment for internal flash writes. diff --git a/hw/mcu/ambiq/apollo3/syscfg.yml b/hw/mcu/ambiq/apollo3/syscfg.yml index 361b2f8d1f..5da6811d64 100644 --- a/hw/mcu/ambiq/apollo3/syscfg.yml +++ b/hw/mcu/ambiq/apollo3/syscfg.yml @@ -17,6 +17,8 @@ # syscfg.defs: + MCU_SERIES_APOLLO3: 1 + MCU_FLASH_MIN_WRITE_SIZE: description: > Specifies the required alignment for internal flash writes. diff --git a/hw/mcu/dialog/da1469x/syscfg.yml b/hw/mcu/dialog/da1469x/syscfg.yml index fe4e45b6e9..0d6605998a 100644 --- a/hw/mcu/dialog/da1469x/syscfg.yml +++ b/hw/mcu/dialog/da1469x/syscfg.yml @@ -17,6 +17,9 @@ # syscfg.defs: + MCU_FAMILY_SMARTBOND: 1 + MCU_SERIES_DA1469X: 1 + MCU_TARGET: description: Specifies target MCU, shall be set by BSP. value: diff --git a/hw/mcu/microchip/pic32mx470f512h/syscfg.yml b/hw/mcu/microchip/pic32mx470f512h/syscfg.yml index 69b41a114c..4f808dad90 100644 --- a/hw/mcu/microchip/pic32mx470f512h/syscfg.yml +++ b/hw/mcu/microchip/pic32mx470f512h/syscfg.yml @@ -17,6 +17,9 @@ # syscfg.defs: + MCU_FAMILY_PIC32MX: 1 + MCU_SERIES_PIC32MX4: 1 + I2C_0: description: 'I2C (TWI) interface 0' value: 0 diff --git a/hw/mcu/microchip/pic32mz/syscfg.yml b/hw/mcu/microchip/pic32mz/syscfg.yml index 5ddbd2bffc..80cc4bb13b 100644 --- a/hw/mcu/microchip/pic32mz/syscfg.yml +++ b/hw/mcu/microchip/pic32mz/syscfg.yml @@ -17,6 +17,8 @@ # syscfg.defs: + MCU_FAMILY_PIC32MZ: 1 + MCU_PIC32MZ: description: MCUs are of PIC32MZ family. value: 1 diff --git a/hw/mcu/nordic/nrf51xxx/syscfg.yml b/hw/mcu/nordic/nrf51xxx/syscfg.yml index 708a3d49eb..5099a04b56 100644 --- a/hw/mcu/nordic/nrf51xxx/syscfg.yml +++ b/hw/mcu/nordic/nrf51xxx/syscfg.yml @@ -17,6 +17,9 @@ # syscfg.defs: + MCU_FAMILY_NRF: 1 + MCU_SERIES_NRF51: 1 + MCU_TARGET: description: > Specifies target MCU, shall be set by BSP. diff --git a/hw/mcu/nordic/nrf52xxx/syscfg.yml b/hw/mcu/nordic/nrf52xxx/syscfg.yml index 5ad6c62b1e..c43e3b6a5e 100644 --- a/hw/mcu/nordic/nrf52xxx/syscfg.yml +++ b/hw/mcu/nordic/nrf52xxx/syscfg.yml @@ -17,6 +17,9 @@ # syscfg.defs: + MCU_FAMILY_NRF: 1 + MCU_SERIES_NRF52: 1 + MCU_TARGET: description: > Specifies target MCU, shall be set by BSP. diff --git a/hw/mcu/nordic/nrf5340/syscfg.yml b/hw/mcu/nordic/nrf5340/syscfg.yml index 7314bc4ea4..56beb4526f 100644 --- a/hw/mcu/nordic/nrf5340/syscfg.yml +++ b/hw/mcu/nordic/nrf5340/syscfg.yml @@ -17,6 +17,9 @@ # syscfg.defs: + MCU_FAMILY_NRF: 1 + MCU_SERIES_NRF53: 1 + MCU_TARGET: description: > Specifies target MCU. diff --git a/hw/mcu/nordic/nrf5340_net/syscfg.yml b/hw/mcu/nordic/nrf5340_net/syscfg.yml index 618beafab7..dca3a6d9a7 100644 --- a/hw/mcu/nordic/nrf5340_net/syscfg.yml +++ b/hw/mcu/nordic/nrf5340_net/syscfg.yml @@ -17,6 +17,9 @@ # syscfg.defs: + MCU_FAMILY_NRF: 1 + MCU_SERIES_NRF53: 1 + MCU_TARGET: description: > Specifies target MCU. diff --git a/hw/mcu/nordic/nrf91xx/syscfg.yml b/hw/mcu/nordic/nrf91xx/syscfg.yml index be85881424..5b4a622bf8 100644 --- a/hw/mcu/nordic/nrf91xx/syscfg.yml +++ b/hw/mcu/nordic/nrf91xx/syscfg.yml @@ -17,6 +17,9 @@ # syscfg.defs: + MCU_FAMILY_NRF: 1 + MCU_SERIES_NRF91: 1 + MCU_TARGET: description: > Specifies target MCU, shall be set by BSP. diff --git a/hw/mcu/sifive/fe310/syscfg.yml b/hw/mcu/sifive/fe310/syscfg.yml index d3dc14bb40..d76c78a766 100644 --- a/hw/mcu/sifive/fe310/syscfg.yml +++ b/hw/mcu/sifive/fe310/syscfg.yml @@ -17,6 +17,9 @@ # syscfg.defs: + MCU_FAMILY_SIFIVE_FREEDOM_FE300: 1 + MCU_SERIES_SIFIVE_FREEDOM_FE310: 1 + MCU_FLASH_MIN_WRITE_SIZE: description: > Specifies the required alignment for internal flash writes. diff --git a/hw/mcu/stm/stm32_common/syscfg.yml b/hw/mcu/stm/stm32_common/syscfg.yml index eeef9d7a09..887f3d0f6c 100644 --- a/hw/mcu/stm/stm32_common/syscfg.yml +++ b/hw/mcu/stm/stm32_common/syscfg.yml @@ -16,6 +16,8 @@ # under the License. syscfg.defs: + MCU_FAMILY_STM32: 1 + TIMER_0: description: 'Timer 0' value: 1 diff --git a/hw/mcu/stm/stm32f1xx/syscfg.yml b/hw/mcu/stm/stm32f1xx/syscfg.yml index d264938909..9dceeddeef 100644 --- a/hw/mcu/stm/stm32f1xx/syscfg.yml +++ b/hw/mcu/stm/stm32f1xx/syscfg.yml @@ -17,6 +17,8 @@ # syscfg.defs: + MCU_SERIES_STM32F1: 1 + MCU_FLASH_MIN_WRITE_SIZE: description: > Specifies the required alignment for internal flash writes. diff --git a/hw/mcu/stm/stm32f3xx/syscfg.yml b/hw/mcu/stm/stm32f3xx/syscfg.yml index 97d1a81c8e..da7efaa74d 100644 --- a/hw/mcu/stm/stm32f3xx/syscfg.yml +++ b/hw/mcu/stm/stm32f3xx/syscfg.yml @@ -17,6 +17,8 @@ # syscfg.defs: + MCU_SERIES_STM32F3: 1 + MCU_FLASH_MIN_WRITE_SIZE: description: > Specifies the required alignment for internal flash writes. diff --git a/hw/mcu/stm/stm32f4xx/syscfg.yml b/hw/mcu/stm/stm32f4xx/syscfg.yml index e6d1367278..3d7399c05d 100644 --- a/hw/mcu/stm/stm32f4xx/syscfg.yml +++ b/hw/mcu/stm/stm32f4xx/syscfg.yml @@ -17,6 +17,8 @@ # syscfg.defs: + MCU_SERIES_STM32F4: 1 + MCU_FLASH_MIN_WRITE_SIZE: description: > Specifies the required alignment for internal flash writes. diff --git a/hw/mcu/stm/stm32f7xx/syscfg.yml b/hw/mcu/stm/stm32f7xx/syscfg.yml index 9ba4dd0ab9..2271549ff4 100644 --- a/hw/mcu/stm/stm32f7xx/syscfg.yml +++ b/hw/mcu/stm/stm32f7xx/syscfg.yml @@ -17,6 +17,8 @@ # syscfg.defs: + MCU_SERIES_STM32F7: 1 + MCU_FLASH_MIN_WRITE_SIZE: description: > Specifies the required alignment for internal flash writes. diff --git a/hw/mcu/stm/stm32h7xx/syscfg.yml b/hw/mcu/stm/stm32h7xx/syscfg.yml index ced6a3b377..69be96a3af 100644 --- a/hw/mcu/stm/stm32h7xx/syscfg.yml +++ b/hw/mcu/stm/stm32h7xx/syscfg.yml @@ -17,6 +17,8 @@ # syscfg.defs: + MCU_SERIES_STM32H7: 1 + MCU_FLASH_MIN_WRITE_SIZE: description: > Specifies the required alignment for internal flash writes. diff --git a/hw/mcu/stm/stm32l0xx/syscfg.yml b/hw/mcu/stm/stm32l0xx/syscfg.yml index 72005ba267..95ce890899 100644 --- a/hw/mcu/stm/stm32l0xx/syscfg.yml +++ b/hw/mcu/stm/stm32l0xx/syscfg.yml @@ -17,6 +17,8 @@ # syscfg.defs: + MCU_SERIES_STM32L0: 1 + MCU_FLASH_MIN_WRITE_SIZE: description: > Specifies the required alignment for internal flash writes. diff --git a/hw/mcu/stm/stm32l1xx/syscfg.yml b/hw/mcu/stm/stm32l1xx/syscfg.yml index 3a6bf88d03..2d41594bd0 100644 --- a/hw/mcu/stm/stm32l1xx/syscfg.yml +++ b/hw/mcu/stm/stm32l1xx/syscfg.yml @@ -17,6 +17,8 @@ # syscfg.defs: + MCU_SERIES_STM32L1: 1 + MCU_FLASH_MIN_WRITE_SIZE: description: > Specifies the required alignment for internal flash writes. diff --git a/hw/mcu/stm/stm32l4xx/syscfg.yml b/hw/mcu/stm/stm32l4xx/syscfg.yml index 8a9265196f..31821283dd 100644 --- a/hw/mcu/stm/stm32l4xx/syscfg.yml +++ b/hw/mcu/stm/stm32l4xx/syscfg.yml @@ -17,6 +17,8 @@ # syscfg.defs: + MCU_SERIES_STM32L4: 1 + MCU_FLASH_MIN_WRITE_SIZE: description: > Specifies the required alignment for internal flash writes. diff --git a/hw/mcu/stm/stm32wbxx/syscfg.yml b/hw/mcu/stm/stm32wbxx/syscfg.yml index 73b0613cc2..9c75a7180a 100644 --- a/hw/mcu/stm/stm32wbxx/syscfg.yml +++ b/hw/mcu/stm/stm32wbxx/syscfg.yml @@ -17,6 +17,8 @@ # syscfg.defs: + MCU_SERIES_STM32WB: 1 + MCU_FLASH_MIN_WRITE_SIZE: description: > Specifies the required alignment for internal flash writes.