File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ INC_ESPCOMP += -I$(ESPCOMP)/app_trace/include
86
86
CFLAGS_BASE = -std=gnu99 -Os -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wall -Werror -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H -DESP_PLATFORM
87
87
CFLAGS = $(CFLAGS_BASE ) $(INC ) $(INC_ESPCOMP )
88
88
CFLAGS += -DIDF_VER=\"$(IDF_VER ) \"
89
+ CFLAGS += -DMP_DEV_VERSION=\"fms\(machine.SLEEP\)\"
89
90
CFLAGS += $(CFLAGS_MOD )
90
91
91
92
# this is what ESPIDF uses for c++ compilation
Original file line number Diff line number Diff line change @@ -102,6 +102,10 @@ STATIC mp_obj_t mp_sys_exit(size_t n_args, const mp_obj_t *args) {
102
102
}
103
103
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (mp_sys_exit_obj , 0 , 1 , mp_sys_exit );
104
104
105
+ #ifdef MP_DEV_VERSION
106
+ STATIC const MP_DEFINE_STR_OBJ (dev_version_obj , MP_DEV_VERSION );
107
+ #endif
108
+
105
109
STATIC mp_obj_t mp_sys_print_exception (size_t n_args , const mp_obj_t * args ) {
106
110
#if MICROPY_PY_IO && MICROPY_PY_SYS_STDFILES
107
111
void * stream_obj = & mp_sys_stdout_obj ;
@@ -161,6 +165,9 @@ STATIC const mp_rom_map_elem_t mp_module_sys_globals_table[] = {
161
165
#else
162
166
{ MP_ROM_QSTR (MP_QSTR_byteorder ), MP_ROM_QSTR (MP_QSTR_big ) },
163
167
#endif
168
+ #ifdef MP_DEV_VERSION
169
+ { MP_ROM_QSTR (MP_QSTR_devversion ), MP_ROM_PTR (& dev_version_obj ) },
170
+ #endif
164
171
165
172
#if MICROPY_PY_SYS_MAXSIZE
166
173
#if MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_NONE
You can’t perform that action at this time.
0 commit comments