aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/ports/STM32F4xx/hal_lld.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/os/hal/ports/STM32F4xx/hal_lld.h b/os/hal/ports/STM32F4xx/hal_lld.h
index 076c621b7..349adc704 100644
--- a/os/hal/ports/STM32F4xx/hal_lld.h
+++ b/os/hal/ports/STM32F4xx/hal_lld.h
@@ -54,7 +54,7 @@
*/
#if defined(STM32F40XX) || defined(__DOXYGEN__)
#define PLATFORM_NAME "STM32F40x/STM32F41x High Performance"
-#if defined(STM32F42XX)
+#elif defined(STM32F42XX)
#define PLATFORM_NAME "STM32F42x/STM32F43x High Performance"
#else /* !defined(STM32F40XX) */
#define PLATFORM_NAME "STM32F2xx High Performance"
@@ -567,6 +567,13 @@
/* Derived constants and error checks. */
/*===========================================================================*/
+/*
+ * MCU variant check.
+ */
+#if defined(STM32F42XX)
+#error "unsupported STM32F4XX variant"
+#endif
+
#if defined(STM32F40XX) || defined(__DOXYGEN__)
/*
* Configuration-related checks.