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.
This commit is contained in:
stijn 2021-09-27 11:17:15 +02:00 committed by Damien George
parent 1e5875557a
commit 5900257dd6
2 changed files with 11 additions and 11 deletions

View File

@ -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);

View File

@ -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];