Build: Add extra build config groups

Add config groups to build all platforms supported by TF-M.

Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: I6adc2b9303988c7e51e83c5536c0e2b8e83bd492
diff --git a/build_helper/build_helper_configs.py b/build_helper/build_helper_configs.py
index 3e6ed20..6e76fd4 100755
--- a/build_helper/build_helper_configs.py
+++ b/build_helper/build_helper_configs.py
@@ -1286,6 +1286,186 @@
                 ]
                 }
 
+config_an547 = {"seed_params": {
+                "tfm_platform":     ["arm/mps3/an547"],
+                "toolchain_file":   ["toolchain_GNUARM.cmake"],
+                "lib_model":        [False],
+                "isolation_level":  ["1"],
+                "test_regression":  [False],
+                "test_psa_api":     ["OFF"],
+                "cmake_build_type": ["Debug"],
+                "with_otp":         ["off"],
+                "with_bl2":         [True],
+                "with_ns":          [False],
+                "profile":          [""],
+                "partition_ps":     ["ON"],
+                "nsce":             ["OFF"],
+                "mmio":             ["OFF"],
+                },
+                "common_params": _common_tfm_builder_cfg,
+                "invalid": _common_tfm_invalid_configs + []
+                }
+
+config_corstone_polaris = {"seed_params": {
+                "tfm_platform":     ["arm/mps3/corstone_polaris"],
+                "toolchain_file":   ["toolchain_GNUARM.cmake"],
+                "lib_model":        [False],
+                "isolation_level":  ["1"],
+                "test_regression":  [False],
+                "test_psa_api":     ["OFF"],
+                "cmake_build_type": ["Debug"],
+                "with_otp":         ["off"],
+                "with_bl2":         [True],
+                "with_ns":          [False],
+                "profile":          [""],
+                "partition_ps":     ["ON"],
+                "nsce":             ["OFF"],
+                "mmio":             ["OFF"],
+                },
+                "common_params": _common_tfm_builder_cfg,
+                "invalid": _common_tfm_invalid_configs + []
+                }
+
+config_bl5340 = {"seed_params": {
+                "tfm_platform":     ["lairdconnectivity/bl5340_dvk_cpuapp"],
+                "toolchain_file":   ["toolchain_GNUARM.cmake"],
+                "lib_model":        [False],
+                "isolation_level":  ["1"],
+                "test_regression":  [False],
+                "test_psa_api":     ["OFF"],
+                "cmake_build_type": ["Debug"],
+                "with_otp":         ["off"],
+                "with_bl2":         [True],
+                "with_ns":          [False],
+                "profile":          [""],
+                "partition_ps":     ["ON"],
+                "nsce":             ["OFF"],
+                "mmio":             ["OFF"],
+                },
+                "common_params": _common_tfm_builder_cfg,
+                "invalid": _common_tfm_invalid_configs + []
+                }
+
+config_nrf5340dk = {"seed_params": {
+                "tfm_platform":     ["nordic_nrf/nrf5340dk_nrf5340_cpuapp"],
+                "toolchain_file":   ["toolchain_GNUARM.cmake"],
+                "lib_model":        [False],
+                "isolation_level":  ["1"],
+                "test_regression":  [False],
+                "test_psa_api":     ["OFF"],
+                "cmake_build_type": ["Debug"],
+                "with_otp":         ["off"],
+                "with_bl2":         [True],
+                "with_ns":          [False],
+                "profile":          [""],
+                "partition_ps":     ["ON"],
+                "nsce":             ["OFF"],
+                "mmio":             ["OFF"],
+                },
+                "common_params": _common_tfm_builder_cfg,
+                "invalid": _common_tfm_invalid_configs + []
+                }
+
+config_nrf9160dk = {"seed_params": {
+                "tfm_platform":     ["nordic_nrf/nrf9160dk_nrf9160"],
+                "toolchain_file":   ["toolchain_GNUARM.cmake"],
+                "lib_model":        [False],
+                "isolation_level":  ["1"],
+                "test_regression":  [False],
+                "test_psa_api":     ["OFF"],
+                "cmake_build_type": ["Debug"],
+                "with_otp":         ["off"],
+                "with_bl2":         [True],
+                "with_ns":          [False],
+                "profile":          [""],
+                "partition_ps":     ["ON"],
+                "nsce":             ["OFF"],
+                "mmio":             ["OFF"],
+                },
+                "common_params": _common_tfm_builder_cfg,
+                "invalid": _common_tfm_invalid_configs + []
+                }
+
+config_m2351 = {"seed_params": {
+                "tfm_platform":     ["nuvoton/m2351"],
+                "toolchain_file":   ["toolchain_GNUARM.cmake"],
+                "lib_model":        [False],
+                "isolation_level":  ["1"],
+                "test_regression":  [False],
+                "test_psa_api":     ["OFF"],
+                "cmake_build_type": ["Release"],
+                "with_otp":         ["off"],
+                "with_bl2":         [True],
+                "with_ns":          [False],
+                "profile":          [""],
+                "partition_ps":     ["ON"],
+                "nsce":             ["OFF"],
+                "mmio":             ["OFF"],
+                },
+                "common_params": _common_tfm_builder_cfg,
+                "invalid": _common_tfm_invalid_configs + []
+                }
+
+config_m2354 = {"seed_params": {
+                "tfm_platform":     ["nuvoton/m2354"],
+                "toolchain_file":   ["toolchain_GNUARM.cmake"],
+                "lib_model":        [False],
+                "isolation_level":  ["1"],
+                "test_regression":  [False],
+                "test_psa_api":     ["OFF"],
+                "cmake_build_type": ["Debug"],
+                "with_otp":         ["off"],
+                "with_bl2":         [True],
+                "with_ns":          [False],
+                "profile":          [""],
+                "partition_ps":     ["ON"],
+                "nsce":             ["OFF"],
+                "mmio":             ["OFF"],
+                },
+                "common_params": _common_tfm_builder_cfg,
+                "invalid": _common_tfm_invalid_configs + []
+                }
+
+config_b_u585i_iot02a = {"seed_params": {
+                "tfm_platform":     ["stm/b_u585i_iot02a"],
+                "toolchain_file":   ["toolchain_GNUARM.cmake"],
+                "lib_model":        [False],
+                "isolation_level":  ["1"],
+                "test_regression":  [False],
+                "test_psa_api":     ["OFF"],
+                "cmake_build_type": ["Release"],
+                "with_otp":         ["off"],
+                "with_bl2":         [True],
+                "with_ns":          [False],
+                "profile":          [""],
+                "partition_ps":     ["ON"],
+                "nsce":             ["OFF"],
+                "mmio":             ["OFF"],
+                },
+                "common_params": _common_tfm_builder_cfg,
+                "invalid": _common_tfm_invalid_configs + []
+                }
+
+config_nucleo_l552ze_q = {"seed_params": {
+                "tfm_platform":     ["stm/nucleo_l552ze_q"],
+                "toolchain_file":   ["toolchain_GNUARM.cmake"],
+                "lib_model":        [False],
+                "isolation_level":  ["1"],
+                "test_regression":  [False],
+                "test_psa_api":     ["OFF"],
+                "cmake_build_type": ["Release"],
+                "with_otp":         ["off"],
+                "with_bl2":         [True],
+                "with_ns":          [False],
+                "profile":          [""],
+                "partition_ps":     ["ON"],
+                "nsce":             ["OFF"],
+                "mmio":             ["OFF"],
+                },
+                "common_params": _common_tfm_builder_cfg,
+                "invalid": _common_tfm_invalid_configs + []
+                }
+
 _builtin_configs = {
                     #release test group
                     "tfm_test": config_tfm_test,
@@ -1324,6 +1504,21 @@
                     "coverage_an519": config_cov_an519,
                     "coverage_an521": config_cov_an521,
 
+                    #extra build group
+                    "arm_corstone1000": config_corstone1000,
+                    "arm_an547": config_an547,
+                    "arm_corstone_polaris": config_corstone_polaris,
+                    "cypress_psoc64": config_PSOC64,
+                    "laird_bl5340": config_bl5340,
+                    "nordic_nrf5340dk": config_nrf5340dk,
+                    "nordic_nrf9160dk": config_nrf9160dk,
+                    "nuvoton_m2351": config_m2351,
+                    "nuvoton_m2354": config_m2354,
+                    "nxp_lpcxpresso55s69": config_LPCXPRESSO55S69,
+                    "stm_b_u585i_iot02a": config_b_u585i_iot02a,
+                    "stm_nucleo_l552ze_q": config_nucleo_l552ze_q,
+                    "stm_stm32l562e_dk": config_STM32L562E_DK,
+
                     #full test group in the old CI
                     "full": config_full,
 
diff --git a/tfm_ci_pylib/tfm_build_manager.py b/tfm_ci_pylib/tfm_build_manager.py
index ddc1f64..26b9349 100644
--- a/tfm_ci_pylib/tfm_build_manager.py
+++ b/tfm_ci_pylib/tfm_build_manager.py
@@ -31,18 +31,27 @@
 from .tfm_builder import TFM_Builder
 
 
-mapPlatform = {"cypress/psoc64":                "psoc64",
-               "arm/mps2/an519":                "AN519",
-               "arm/mps2/an521":                "AN521",
-               "arm/mps2/an539":                "AN539",
-               "arm/mps2/sse-200_aws":          "SSE-200_AWS",
-               "arm/mps3/an524":                "AN524",
-               "arm/musca_b1/sse_200":          "MUSCA_B1",
-               "arm/musca_b1/secure_enclave":   "MUSCA_B1_SE",
-               "arm/musca_s1":                  "MUSCA_S1",
-               "stm/stm32l562e_dk":             "stm32l562e_dk",
-               "arm/corstone1000":              "corstone1000",
-               "nxp/lpcxpresso55s69":           "lpcxpresso55s69"}
+mapPlatform = {"cypress/psoc64":                      "psoc64",
+               "arm/mps2/an519":                      "AN519",
+               "arm/mps2/an521":                      "AN521",
+               "arm/mps2/an539":                      "AN539",
+               "arm/mps2/sse-200_aws":                "SSE-200_AWS",
+               "arm/mps3/an524":                      "AN524",
+               "arm/musca_b1/sse_200":                "MUSCA_B1",
+               "arm/musca_b1/secure_enclave":         "MUSCA_B1_SE",
+               "arm/musca_s1":                        "MUSCA_S1",
+               "stm/stm32l562e_dk":                   "stm32l562e_dk",
+               "arm/corstone1000":                    "corstone1000",
+               "nxp/lpcxpresso55s69":                 "lpcxpresso55s69",
+               "arm/mps3/an547":                      "AN547",
+               "arm/mps3/corstone_polaris":           "Polaris",
+               "lairdconnectivity/bl5340_dvk_cpuapp": "BL5340",
+               "nordic_nrf/nrf5340dk_nrf5340_cpuapp": "nrf5340dk",
+               "nordic_nrf/nrf9160dk_nrf9160":        "nrf9160dk",
+               "nuvoton/m2351":                       "M2351",
+               "nuvoton/m2354":                       "M2354",
+               "stm/b_u585i_iot02a":                  "b_u585i_iot02a",
+               "stm/nucleo_l552ze_q":                 "nucleo_l552ze_q"}
 
 mapCompiler = {"toolchain_GNUARM.cmake":   "GNUARM",
                "toolchain_ARMCLANG.cmake": "ARMCLANG"}