From 018cc45b49846b0e879e64ede63419b8d045a567 Mon Sep 17 00:00:00 2001 From: Terraneo Federico <fede.tft@miosix.org> Date: Sun, 25 May 2014 17:07:12 +0000 Subject: [PATCH] Reversed versioning check to match mxgui and mxusb --- .../lpc2138_miosix_board/board_settings.h | 8 +++++--- .../stm32f100rb_stm32vldiscovery/board_settings.h | 8 +++++--- .../stm32f103ve_mp3v2/board_settings.h | 8 +++++--- .../stm32f103ve_strive_mini/board_settings.h | 8 +++++--- .../stm32f103ze_redbull_v2/board_settings.h | 8 +++++--- .../stm32f103ze_stm3210e-eval/board_settings.h | 8 +++++--- .../stm32f205rg_sony-newman/board_settings.h | 8 +++++--- .../stm32f207ig_stm3220g-eval/board_settings.h | 8 +++++--- .../stm32f207ze_als_camboard/board_settings.h | 8 +++++--- .../stm32f207zg_EthBoardV2/board_settings.h | 8 +++++--- .../stm32l151c8_als_mainboard/board_settings.h | 8 +++++--- .../stm32f407vg_bitsboard/board_settings.h | 8 +++++--- .../stm32f407vg_stm32f4discovery/board_settings.h | 8 +++++--- .../stm32f429zi_stm32f4discovery/board_settings.h | 8 +++++--- miosix/config/miosix_settings.h | 8 +++++--- miosix/util/version.cpp | 11 +++++++++++ miosix/util/version.h | 12 ------------ 17 files changed, 86 insertions(+), 57 deletions(-) diff --git a/miosix/config/arch/arm7_lpc2000/lpc2138_miosix_board/board_settings.h b/miosix/config/arch/arm7_lpc2000/lpc2138_miosix_board/board_settings.h index b870be9d..76ed0a17 100644 --- a/miosix/config/arch/arm7_lpc2000/lpc2138_miosix_board/board_settings.h +++ b/miosix/config/arch/arm7_lpc2000/lpc2138_miosix_board/board_settings.h @@ -30,9 +30,11 @@ #include "util/version.h" -#if BOARD_SETTINGS_VERSION != 100 -#error You need to update board_settings.h to match the version in the kernel. -#endif +/** + * \internal + * Versioning for board_settings.h for out of git tree projects + */ +#define BOARD_SETTINGS_VERSION 100 namespace miosix { diff --git a/miosix/config/arch/cortexM3_stm32/stm32f100rb_stm32vldiscovery/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f100rb_stm32vldiscovery/board_settings.h index 24e451e3..d2842d6a 100644 --- a/miosix/config/arch/cortexM3_stm32/stm32f100rb_stm32vldiscovery/board_settings.h +++ b/miosix/config/arch/cortexM3_stm32/stm32f100rb_stm32vldiscovery/board_settings.h @@ -30,9 +30,11 @@ #include "util/version.h" -#if BOARD_SETTINGS_VERSION != 100 -#error You need to update board_settings.h to match the version in the kernel. -#endif +/** + * \internal + * Versioning for board_settings.h for out of git tree projects + */ +#define BOARD_SETTINGS_VERSION 100 namespace miosix { diff --git a/miosix/config/arch/cortexM3_stm32/stm32f103ve_mp3v2/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f103ve_mp3v2/board_settings.h index 0281e722..d779c641 100644 --- a/miosix/config/arch/cortexM3_stm32/stm32f103ve_mp3v2/board_settings.h +++ b/miosix/config/arch/cortexM3_stm32/stm32f103ve_mp3v2/board_settings.h @@ -30,9 +30,11 @@ #include "util/version.h" -#if BOARD_SETTINGS_VERSION != 100 -#error You need to update board_settings.h to match the version in the kernel. -#endif +/** + * \internal + * Versioning for board_settings.h for out of git tree projects + */ +#define BOARD_SETTINGS_VERSION 100 namespace miosix { diff --git a/miosix/config/arch/cortexM3_stm32/stm32f103ve_strive_mini/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f103ve_strive_mini/board_settings.h index 0281e722..d779c641 100644 --- a/miosix/config/arch/cortexM3_stm32/stm32f103ve_strive_mini/board_settings.h +++ b/miosix/config/arch/cortexM3_stm32/stm32f103ve_strive_mini/board_settings.h @@ -30,9 +30,11 @@ #include "util/version.h" -#if BOARD_SETTINGS_VERSION != 100 -#error You need to update board_settings.h to match the version in the kernel. -#endif +/** + * \internal + * Versioning for board_settings.h for out of git tree projects + */ +#define BOARD_SETTINGS_VERSION 100 namespace miosix { diff --git a/miosix/config/arch/cortexM3_stm32/stm32f103ze_redbull_v2/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f103ze_redbull_v2/board_settings.h index 766ee972..15f00741 100644 --- a/miosix/config/arch/cortexM3_stm32/stm32f103ze_redbull_v2/board_settings.h +++ b/miosix/config/arch/cortexM3_stm32/stm32f103ze_redbull_v2/board_settings.h @@ -30,9 +30,11 @@ #include "util/version.h" -#if BOARD_SETTINGS_VERSION != 100 -#error You need to update board_settings.h to match the version in the kernel. -#endif +/** + * \internal + * Versioning for board_settings.h for out of git tree projects + */ +#define BOARD_SETTINGS_VERSION 100 namespace miosix { diff --git a/miosix/config/arch/cortexM3_stm32/stm32f103ze_stm3210e-eval/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f103ze_stm3210e-eval/board_settings.h index b90c72a2..325df63a 100644 --- a/miosix/config/arch/cortexM3_stm32/stm32f103ze_stm3210e-eval/board_settings.h +++ b/miosix/config/arch/cortexM3_stm32/stm32f103ze_stm3210e-eval/board_settings.h @@ -30,9 +30,11 @@ #include "util/version.h" -#if BOARD_SETTINGS_VERSION != 100 -#error You need to update board_settings.h to match the version in the kernel. -#endif +/** + * \internal + * Versioning for board_settings.h for out of git tree projects + */ +#define BOARD_SETTINGS_VERSION 100 namespace miosix { diff --git a/miosix/config/arch/cortexM3_stm32f2/stm32f205rg_sony-newman/board_settings.h b/miosix/config/arch/cortexM3_stm32f2/stm32f205rg_sony-newman/board_settings.h index 84d3a9c9..1890a944 100644 --- a/miosix/config/arch/cortexM3_stm32f2/stm32f205rg_sony-newman/board_settings.h +++ b/miosix/config/arch/cortexM3_stm32f2/stm32f205rg_sony-newman/board_settings.h @@ -30,9 +30,11 @@ #include "util/version.h" -#if BOARD_SETTINGS_VERSION != 100 -#error You need to update board_settings.h to match the version in the kernel. -#endif +/** + * \internal + * Versioning for board_settings.h for out of git tree projects + */ +#define BOARD_SETTINGS_VERSION 100 namespace miosix { diff --git a/miosix/config/arch/cortexM3_stm32f2/stm32f207ig_stm3220g-eval/board_settings.h b/miosix/config/arch/cortexM3_stm32f2/stm32f207ig_stm3220g-eval/board_settings.h index 287a512e..820ddea6 100644 --- a/miosix/config/arch/cortexM3_stm32f2/stm32f207ig_stm3220g-eval/board_settings.h +++ b/miosix/config/arch/cortexM3_stm32f2/stm32f207ig_stm3220g-eval/board_settings.h @@ -30,9 +30,11 @@ #include "util/version.h" -#if BOARD_SETTINGS_VERSION != 100 -#error You need to update board_settings.h to match the version in the kernel. -#endif +/** + * \internal + * Versioning for board_settings.h for out of git tree projects + */ +#define BOARD_SETTINGS_VERSION 100 namespace miosix { diff --git a/miosix/config/arch/cortexM3_stm32f2/stm32f207ze_als_camboard/board_settings.h b/miosix/config/arch/cortexM3_stm32f2/stm32f207ze_als_camboard/board_settings.h index 67e97676..60b4e72d 100644 --- a/miosix/config/arch/cortexM3_stm32f2/stm32f207ze_als_camboard/board_settings.h +++ b/miosix/config/arch/cortexM3_stm32f2/stm32f207ze_als_camboard/board_settings.h @@ -30,9 +30,11 @@ #include "util/version.h" -#if BOARD_SETTINGS_VERSION != 100 -#error You need to update board_settings.h to match the version in the kernel. -#endif +/** + * \internal + * Versioning for board_settings.h for out of git tree projects + */ +#define BOARD_SETTINGS_VERSION 100 namespace miosix { diff --git a/miosix/config/arch/cortexM3_stm32f2/stm32f207zg_EthBoardV2/board_settings.h b/miosix/config/arch/cortexM3_stm32f2/stm32f207zg_EthBoardV2/board_settings.h index d40698f8..06ba71d4 100644 --- a/miosix/config/arch/cortexM3_stm32f2/stm32f207zg_EthBoardV2/board_settings.h +++ b/miosix/config/arch/cortexM3_stm32f2/stm32f207zg_EthBoardV2/board_settings.h @@ -30,9 +30,11 @@ #include "util/version.h" -#if BOARD_SETTINGS_VERSION != 100 -#error You need to update board_settings.h to match the version in the kernel. -#endif +/** + * \internal + * Versioning for board_settings.h for out of git tree projects + */ +#define BOARD_SETTINGS_VERSION 100 namespace miosix { diff --git a/miosix/config/arch/cortexM3_stm32l1/stm32l151c8_als_mainboard/board_settings.h b/miosix/config/arch/cortexM3_stm32l1/stm32l151c8_als_mainboard/board_settings.h index 0af59606..b25dbef6 100644 --- a/miosix/config/arch/cortexM3_stm32l1/stm32l151c8_als_mainboard/board_settings.h +++ b/miosix/config/arch/cortexM3_stm32l1/stm32l151c8_als_mainboard/board_settings.h @@ -30,9 +30,11 @@ #include "util/version.h" -#if BOARD_SETTINGS_VERSION != 100 -#error You need to update board_settings.h to match the version in the kernel. -#endif +/** + * \internal + * Versioning for board_settings.h for out of git tree projects + */ +#define BOARD_SETTINGS_VERSION 100 namespace miosix { diff --git a/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_bitsboard/board_settings.h b/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_bitsboard/board_settings.h index a74f82dd..1867dfb3 100644 --- a/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_bitsboard/board_settings.h +++ b/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_bitsboard/board_settings.h @@ -30,9 +30,11 @@ #include "util/version.h" -#if BOARD_SETTINGS_VERSION != 100 -#error You need to update board_settings.h to match the version in the kernel. -#endif +/** + * \internal + * Versioning for board_settings.h for out of git tree projects + */ +#define BOARD_SETTINGS_VERSION 100 namespace miosix { diff --git a/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_stm32f4discovery/board_settings.h b/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_stm32f4discovery/board_settings.h index a74f82dd..1867dfb3 100644 --- a/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_stm32f4discovery/board_settings.h +++ b/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_stm32f4discovery/board_settings.h @@ -30,9 +30,11 @@ #include "util/version.h" -#if BOARD_SETTINGS_VERSION != 100 -#error You need to update board_settings.h to match the version in the kernel. -#endif +/** + * \internal + * Versioning for board_settings.h for out of git tree projects + */ +#define BOARD_SETTINGS_VERSION 100 namespace miosix { diff --git a/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_stm32f4discovery/board_settings.h b/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_stm32f4discovery/board_settings.h index 8295e783..ce56c3df 100644 --- a/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_stm32f4discovery/board_settings.h +++ b/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_stm32f4discovery/board_settings.h @@ -30,9 +30,11 @@ #include "util/version.h" -#if BOARD_SETTINGS_VERSION != 100 -#error You need to update board_settings.h to match the version in the kernel. -#endif +/** + * \internal + * Versioning for board_settings.h for out of git tree projects + */ +#define BOARD_SETTINGS_VERSION 100 namespace miosix { diff --git a/miosix/config/miosix_settings.h b/miosix/config/miosix_settings.h index a73f5c00..705897be 100644 --- a/miosix/config/miosix_settings.h +++ b/miosix/config/miosix_settings.h @@ -45,9 +45,11 @@ #include "board_settings.h" #include "util/version.h" -#if SETTINGS_VERSION != 100 -#error You need to update miosix_settings.h to match the version in the kernel. -#endif +/** + * \internal + * Versioning for miosix_settings.h for out of git tree projects + */ +#define MIOSIX_SETTINGS_VERSION 100 namespace miosix { diff --git a/miosix/util/version.cpp b/miosix/util/version.cpp index 2c008607..873d1e78 100644 --- a/miosix/util/version.cpp +++ b/miosix/util/version.cpp @@ -25,6 +25,17 @@ * along with this program; if not, see <http://www.gnu.org/licenses/> * ***************************************************************************/ +#include "config/miosix_settings.h" +#include "board_settings.h" + +#if MIOSIX_SETTINGS_VERSION != 100 +#error You need to update miosix_settings.h to match the version in the kernel. +#endif + +#if BOARD_SETTINGS_VERSION != 100 +#error You need to update board_settings.h to match the version in the kernel. +#endif + namespace miosix { #ifdef __GNUC__ diff --git a/miosix/util/version.h b/miosix/util/version.h index c05ae646..f1616543 100644 --- a/miosix/util/version.h +++ b/miosix/util/version.h @@ -52,16 +52,4 @@ const char *getMiosixVersion(); } //namespace miosix -/** - * \internal - * Versioning for miosix_settings.h for out of git tree projects - */ -#define SETTINGS_VERSION 100 - -/** - * \internal - * Versioning for board_settings.h for out of git tree projects - */ -#define BOARD_SETTINGS_VERSION 100 - #endif /* VERSION_H */ -- GitLab