Esp-idf Extension 1.4.0 with ESP32-C3-DevKitC-02 (Apple M1)

Not sure if this is a PlatformIO or ESP-IDF issue but…

I’ve installed the latest ESP-IDF according to the Espressif web site on my iMac M1 (Monterey, fully patched) that included support for the ESP32-C3 (in fact i installed support for ‘all’ device families).

Trying the ‘Blink’ example program and selecting the ‘GCC 8.4.0 riscv32-esp-elf’ compiler I get:

[build] FAILED: esp-idf/mbedtls/x509_crt_bundle /Users/susan/Documents/blink/build/esp-idf/mbedtls/x509_crt_bundle 
[build] cd /Users/susan/Documents/blink/build/esp-idf/mbedtls && python /Users/susan/esp/esp-idf/components/mbedtls/esp_crt_bundle/gen_crt_bundle.py --input /Users/susan/esp/esp-idf/components/mbedtls/esp_crt_bundle/cacrt_all.pem /Users/susan/esp/esp-idf/components/mbedtls/esp_crt_bundle/cacrt_local.pem -q
[build] Traceback (most recent call last):
[build]   File "/Users/susan/esp/esp-idf/components/mbedtls/esp_crt_bundle/gen_crt_bundle.py", line 213, in <module>
[build]     main()
[build]   File "/Users/susan/esp/esp-idf/components/mbedtls/esp_crt_bundle/gen_crt_bundle.py", line 197, in main
[build]     bundle.add_from_file(path)
[build]   File "/Users/susan/esp/esp-idf/components/mbedtls/esp_crt_bundle/gen_crt_bundle.py", line 75, in add_from_file
[build]     self.add_from_pem(crt_str)
[build]   File "/Users/susan/esp/esp-idf/components/mbedtls/esp_crt_bundle/gen_crt_bundle.py", line 105, in add_from_pem
[build]     self.certificates.append(x509.load_pem_x509_certificate(crt.encode(), default_backend()))
[build]   File "/Users/susan/.espressif/python_env/idf5.0_py3.10_env/lib/python3.10/site-packages/cryptography/hazmat/backends/__init__.py", line 9, in default_backend
[build]     from cryptography.hazmat.backends.openssl.backend import backend
[build]   File "/Users/susan/.espressif/python_env/idf5.0_py3.10_env/lib/python3.10/site-packages/cryptography/hazmat/backends/openssl/__init__.py", line 6, in <module>
[build]     from cryptography.hazmat.backends.openssl.backend import backend
[build]   File "/Users/susan/.espressif/python_env/idf5.0_py3.10_env/lib/python3.10/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 64, in <module>
[build]     from cryptography.hazmat.bindings.openssl import binding
[build]   File "/Users/susan/.espressif/python_env/idf5.0_py3.10_env/lib/python3.10/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 14, in <module>
[build]     from cryptography.hazmat.bindings._openssl import ffi, lib
[build] ImportError: dlopen(/Users/susan/.espressif/python_env/idf5.0_py3.10_env/lib/python3.10/site-packages/_cffi_backend.cpython-310-darwin.so, 0x0002): tried: '/Users/susan/.espressif/python_env/idf5.0_py3.10_env/lib/python3.10/site-packages/_cffi_backend.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
[build] ninja: build stopped: subcommand failed.
[build] Build finished with exit code 1

It would seem from this that the environment is expecting the MacOS to be running n the old Intel core and not allowing it to run on the M1 core.

Is there a way to make it realise that this is an ARM processor, not Intel?

Susan