summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstijn <stijn@ignitron.net>2021-09-27 11:17:15 +0200
committerDamien George <damien@micropython.org>2021-11-18 10:46:14 +1100
commit5900257dd675c198f424b9078071cb21ba258a83 (patch)
tree892c4fd68cd0f9a4e615c9532c505b33ae1e3e3c
parent1e5875557a8b7deeddfb96a9f9383b0d37dabee2 (diff)
extmod/uplatform: Use generic custom platform string.
Don't force the 'HAL' string to be part of the platform string because it doesn't have a sensible meaning for all possible platforms, and swap it with the PLATFORM_ARCH string so the strings which most platforms have come first.
-rw-r--r--extmod/moduplatform.c8
-rw-r--r--ports/stm32/mphalport.h14
2 files changed, 11 insertions, 11 deletions
diff --git a/extmod/moduplatform.c b/extmod/moduplatform.c
index 67be2265a..8f678d770 100644
--- a/extmod/moduplatform.c
+++ b/extmod/moduplatform.c
@@ -99,12 +99,12 @@
#define PLATFORM_SYSTEM "MicroPython"
#endif
-#ifndef MICROPY_HAL_VERSION
-#define MICROPY_HAL_VERSION ""
+#ifndef MICROPY_PLATFORM_VERSION
+#define MICROPY_PLATFORM_VERSION ""
#endif
-STATIC const MP_DEFINE_STR_OBJ(info_platform_obj, PLATFORM_SYSTEM "-" MICROPY_VERSION_STRING "-HAL" \
- MICROPY_HAL_VERSION "-" PLATFORM_ARCH "-with-" PLATFORM_LIBC_LIB "" PLATFORM_LIBC_VER);
+STATIC const MP_DEFINE_STR_OBJ(info_platform_obj, PLATFORM_SYSTEM "-" MICROPY_VERSION_STRING "-" \
+ PLATFORM_ARCH "-" MICROPY_PLATFORM_VERSION "-with-" PLATFORM_LIBC_LIB "" PLATFORM_LIBC_VER);
STATIC const MP_DEFINE_STR_OBJ(info_python_compiler_obj, PLATFORM_COMPILER);
STATIC const MP_DEFINE_STR_OBJ(info_libc_lib_obj, PLATFORM_LIBC_LIB);
STATIC const MP_DEFINE_STR_OBJ(info_libc_ver_obj, PLATFORM_LIBC_VER);
diff --git a/ports/stm32/mphalport.h b/ports/stm32/mphalport.h
index edb8d8f64..450e7098a 100644
--- a/ports/stm32/mphalport.h
+++ b/ports/stm32/mphalport.h
@@ -4,19 +4,19 @@
// F0-1.9.0+F4-1.16.0+F7-1.7.0+H7-1.6.0+L0-1.11.2+L4-1.8.1+WB-1.10.0
#if defined(STM32F0)
-#define MICROPY_HAL_VERSION "1.9.0"
+#define MICROPY_PLATFORM_VERSION "HAL1.9.0"
#elif defined(STM32F4)
-#define MICROPY_HAL_VERSION "1.16.0"
+#define MICROPY_PLATFORM_VERSION "HAL1.16.0"
#elif defined(STM32F7)
-#define MICROPY_HAL_VERSION "1.7.0"
+#define MICROPY_PLATFORM_VERSION "HAL1.7.0"
#elif defined(STM32H7)
-#define MICROPY_HAL_VERSION "1.6.0"
+#define MICROPY_PLATFORM_VERSION "HAL1.6.0"
#elif defined(STM32L0)
-#define MICROPY_HAL_VERSION "1.11.2"
+#define MICROPY_PLATFORM_VERSION "HAL1.11.2"
#elif defined(STM32L4)
-#define MICROPY_HAL_VERSION "1.8.1"
+#define MICROPY_PLATFORM_VERSION "HAL1.8.1"
#elif defined(STM32WB)
-#define MICROPY_HAL_VERSION "1.10.0"
+#define MICROPY_PLATFORM_VERSION "HAL1.10.0"
#endif
extern const unsigned char mp_hal_status_to_errno_table[4];