From d425dc9ba48cfb6926ef0bd5965c7dcbd2130183 Mon Sep 17 00:00:00 2001 From: Filip Jagodzinski Date: Fri, 5 Jul 2019 14:51:18 +0200 Subject: [PATCH 1/2] FPGA test shield: Restrict tests to Arduino FF only Currently only the Arduino form factor is supported. Support for other form factors will be added in the future. --- TESTS/mbed_hal_fpga_ci_test_shield/analogin/main.cpp | 2 ++ TESTS/mbed_hal_fpga_ci_test_shield/analogout/main.cpp | 2 ++ TESTS/mbed_hal_fpga_ci_test_shield/gpio/main.cpp | 2 ++ TESTS/mbed_hal_fpga_ci_test_shield/gpio_irq/main.cpp | 2 ++ TESTS/mbed_hal_fpga_ci_test_shield/i2c/main.cpp | 2 ++ TESTS/mbed_hal_fpga_ci_test_shield/pwm/main.cpp | 2 ++ TESTS/mbed_hal_fpga_ci_test_shield/spi/main.cpp | 2 ++ TESTS/mbed_hal_fpga_ci_test_shield/uart/main.cpp | 2 ++ 8 files changed, 16 insertions(+) diff --git a/TESTS/mbed_hal_fpga_ci_test_shield/analogin/main.cpp b/TESTS/mbed_hal_fpga_ci_test_shield/analogin/main.cpp index 7b3725e15e..005d8fdb63 100644 --- a/TESTS/mbed_hal_fpga_ci_test_shield/analogin/main.cpp +++ b/TESTS/mbed_hal_fpga_ci_test_shield/analogin/main.cpp @@ -19,6 +19,8 @@ #error [NOT_SUPPORTED] Analog in not supported for this target #elif !COMPONENT_FPGA_CI_TEST_SHIELD #error [NOT_SUPPORTED] FPGA CI Test Shield is needed to run this test +#elif !TARGET_FF_ARDUINO +#error [NOT_SUPPORTED] Test not supported for this form factor #else #include "utest/utest.h" diff --git a/TESTS/mbed_hal_fpga_ci_test_shield/analogout/main.cpp b/TESTS/mbed_hal_fpga_ci_test_shield/analogout/main.cpp index 43b3fe6f2c..df1f1033cd 100644 --- a/TESTS/mbed_hal_fpga_ci_test_shield/analogout/main.cpp +++ b/TESTS/mbed_hal_fpga_ci_test_shield/analogout/main.cpp @@ -19,6 +19,8 @@ #error [NOT_SUPPORTED] Analog out not supported for this target #elif !COMPONENT_FPGA_CI_TEST_SHIELD #error [NOT_SUPPORTED] FPGA CI Test Shield is needed to run this test +#elif !TARGET_FF_ARDUINO +#error [NOT_SUPPORTED] Test not supported for this form factor #else #include "utest/utest.h" diff --git a/TESTS/mbed_hal_fpga_ci_test_shield/gpio/main.cpp b/TESTS/mbed_hal_fpga_ci_test_shield/gpio/main.cpp index b90c39c42f..6003bd74eb 100644 --- a/TESTS/mbed_hal_fpga_ci_test_shield/gpio/main.cpp +++ b/TESTS/mbed_hal_fpga_ci_test_shield/gpio/main.cpp @@ -17,6 +17,8 @@ #if !COMPONENT_FPGA_CI_TEST_SHIELD #error [NOT_SUPPORTED] FPGA CI Test Shield is needed to run this test +#elif !TARGET_FF_ARDUINO +#error [NOT_SUPPORTED] Test not supported for this form factor #else #include "utest/utest.h" diff --git a/TESTS/mbed_hal_fpga_ci_test_shield/gpio_irq/main.cpp b/TESTS/mbed_hal_fpga_ci_test_shield/gpio_irq/main.cpp index f2f685c714..bfa06990fc 100644 --- a/TESTS/mbed_hal_fpga_ci_test_shield/gpio_irq/main.cpp +++ b/TESTS/mbed_hal_fpga_ci_test_shield/gpio_irq/main.cpp @@ -19,6 +19,8 @@ #error [NOT_SUPPORTED] test not supported #elif !COMPONENT_FPGA_CI_TEST_SHIELD #error [NOT_SUPPORTED] FPGA CI Test Shield is needed to run this test +#elif !TARGET_FF_ARDUINO +#error [NOT_SUPPORTED] Test not supported for this form factor #else #include "utest/utest.h" diff --git a/TESTS/mbed_hal_fpga_ci_test_shield/i2c/main.cpp b/TESTS/mbed_hal_fpga_ci_test_shield/i2c/main.cpp index a20ed76eec..f348e192ce 100644 --- a/TESTS/mbed_hal_fpga_ci_test_shield/i2c/main.cpp +++ b/TESTS/mbed_hal_fpga_ci_test_shield/i2c/main.cpp @@ -19,6 +19,8 @@ #error [NOT_SUPPORTED] I2C not supported for this target #elif !COMPONENT_FPGA_CI_TEST_SHIELD #error [NOT_SUPPORTED] FPGA CI Test Shield is needed to run this test +#elif !TARGET_FF_ARDUINO +#error [NOT_SUPPORTED] Test not supported for this form factor #else #include "utest/utest.h" diff --git a/TESTS/mbed_hal_fpga_ci_test_shield/pwm/main.cpp b/TESTS/mbed_hal_fpga_ci_test_shield/pwm/main.cpp index 1d89f832d6..ad85320d87 100644 --- a/TESTS/mbed_hal_fpga_ci_test_shield/pwm/main.cpp +++ b/TESTS/mbed_hal_fpga_ci_test_shield/pwm/main.cpp @@ -19,6 +19,8 @@ #error [NOT_SUPPORTED] PWM not supported for this target #elif !COMPONENT_FPGA_CI_TEST_SHIELD #error [NOT_SUPPORTED] FPGA CI Test Shield is needed to run this test +#elif !TARGET_FF_ARDUINO +#error [NOT_SUPPORTED] Test not supported for this form factor #else #include "utest/utest.h" diff --git a/TESTS/mbed_hal_fpga_ci_test_shield/spi/main.cpp b/TESTS/mbed_hal_fpga_ci_test_shield/spi/main.cpp index d3c491077c..55ff34ffda 100644 --- a/TESTS/mbed_hal_fpga_ci_test_shield/spi/main.cpp +++ b/TESTS/mbed_hal_fpga_ci_test_shield/spi/main.cpp @@ -19,6 +19,8 @@ #error [NOT_SUPPORTED] SPI not supported for this target #elif !COMPONENT_FPGA_CI_TEST_SHIELD #error [NOT_SUPPORTED] FPGA CI Test Shield is needed to run this test +#elif !TARGET_FF_ARDUINO +#error [NOT_SUPPORTED] Test not supported for this form factor #else #include "utest/utest.h" diff --git a/TESTS/mbed_hal_fpga_ci_test_shield/uart/main.cpp b/TESTS/mbed_hal_fpga_ci_test_shield/uart/main.cpp index cfad7a29ae..1187f6bb1d 100644 --- a/TESTS/mbed_hal_fpga_ci_test_shield/uart/main.cpp +++ b/TESTS/mbed_hal_fpga_ci_test_shield/uart/main.cpp @@ -19,6 +19,8 @@ #error [NOT_SUPPORTED] SERIAL not supported for this target #elif !COMPONENT_FPGA_CI_TEST_SHIELD #error [NOT_SUPPORTED] FPGA CI Test Shield is needed to run this test +#elif !TARGET_FF_ARDUINO +#error [NOT_SUPPORTED] Test not supported for this form factor #else #include "utest/utest.h" From e74e3dd1249690231a310227fdc9147bc7c08542 Mon Sep 17 00:00:00 2001 From: Russ Butler Date: Fri, 5 Jul 2019 15:07:27 -0500 Subject: [PATCH 2/2] FPGA test shield: Allow any defined form factor Build in the FPGA tests if either MBED_CONF_TARGET_DEFAULT_FORM_FACTOR or TARGET_FF_ARDUINO is defined. --- TESTS/mbed_hal_fpga_ci_test_shield/analogin/main.cpp | 2 +- TESTS/mbed_hal_fpga_ci_test_shield/analogout/main.cpp | 2 +- TESTS/mbed_hal_fpga_ci_test_shield/gpio/main.cpp | 2 +- TESTS/mbed_hal_fpga_ci_test_shield/gpio_irq/main.cpp | 2 +- TESTS/mbed_hal_fpga_ci_test_shield/i2c/main.cpp | 2 +- TESTS/mbed_hal_fpga_ci_test_shield/pwm/main.cpp | 2 +- TESTS/mbed_hal_fpga_ci_test_shield/spi/main.cpp | 2 +- TESTS/mbed_hal_fpga_ci_test_shield/uart/main.cpp | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/TESTS/mbed_hal_fpga_ci_test_shield/analogin/main.cpp b/TESTS/mbed_hal_fpga_ci_test_shield/analogin/main.cpp index 005d8fdb63..0add62b502 100644 --- a/TESTS/mbed_hal_fpga_ci_test_shield/analogin/main.cpp +++ b/TESTS/mbed_hal_fpga_ci_test_shield/analogin/main.cpp @@ -19,7 +19,7 @@ #error [NOT_SUPPORTED] Analog in not supported for this target #elif !COMPONENT_FPGA_CI_TEST_SHIELD #error [NOT_SUPPORTED] FPGA CI Test Shield is needed to run this test -#elif !TARGET_FF_ARDUINO +#elif !defined(TARGET_FF_ARDUINO) && !defined(MBED_CONF_TARGET_DEFAULT_FORM_FACTOR) #error [NOT_SUPPORTED] Test not supported for this form factor #else diff --git a/TESTS/mbed_hal_fpga_ci_test_shield/analogout/main.cpp b/TESTS/mbed_hal_fpga_ci_test_shield/analogout/main.cpp index df1f1033cd..98e0321749 100644 --- a/TESTS/mbed_hal_fpga_ci_test_shield/analogout/main.cpp +++ b/TESTS/mbed_hal_fpga_ci_test_shield/analogout/main.cpp @@ -19,7 +19,7 @@ #error [NOT_SUPPORTED] Analog out not supported for this target #elif !COMPONENT_FPGA_CI_TEST_SHIELD #error [NOT_SUPPORTED] FPGA CI Test Shield is needed to run this test -#elif !TARGET_FF_ARDUINO +#elif !defined(TARGET_FF_ARDUINO) && !defined(MBED_CONF_TARGET_DEFAULT_FORM_FACTOR) #error [NOT_SUPPORTED] Test not supported for this form factor #else diff --git a/TESTS/mbed_hal_fpga_ci_test_shield/gpio/main.cpp b/TESTS/mbed_hal_fpga_ci_test_shield/gpio/main.cpp index 6003bd74eb..aecc869b23 100644 --- a/TESTS/mbed_hal_fpga_ci_test_shield/gpio/main.cpp +++ b/TESTS/mbed_hal_fpga_ci_test_shield/gpio/main.cpp @@ -17,7 +17,7 @@ #if !COMPONENT_FPGA_CI_TEST_SHIELD #error [NOT_SUPPORTED] FPGA CI Test Shield is needed to run this test -#elif !TARGET_FF_ARDUINO +#elif !defined(TARGET_FF_ARDUINO) && !defined(MBED_CONF_TARGET_DEFAULT_FORM_FACTOR) #error [NOT_SUPPORTED] Test not supported for this form factor #else diff --git a/TESTS/mbed_hal_fpga_ci_test_shield/gpio_irq/main.cpp b/TESTS/mbed_hal_fpga_ci_test_shield/gpio_irq/main.cpp index bfa06990fc..d6da279aae 100644 --- a/TESTS/mbed_hal_fpga_ci_test_shield/gpio_irq/main.cpp +++ b/TESTS/mbed_hal_fpga_ci_test_shield/gpio_irq/main.cpp @@ -19,7 +19,7 @@ #error [NOT_SUPPORTED] test not supported #elif !COMPONENT_FPGA_CI_TEST_SHIELD #error [NOT_SUPPORTED] FPGA CI Test Shield is needed to run this test -#elif !TARGET_FF_ARDUINO +#elif !defined(TARGET_FF_ARDUINO) && !defined(MBED_CONF_TARGET_DEFAULT_FORM_FACTOR) #error [NOT_SUPPORTED] Test not supported for this form factor #else diff --git a/TESTS/mbed_hal_fpga_ci_test_shield/i2c/main.cpp b/TESTS/mbed_hal_fpga_ci_test_shield/i2c/main.cpp index f348e192ce..99fcec499a 100644 --- a/TESTS/mbed_hal_fpga_ci_test_shield/i2c/main.cpp +++ b/TESTS/mbed_hal_fpga_ci_test_shield/i2c/main.cpp @@ -19,7 +19,7 @@ #error [NOT_SUPPORTED] I2C not supported for this target #elif !COMPONENT_FPGA_CI_TEST_SHIELD #error [NOT_SUPPORTED] FPGA CI Test Shield is needed to run this test -#elif !TARGET_FF_ARDUINO +#elif !defined(TARGET_FF_ARDUINO) && !defined(MBED_CONF_TARGET_DEFAULT_FORM_FACTOR) #error [NOT_SUPPORTED] Test not supported for this form factor #else diff --git a/TESTS/mbed_hal_fpga_ci_test_shield/pwm/main.cpp b/TESTS/mbed_hal_fpga_ci_test_shield/pwm/main.cpp index ad85320d87..31bf5a7915 100644 --- a/TESTS/mbed_hal_fpga_ci_test_shield/pwm/main.cpp +++ b/TESTS/mbed_hal_fpga_ci_test_shield/pwm/main.cpp @@ -19,7 +19,7 @@ #error [NOT_SUPPORTED] PWM not supported for this target #elif !COMPONENT_FPGA_CI_TEST_SHIELD #error [NOT_SUPPORTED] FPGA CI Test Shield is needed to run this test -#elif !TARGET_FF_ARDUINO +#elif !defined(TARGET_FF_ARDUINO) && !defined(MBED_CONF_TARGET_DEFAULT_FORM_FACTOR) #error [NOT_SUPPORTED] Test not supported for this form factor #else diff --git a/TESTS/mbed_hal_fpga_ci_test_shield/spi/main.cpp b/TESTS/mbed_hal_fpga_ci_test_shield/spi/main.cpp index 55ff34ffda..a1dca25a95 100644 --- a/TESTS/mbed_hal_fpga_ci_test_shield/spi/main.cpp +++ b/TESTS/mbed_hal_fpga_ci_test_shield/spi/main.cpp @@ -19,7 +19,7 @@ #error [NOT_SUPPORTED] SPI not supported for this target #elif !COMPONENT_FPGA_CI_TEST_SHIELD #error [NOT_SUPPORTED] FPGA CI Test Shield is needed to run this test -#elif !TARGET_FF_ARDUINO +#elif !defined(TARGET_FF_ARDUINO) && !defined(MBED_CONF_TARGET_DEFAULT_FORM_FACTOR) #error [NOT_SUPPORTED] Test not supported for this form factor #else diff --git a/TESTS/mbed_hal_fpga_ci_test_shield/uart/main.cpp b/TESTS/mbed_hal_fpga_ci_test_shield/uart/main.cpp index 1187f6bb1d..6b81a7652f 100644 --- a/TESTS/mbed_hal_fpga_ci_test_shield/uart/main.cpp +++ b/TESTS/mbed_hal_fpga_ci_test_shield/uart/main.cpp @@ -19,7 +19,7 @@ #error [NOT_SUPPORTED] SERIAL not supported for this target #elif !COMPONENT_FPGA_CI_TEST_SHIELD #error [NOT_SUPPORTED] FPGA CI Test Shield is needed to run this test -#elif !TARGET_FF_ARDUINO +#elif !defined(TARGET_FF_ARDUINO) && !defined(MBED_CONF_TARGET_DEFAULT_FORM_FACTOR) #error [NOT_SUPPORTED] Test not supported for this form factor #else @@ -340,4 +340,4 @@ int main() Harness::run(specification); } -#endif /* !DEVICE_SERIAL */ \ No newline at end of file +#endif /* !DEVICE_SERIAL */