Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys.platform not present for ESP32-S2 boards like FeatherS2 #3951

Closed
kevinjwalters opened this issue Jan 8, 2021 · 1 comment
Closed

sys.platform not present for ESP32-S2 boards like FeatherS2 #3951

kevinjwalters opened this issue Jan 8, 2021 · 1 comment
Labels
bug cpython api modules from cpython espressif applies to multiple Espressif chips good first issue help wanted

Comments

@kevinjwalters
Copy link

kevinjwalters commented Jan 8, 2021

A new FeatherS2 (from @UnexpectedMaker) which comes with 6.0.0 does not have sys.platform:

Adafruit CircuitPython 6.0.0 on 2020-11-16; FeatherS2 with ESP32S2
>>> import sys
>>> dir(sys)
['__class__', '__name__', 'argv', 'byteorder', 'exit', 'implementation', 'maxsize', 'modules', 'path', 'print_exception', 'stderr', 'stdin', 'stdout', 'version', 'version_info']
>>> sys.version
'3.4.0'
>>> sys.platform
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'platform'

@jepler mentions in land of Discord

it looks like this is missing because the port doesn't define a macro. It would need to be similar to nrf: ports/nrf/mpconfigport.h:#define MICROPY_PY_SYS_PLATFORM "nRF52840".

referring to https://github.com/adafruit/circuitpython/blob/main/ports/esp32s2/mpconfigport.h which seems a lot small than the nrf and atmel-samd ones.

@tannewt tannewt added bug cpython api modules from cpython espressif applies to multiple Espressif chips good first issue help wanted labels Jan 8, 2021
@tannewt tannewt added this to the 6.x.x - Bug Fixes milestone Jan 8, 2021
@anecdata
Copy link
Member

Added in #3954. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cpython api modules from cpython espressif applies to multiple Espressif chips good first issue help wanted
Projects
None yet
Development

No branches or pull requests

3 participants