diff options
author | Vincenzo Frascino <vincenzo.frascino@linaro.org> | 2016-10-26 16:26:58 +0100 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-10-26 19:00:16 +0300 |
commit | a3519332b65837987d33cdae1a8fa8a509b9ad4e (patch) | |
tree | 8c08f208af2bbce8fea9e75d41eac0ffcda69789 | |
parent | 3cdccb9b1429bc3afd04ec3f9171b373fe939375 (diff) | |
download | micropython-a3519332b65837987d33cdae1a8fa8a509b9ad4e.tar.gz micropython-a3519332b65837987d33cdae1a8fa8a509b9ad4e.zip |
zephyr: Use board/SoC values for startup banner based on Zephyr config.
This patch modifies the HW macro definition in order to let micropython
report correctly the BOARD and the SOC on which it is working on.
-rw-r--r-- | zephyr/mpconfigport.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/zephyr/mpconfigport.h b/zephyr/mpconfigport.h index 327719459d..2f12cf7112 100644 --- a/zephyr/mpconfigport.h +++ b/zephyr/mpconfigport.h @@ -60,8 +60,19 @@ #define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_LONGLONG) #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT) #define MICROPY_PY_BUILTINS_COMPLEX (0) + +#ifdef CONFIG_BOARD +#define MICROPY_HW_BOARD_NAME "zephyr-" CONFIG_BOARD +#else #define MICROPY_HW_BOARD_NAME "zephyr-generic" +#endif + +#ifdef CONFIG_SOC +#define MICROPY_HW_MCU_NAME CONFIG_SOC +#else #define MICROPY_HW_MCU_NAME "unknown-cpu" +#endif + #define MICROPY_MODULE_FROZEN_STR (1) typedef int mp_int_t; // must be pointer size |