Skip to content

Commit

Permalink
esp32: Enable platform module with IDF version.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dpgeorge committed Jan 6, 2022
1 parent 3243abf commit b96318a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions ports/esp32/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 2 additions & 0 deletions ports/esp32/mphalport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b96318a

Please sign in to comment.