Platform IDE for VSCode on Mac ARM/M1?

hi Guys,

got these days my new Mac mini with M1 Processor and tried to install VSC again.
As there is a M1 Version already avaiable, VSC Exploration, I tried it out and it works great by now.

But my tries to get PlatformIO IDE running on it were not very successfully.

So my question is: Is it already possible to get Platform IDE running on a Mac with ARM architecture?
If the answer is no, is there already something planned to get it up and running again?

Thanks in advance for any answer.

kind regards
Chako

Please elaborate. Is the extension not available? Fails to install? A project fails to compile?

1 Like

Hi Max,

When I start VSC I see 1st an error message telling me that arm64 Architecture is not supported. That messages comes from the C/C++ Extension. Nothing else comes up.

But on left side I see the PIO Icon and when I click it and choose then open I see a „Loading …“ Message until the following error comes up:

Klicking to „Check available solutions“ shows me text about Windows but I did not see anything regarding Mac OS.

kr

j

It seems to fail when installing one of the Python dependencies for PlatformIO, cryptography, which has cffi as a sub-dependency (and OpenSSL, too). This issue is known in Unable to install on macOS Big Sur (release version) and Xcode 12.2 ¡ Issue #5568 ¡ pyca/cryptography ¡ GitHub and error while installing cryptography or cffi on Big Sur ¡ Issue #5572 ¡ pyca/cryptography ¡ GitHub.

Could you open a new terminal and do

cd /Users/chako/.platformio/penv/Scripts
./activate
./pip3 install cryptography

and post the full output.

If this fails there might be a more complicated way to build this module for the M1 silicon (Installation — Cryptography 40.0.0.dev1 documentation), this does require XCode and some dependencies though.

1 Like

hi,

apologize there is no path ./platformio.penv/Scripts.
In penv are only:

drwxr-xr-x  25 chako  staff  800 13 Dez 03:57 bin
drwxr-xr-x   2 chako  staff   64 13 Dez 03:57 include
drwxr-xr-x   3 chako  staff   96 13 Dez 03:57 lib
-rw-r--r--   1 chako  staff   16 13 Dez 03:57 pip.conf
-rw-r--r--   1 chako  staff  114 13 Dez 03:57 pyvenv.cfg
-rw-r--r--   1 chako  staff  168 13 Dez 03:57 state.json
chako@MacMini penv % 

When I try to run your installation using pip3 from my python 3.9 environment, the output is:

chako@MacMini ~ % pip3 install cryptography
Collecting cryptography
  Using cached cryptography-3.3.1.tar.gz (539 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: six>=1.4.1 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from cryptography) (1.15.0)
Collecting cffi>=1.12
  Using cached cffi-1.14.4-cp39-cp39-macosx_11_0_universal2.whl
Collecting pycparser
  Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Building wheels for collected packages: cryptography
  Building wheel for cryptography (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/35/_1xxcjcs64l0vb4dpz3262qc0000gn/T/tmpbxbfpb2j
       cwd: /private/var/folders/35/_1xxcjcs64l0vb4dpz3262qc0000gn/T/pip-install-apn0749i/cryptography_0456ec34803a4c1389962f8fb835d230
  Complete output (147 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-universal2-3.9
  creating build/lib.macosx-10.9-universal2-3.9/cryptography
  copying src/cryptography/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography
  copying src/cryptography/utils.py -> build/lib.macosx-10.9-universal2-3.9/cryptography
  copying src/cryptography/__about__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography
  copying src/cryptography/exceptions.py -> build/lib.macosx-10.9-universal2-3.9/cryptography
  copying src/cryptography/fernet.py -> build/lib.macosx-10.9-universal2-3.9/cryptography
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat
  copying src/cryptography/hazmat/_der.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat
  copying src/cryptography/hazmat/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat
  copying src/cryptography/hazmat/_oid.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  copying src/cryptography/x509/oid.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  copying src/cryptography/x509/ocsp.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  copying src/cryptography/x509/general_name.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  copying src/cryptography/x509/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  copying src/cryptography/x509/extensions.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  copying src/cryptography/x509/name.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  copying src/cryptography/x509/base.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  copying src/cryptography/x509/certificate_transparency.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends
  copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends
  copying src/cryptography/hazmat/backends/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/poly1305.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/padding.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/bindings
  copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/bindings
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/x448.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ocsp.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/poly1305.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ed25519.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ed448.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/kdf
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/utils.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/twofactor
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/pkcs12.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/pkcs7.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/ssh.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/base.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/serialization
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/ciphers
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/x448.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/ed25519.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/ed448.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/bindings/openssl
  copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/bindings/openssl
  copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/bindings/openssl
  copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/bindings/openssl
  running egg_info
  writing src/cryptography.egg-info/PKG-INFO
  writing dependency_links to src/cryptography.egg-info/dependency_links.txt
  writing requirements to src/cryptography.egg-info/requires.txt
  writing top-level names to src/cryptography.egg-info/top_level.txt
  reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  no previously-included directories found matching 'docs/_build'
  warning: no previously-included files found matching 'vectors'
  warning: no previously-included files matching '*' found under directory 'vectors'
  warning: no previously-included files matching '*' found under directory '.github'
  warning: no previously-included files found matching 'release.py'
  warning: no previously-included files found matching '.coveragerc'
  warning: no previously-included files found matching 'codecov.yml'
  warning: no previously-included files found matching '.readthedocs.yml'
  warning: no previously-included files found matching 'dev-requirements.txt'
  warning: no previously-included files found matching 'rtd-requirements.txt'
  warning: no previously-included files found matching 'tox.ini'
  warning: no previously-included files matching '*' found under directory '.zuul.d'
  warning: no previously-included files matching '*' found under directory '.zuul.playbooks'
  writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
  running build_ext
  generating cffi module 'build/temp.macosx-10.9-universal2-3.9/_padding.c'
  creating build/temp.macosx-10.9-universal2-3.9
  generating cffi module 'build/temp.macosx-10.9-universal2-3.9/_openssl.c'
  building '_openssl' extension
  creating build/temp.macosx-10.9-universal2-3.9/build
  creating build/temp.macosx-10.9-universal2-3.9/build/temp.macosx-10.9-universal2-3.9
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c build/temp.macosx-10.9-universal2-3.9/_openssl.c -o build/temp.macosx-10.9-universal2-3.9/build/temp.macosx-10.9-universal2-3.9/_openssl.o -Wconversion -Wno-error=sign-conversion
  build/temp.macosx-10.9-universal2-3.9/_openssl.c:575:10: fatal error: 'openssl/opensslv.h' file not found
  #include <openssl/opensslv.h>
           ^~~~~~~~~~~~~~~~~~~~
  1 error generated.
  
      =============================DEBUG ASSISTANCE=============================
      If you are seeing a compilation error please try the following steps to
      successfully install cryptography:
      1) Upgrade to the latest pip and try again. This will fix errors for most
         users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
      2) Read https://cryptography.io/en/latest/installation.html for specific
         instructions for your platform.
      3) Check our frequently asked questions for more information:
         https://cryptography.io/en/latest/faq.html
      =============================DEBUG ASSISTANCE=============================
  
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
chako@MacMini ~ %  

Will check your link for the Xcode solution tomorrow. Regarding Openssl I compiled already universal libraries accordingly to this page for latest version (1.1.1i):

But honestly I do currently still not really know how to use them as I am not a developer…
But have some basic knowledge which I will use to dig that out during next days… :wink:

Thanks already now for your answers and patience!

kr
j

If it can’t find that library you might need to install a OpenSSL development package that has this header file… Maybe checkout 'openssl/opensslv.h' file not found and Mac install fails with fatal error: 'openssl/opensslv.h' file not found (tried previous instructions) · Issue #3489 · pyca/cryptography · GitHub.

But I agree this is very fiddily and complicated. Right now it’s not installing because the PyPi registry does not have a precompiled version for cryptography for the Darwin ARM architecture.

Even if that hurdle is removed, PlatformIO still lacks the platform-native compiler toolchains and upload tools (like, toolchain-atmelavr with AVR-GCC, avrdude uploader etc, depending on target embedded board). So it will be much more work after that, compiling those yourself. That is just something the maintainers of PlatformIO (@ivankravets) will surely do in the future to support the darwin_arm64 platform with the Apple M1 silicon, but right now it’ll be hard with these problems in even standard Python libraries.

1 Like

Thanks again Maximilian,

sounds like a bit too high level for my development skills.
Must switch to my 10 years old outdated Mac mini with Intel CPU for this kind of task then…

kr
j

2 Likes

Probably your best option for now. Given that the M1 has basically only just been released, and is completely different architecture, there will be a lot of things that won’t just work (yet!) despite what Apple might like to claim. It won’t take long to change that if the demand is there. :wink:

1 Like

You can install https://brew.sh/ and then

brew install openssl
1 Like

hi Ivan,

yepp as the 1st Homebrew release with M1 support was announced some days ago I installed it and used the openssl install you sent over. The error that C/C++ Extension does not support Arm Architecture is still there when I open up VSC but:

Platform IDE comes up like usual! I even imported Tasmota as a Project (=Arduino stuff for home automation). But when I try to compile Tasmota I get the following error:

Executing task: pio run <

Processing tasmota-DE (platform: espressif8266 @ 2.6.2; framework: arduino; board: esp01_1m)

Tool Manager: Installing platformio/toolchain-xtensa @ 2.40802.200502
Error: Could not find the package with ‘platformio/toolchain-xtensa @ 2.40802.200502’ requirements for your system ‘darwin_arm64’
Der Terminalprozess “pio ‘run’” wurde mit folgendem Exitcode beendet: 1.

Is this toolchain-xtensa something fixable too?

kr
Chako

Let’s test it. Please download and unpack this toolchain Service End for Bintray, JCenter, GoCenter, and ChartCenter | JFrog

Try to run from CLI some binary from bin folder. For example gcc-xxxx --version. Does it work?

1 Like

Hi Ivan,

Not 100% sure what I must do within PlatformIDE, but what I did

a) Downloaded your archive and extracted it into a temp Directory.
b) Disabled Mac security as I was not allowed to execute cmdlline gcc due to „not verified Developer“.

Then I used the GCC Compiler command you mentioned:
chako@MacMini bin % xtensa-lx106-elf-gcc --version

xtensa-lx106-elf-gcc (GCC) 10.2.0

Copyright (C) 2020 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Looks to me as if gcc ran ok. To answer your question: Yes it worked.

Will check later on today if I find this path in PlatfromIDE setup to understand where I must extract it to exchange your “extensa” with the installed version ….

Great! Apple uses Rosetta emulator. It means, we just need to repack our existing packages for x86 and add Arm to manifest.

I’ll need the last confirmation. please do the next steps:

  1. Download ***-contrib-pysite-darwin_x86_64-2.39-*** from Service End for Bintray, JCenter, GoCenter, and ChartCenter | JFrog . It looks you have Python 3.9 in the system
  2. Unpack it
  3. Replace ALL files in ~/.platformio/packages/contrib-pysite by files from archive. But!!! KEEP OLD package.json and .pm.
  4. Open PlatformIO CLI in IDE and type pio home.

So, does it works WITHOUT recompiling which you reported above in the initial comment?

hmm … there is no .pm file in this directory only the package.json is there.

ok, I did:

  • renamed old contrib-pysite and even moved it to another location.
  • Downloaded the file you mentioned and extracted it.
  • created a new contrib-pysite directory and copied all files from extracted archive over.
  • Superseeded package.json with the version from original contrib-pysite directory.

and started VSC.

Results:

  • PlatfromIO IDE did not start automatically. But when I clicked the open button it started up.
  • Compile Error stayed the same.
  • I used even the package.json from the downloaded tar file. Then it started up automatically but compile error stayed the same again.
  • result from pio home is the same as well, see picture further down.

If you like we can do a team viewer session then you can verify or even suggest additional steps.
Simply let me know if you would like to do that and when.

merry Christmas to everybody who reads this … :wink:

kr
j

Contacted in PM. I would be thankful for the remote session to test all binaries.

hi Ivan,

the changes took place this morning on my side. All fine now!

Fyi:

  • When I 1st tried to compile I got the following Linker Error:
Linking .pio/build/tasmota-DE/firmware.elf
/Users/chako/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .pio/build/tasmota-DE/libFrameworkArduino.a(core_esp8266_main.cpp.o):(.text._ZL12loop_wrapperv+0x4): undefined reference to `setup'
/Users/chako/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .pio/build/tasmota-DE/libFrameworkArduino.a(core_esp8266_main.cpp.o):(.text._ZL12loop_wrapperv+0x8): undefined reference to `loop'
/Users/chako/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .pio/build/tasmota-DE/libFrameworkArduino.a(core_esp8266_main.cpp.o): in function `loop_wrapper()':
core_esp8266_main.cpp:(.text._ZL12loop_wrapperv+0x21): undefined reference to `setup'
/Users/chako/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: core_esp8266_main.cpp:(.text._ZL12loop_wrapperv+0x2d): undefined reference to `loop'
collect2: error: ld returned 1 exit status
*** [.pio/build/tasmota-DE/firmware.elf] Error 1

but when I restarted compilation (without any change) everything went through fine and successfully.
To verify I flashed two Shellys successfully and tested them “in the wild” … :wink:

Great job, thanks!

kr
j

1 Like

Yes, we repacked all macOS packages and added support for ARM64 architecture.

Thank you so much for the provided remote session to investigate this issue.

Happy Holidays and Happy New Year! :christmas_tree: :gift:

1 Like

you are welcome, anytime! … :grinning: :metal:

1 Like

Does this means that PlatformIO is supposed to work under the ARM version of VSCode? Because I’m not being able to compile my project.

What’s the exact platformio.ini, code and the output of pio system info (in a CLI)? You have an Apple M1 based computer, yeah?