summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-01-06 18:25:29 +1100
committerDamien George <damien@micropython.org>2022-01-06 18:25:48 +1100
commitb96318ab612dff4b09e0e0437a8d2bbefa25668b (patch)
tree4b969ca674577bb8107eadff6bea60a8f344cf7a
parent3243abfda2591c9ae25187ef0bf91b7cf26d8ab4 (diff)
esp32: Enable platform module with IDF version.
Output looks like this: >>> import platform >>> platform.libc_ver() ('newlib', '3.0.0') >>> platform.platform() 'MicroPython-1.17.0-xtensa-IDFv4.2.2-with-newlib3.0.0' >>> platform.python_compiler() 'GCC 8.4.0' Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/esp32/mpconfigport.h1
-rw-r--r--ports/esp32/mphalport.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/ports/esp32/mpconfigport.h b/ports/esp32/mpconfigport.h
index e49c97ab1..dc6bc2e53 100644
--- a/ports/esp32/mpconfigport.h
+++ b/ports/esp32/mpconfigport.h
@@ -195,6 +195,7 @@
#define MICROPY_PY_FRAMEBUF (1)
#define MICROPY_PY_BTREE (1)
#define MICROPY_PY_ONEWIRE (1)
+#define MICROPY_PY_UPLATFORM (1)
#define MICROPY_PY_USOCKET_EVENTS (MICROPY_PY_WEBREPL)
#define MICROPY_PY_BLUETOOTH_RANDOM_ADDR (1)
#define MICROPY_PY_BLUETOOTH_DEFAULT_GAP_NAME ("ESP32")
diff --git a/ports/esp32/mphalport.h b/ports/esp32/mphalport.h
index 2dad8fa92..01c14ad70 100644
--- a/ports/esp32/mphalport.h
+++ b/ports/esp32/mphalport.h
@@ -35,6 +35,8 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
+#define MICROPY_PLATFORM_VERSION "IDF" IDF_VER
+
// The core that the MicroPython task(s) are pinned to.
// Until we move to IDF 4.2+, we need NimBLE on core 0, and for synchronisation
// with the ringbuffer and scheduler MP needs to be on the same core.