diff --git a/miosix/config/miosix_settings.h b/miosix/config/miosix_settings.h index e7f812d4553b59df49980dcb897b75e983bcc427..763d2a02cb96124fecb74d187cc91e6fe321a792 100644 --- a/miosix/config/miosix_settings.h +++ b/miosix/config/miosix_settings.h @@ -223,16 +223,11 @@ const unsigned int WATERMARK_FILL=0xaaaaaaaa; const unsigned int STACK_FILL=0xbbbbbbbb; // Compiler version checks +#if !defined(_MIOSIX_GCC_PATCH_MAJOR) || _MIOSIX_GCC_PATCH_MAJOR < 3 +#error "You are using a too old or unsupported compiler. Get the latest one from https://miosix.org/wiki/index.php?title=Miosix_Toolchain" +#endif #if _MIOSIX_GCC_PATCH_MAJOR > 3 #warning "You are using a too new compiler, which may not be supported" -#elif _MIOSIX_GCC_PATCH_MAJOR == 2 -#error "The compiler you are using has known incomplete patches and is not supported. Get the latest one from https://miosix.org/wiki/index.php?title=Miosix_Toolchain" -#elif _MIOSIX_GCC_PATCH_VERSION == 1 -#warning "You are using an unsupported compiler. Get the latest one from https://miosix.org/wiki/index.php?title=Miosix_Toolchain" -#endif -#if !defined(_MIOSIX_GCC_PATCH_MAJOR) && \ - (!defined(_MIOSIX_GCC_PATCH_VERSION) || _MIOSIX_GCC_PATCH_VERSION < 1) -#error "You are using an unsupported compiler. Get the latest one from https://miosix.org/wiki/index.php?title=Miosix_Toolchain" #endif /** diff --git a/miosix/util/version.cpp b/miosix/util/version.cpp index 2914b14208c9c5b5279c50f4061b5c5beaf1d7e8..63e5dd401b7c1d32fd3d19ecbeec1b631f9598c4 100644 --- a/miosix/util/version.cpp +++ b/miosix/util/version.cpp @@ -44,27 +44,17 @@ namespace miosix { #define tts(x) #x #define ts(x) tts(x) -#ifdef __clang__ //clang also defines GNUC, so it has to go first -#define CV ", clang " \ - ts(__clang_major__) "." ts(__clang_minor__) "." ts(__clang_patchlevel__) \ - "-mp" ts(_MIOSIX_CLANG_PATCH_VERSION) -#define AU __attribute__((used)) -#elif defined(__GNUC__) -#ifdef _MIOSIX_GCC_PATCH_MAJOR -#define PV ts(_MIOSIX_GCC_PATCH_MAJOR) "." ts(_MIOSIX_GCC_PATCH_MINOR) -#else -#define PV ts(_MIOSIX_GCC_PATCH_VERSION) -#endif +#if defined(__GNUC__) && !defined(__clang__) #define CV ", gcc " \ ts(__GNUC__) "." ts(__GNUC_MINOR__) "." ts(__GNUC_PATCHLEVEL__) \ - "-mp" PV + "-mp" ts(_MIOSIX_GCC_PATCH_MAJOR) "." ts(_MIOSIX_GCC_PATCH_MINOR) #define AU __attribute__((used)) #else #define CV #define AU #endif -const char AU ver[]="Miosix v2.22 (" _MIOSIX_BOARDNAME ", " __DATE__ " " __TIME__ CV ")"; +const char AU ver[]="Miosix v3.0devel1 (" _MIOSIX_BOARDNAME ", " __DATE__ " " __TIME__ CV ")"; const char *getMiosixVersion() {