Skip to content

Commit a351933

Browse files
Vincenzo Frascinopfalcon
authored andcommitted
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.
1 parent 3cdccb9 commit a351933

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

zephyr/mpconfigport.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,19 @@
6060
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_LONGLONG)
6161
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
6262
#define MICROPY_PY_BUILTINS_COMPLEX (0)
63+
64+
#ifdef CONFIG_BOARD
65+
#define MICROPY_HW_BOARD_NAME "zephyr-" CONFIG_BOARD
66+
#else
6367
#define MICROPY_HW_BOARD_NAME "zephyr-generic"
68+
#endif
69+
70+
#ifdef CONFIG_SOC
71+
#define MICROPY_HW_MCU_NAME CONFIG_SOC
72+
#else
6473
#define MICROPY_HW_MCU_NAME "unknown-cpu"
74+
#endif
75+
6576
#define MICROPY_MODULE_FROZEN_STR (1)
6677

6778
typedef int mp_int_t; // must be pointer size

0 commit comments

Comments
 (0)