m5stack / Core2-for-AWS-IoT-Kit

Accompanying code for use with AWS IoT Kit content. Works with PlatformIO and ESP-IDF v4.2.
https://m5stack.com/collections/m5-core/products/m5stack-core2-esp32-iot-development-kit-for-aws-iot-edukit
MIT License
127 stars 66 forks source link

Apple M1 Support (arm64) #85

Closed DarkSector closed 2 years ago

DarkSector commented 2 years ago

Microchip Cryptoauthlib package is not buildable using Apple M1. Is there a work around for this? This comes up when trying to register_thing.

cryptoauthlib also only supports python 3.7 nothing beyond that.

pio run -e core2foraws-device_reg -t register_thing > ~/Desktop/output.txt
  ERROR: Command errored out with exit status 1:
   command: /Users/pronoyc/.platformio/penv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/setup.py'"'"'; __file__='"'"'/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-wheel-p8uuetld
       cwd: /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/
  Complete output (302 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.14-arm64-3.8
  creating build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
  copying cryptoauthlib/tng.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
  copying cryptoauthlib/library.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
  copying cryptoauthlib/device.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
  copying cryptoauthlib/iface.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
  copying cryptoauthlib/atjwt.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
  copying cryptoauthlib/__init__.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
  copying cryptoauthlib/atcab.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
  copying cryptoauthlib/atcacert.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
  copying cryptoauthlib/sha206_api.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
  copying cryptoauthlib/exceptions.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
  copying cryptoauthlib/talib.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
  copying cryptoauthlib/atcaenum.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
  copying cryptoauthlib/status.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
  running egg_info
  writing cryptoauthlib.egg-info/PKG-INFO
  writing dependency_links to cryptoauthlib.egg-info/dependency_links.txt
  writing requirements to cryptoauthlib.egg-info/requires.txt
  writing top-level names to cryptoauthlib.egg-info/top_level.txt
  reading manifest file 'cryptoauthlib.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching 'release_notes.md'
  writing manifest file 'cryptoauthlib.egg-info/SOURCES.txt'
  copying cryptoauthlib/cryptoauth.json -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
  running build_ext
  Traceback (most recent call last):
    File "/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/setup.py", line 187, in build_extension
      subprocess.check_output(['cmake', '--build', '.'] + build_args, cwd=os.path.abspath(self.build_temp), stderr=subprocess.STDOUT)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 415, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 516, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release']' returned non-zero exit status 2.

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/setup.py", line 213, in <module>
      setup(
    File "/Users/pronoyc/.platformio/penv/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
      return distutils.core.setup(**attrs)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Users/pronoyc/.platformio/penv/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Users/pronoyc/.platformio/penv/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 87, in run
      _build_ext.run(self)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 340, in run
      self.build_extensions()
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
      self._build_extensions_serial()
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
      self.build_extension(ext)
    File "/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/setup.py", line 192, in build_extension
      raise RuntimeError(e.output.decode('utf-8'))
  RuntimeError: [  1%] Building C object CMakeFiles/cryptoauth.dir/atca_basic.c.o
  [  2%] Building C object CMakeFiles/cryptoauth.dir/atca_cfgs.c.o
  [  4%] Building C object CMakeFiles/cryptoauth.dir/atca_debug.c.o
  [  5%] Building C object CMakeFiles/cryptoauth.dir/atca_device.c.o
  [  6%] Building C object CMakeFiles/cryptoauth.dir/atca_helpers.c.o
  [  8%] Building C object CMakeFiles/cryptoauth.dir/atca_iface.c.o
  [  9%] Building C object CMakeFiles/cryptoauth.dir/atca_utils_sizes.c.o
  [ 10%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_aes.c.o
  [ 12%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_aes_gcm.c.o
  [ 13%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_basic.c.o
  [ 15%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_checkmac.c.o
  [ 16%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_command.c.o
  [ 17%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_counter.c.o
  [ 19%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_derivekey.c.o
  [ 20%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_ecdh.c.o
  [ 21%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_execution.c.o
  [ 23%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_gendig.c.o
  [ 24%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_genkey.c.o
  [ 26%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_helpers.c.o
  [ 27%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_hmac.c.o
  [ 28%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_info.c.o
  [ 30%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_kdf.c.o
  [ 31%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_lock.c.o
  [ 32%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_mac.c.o
  [ 34%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_nonce.c.o
  [ 35%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_privwrite.c.o
  [ 36%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_random.c.o
  [ 38%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_read.c.o
  [ 39%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_secureboot.c.o
  [ 41%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_selftest.c.o
  [ 42%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_sha.c.o
  [ 43%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_sign.c.o
  [ 45%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_updateextra.c.o
  [ 46%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_verify.c.o
  [ 47%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_write.c.o
  [ 49%] Building C object CMakeFiles/cryptoauth.dir/host/atca_host.c.o
  [ 50%] Building C object CMakeFiles/cryptoauth.dir/atcacert/atcacert_client.c.o
  [ 52%] Building C object CMakeFiles/cryptoauth.dir/atcacert/atcacert_date.c.o
  [ 53%] Building C object CMakeFiles/cryptoauth.dir/atcacert/atcacert_def.c.o
  [ 54%] Building C object CMakeFiles/cryptoauth.dir/atcacert/atcacert_der.c.o
  [ 56%] Building C object CMakeFiles/cryptoauth.dir/atcacert/atcacert_host_hw.c.o
  [ 57%] Building C object CMakeFiles/cryptoauth.dir/atcacert/atcacert_host_sw.c.o
  [ 58%] Building C object CMakeFiles/cryptoauth.dir/atcacert/atcacert_pem.c.o
  [ 60%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_hw_aes_cbc.c.o
  [ 61%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_hw_aes_cbcmac.c.o
  [ 63%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_hw_aes_ccm.c.o
  [ 64%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_hw_aes_cmac.c.o
  [ 65%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_hw_aes_ctr.c.o
  [ 67%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_pbkdf2.c.o
  [ 68%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_sw_ecdsa.c.o
  [ 69%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_sw_rand.c.o
  [ 71%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_sw_sha1.c.o
  [ 72%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_sw_sha2.c.o
  [ 73%] Building C object CMakeFiles/cryptoauth.dir/crypto/hashes/sha1_routines.c.o
  [ 75%] Building C object CMakeFiles/cryptoauth.dir/crypto/hashes/sha2_routines.c.o
  [ 76%] Building C object CMakeFiles/cryptoauth.dir/jwt/atca_jwt.c.o
  [ 78%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tflxtls_cert_def_4_device.c.o
  [ 79%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tng_atca.c.o
  [ 80%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tng_atcacert_client.c.o
  [ 82%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tng_root_cert.c.o
  [ 83%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_1_signer.c.o
  [ 84%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_2_device.c.o
  [ 86%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_4_device.c.o
  [ 87%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_1_signer.c.o
  [ 89%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_2_device.c.o
  [ 90%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_3_device.c.o
  [ 91%] Building C object CMakeFiles/cryptoauth.dir/hal/atca_hal.c.o
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/atca_hal.c:309:33: warning: incompatible function pointer types assigning to 'ATCA_STATUS (*)(ATCAIface, ATCAIfaceCfg *)' (aka 'ATCA_STATUS (*)(struct atca_iface *, ATCAIfaceCfg *)') from 'ATCA_STATUS (*)(void *, void *)' [-Wincompatible-function-pointer-types]
                  (*hal)->halinit = cfg->atcacustom.halinit;
                                  ^ ~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/atca_hal.c:310:37: warning: incompatible function pointer types assigning to 'ATCA_STATUS (*)(ATCAIface)' (aka 'ATCA_STATUS (*)(struct atca_iface *)') from 'ATCA_STATUS (*)(void *)' [-Wincompatible-function-pointer-types]
                  (*hal)->halpostinit = cfg->atcacustom.halpostinit;
                                      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/atca_hal.c:311:36: warning: incompatible function pointer types assigning to 'ATCA_STATUS (*)(ATCAIface, uint8_t, uint8_t *, uint16_t *)' (aka 'ATCA_STATUS (*)(struct atca_iface *, unsigned char, unsigned char *, unsigned short *)') from 'ATCA_STATUS (*)(void *, uint8_t, uint8_t *, uint16_t *)' (aka 'ATCA_STATUS (*)(void *, unsigned char, unsigned char *, unsigned short *)') [-Wincompatible-function-pointer-types]
                  (*hal)->halreceive = cfg->atcacustom.halreceive;
                                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/atca_hal.c:312:33: warning: incompatible function pointer types assigning to 'ATCA_STATUS (*)(ATCAIface, uint8_t, uint8_t *, int)' (aka 'ATCA_STATUS (*)(struct atca_iface *, unsigned char, unsigned char *, int)') from 'ATCA_STATUS (*)(void *, uint8_t, uint8_t *, int)' (aka 'ATCA_STATUS (*)(void *, unsigned char, unsigned char *, int)') [-Wincompatible-function-pointer-types]
                  (*hal)->halsend = cfg->atcacustom.halsend;
                                  ^ ~~~~~~~~~~~~~~~~~~~~~~~
  4 warnings generated.
  [ 93%] Building C object CMakeFiles/cryptoauth.dir/hal/hal_linux.c.o
  [ 94%] Building C object CMakeFiles/cryptoauth.dir/hal/kit_protocol.c.o
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:347:59: warning: passing 'char [32]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
          if (ATCA_SUCCESS != (status = kit_phy_send(iface, txbuf, txlen)))
                                                            ^~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
  ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                     ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:354:62: warning: passing 'char [42]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
          if (ATCA_SUCCESS != (status = kit_phy_receive(iface, rxbuf, &rxlen)))
                                                               ^~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
  ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                        ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:390:63: warning: passing 'char [32]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
              if (ATCA_SUCCESS != (status = kit_phy_send(iface, txbuf, txlen)))
                                                                ^~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
  ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                     ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:396:45: warning: passing 'char [42]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
              status = kit_phy_receive(iface, rxbuf, &rxlen);
                                              ^~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
  ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                        ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:414:67: warning: passing 'char [32]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
                  if (ATCA_SUCCESS != (status = kit_phy_send(iface, txbuf, txlen)))
                                                                    ^~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
  ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                     ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:421:46: warning: passing 'char [42]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
                  (void)kit_phy_receive(iface, rxbuf, &rxlen);
                                               ^~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
  ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                        ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:431:67: warning: passing 'char [32]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
                  if (ATCA_SUCCESS != (status = kit_phy_send(iface, txbuf, txlen)))
                                                                    ^~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
  ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                     ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:437:49: warning: passing 'char [42]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
                  status = kit_phy_receive(iface, rxbuf, &rxlen);
                                                  ^~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
  ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                        ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:480:34: warning: passing 'char [32]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
      status = kit_phy_send(iface, txbuf, txbuf_size);
                                   ^~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
  ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                     ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:501:58: warning: passing 'char [38]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
      if (ATCA_SUCCESS != (status = kit_phy_receive(iface, reply, &replysize)))
                                                           ^~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
  ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                        ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:577:59: warning: passing 'char *' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
          if (ATCA_SUCCESS != (status = kit_phy_send(iface, pkitbuf, nkitbuf)))
                                                            ^~~~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
  ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                     ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:638:62: warning: passing 'char *' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
          if (ATCA_SUCCESS != (status = kit_phy_receive(iface, pkitbuf, &nkitbuf)))
                                                               ^~~~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
  ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                        ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:688:34: warning: passing 'char [7]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
      status = kit_phy_send(iface, wake, wakesize);
                                   ^~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
  ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                     ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:697:58: warning: passing 'char [42]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
      if (ATCA_SUCCESS != (status = kit_phy_receive(iface, reply, &replysize)))
                                                           ^~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
  ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                        ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:734:34: warning: passing 'char [7]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
      status = kit_phy_send(iface, idle, idlesize);
                                   ^~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
  ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                     ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:743:58: warning: passing 'char [38]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
      if (ATCA_SUCCESS != (status = kit_phy_receive(iface, reply, &replysize)))
                                                           ^~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
  ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                        ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:781:34: warning: passing 'char [7]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
      status = kit_phy_send(iface, sleep, sleepsize);
                                   ^~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
  ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                     ^
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:790:58: warning: passing 'char [38]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
      if (ATCA_SUCCESS != (status = kit_phy_receive(iface, reply, &replysize)))
                                                           ^~~~~
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
  ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                        ^
  18 warnings generated.
  [ 95%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/third_party/hidapi/mac/hid.c.o
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/third_party/hidapi/mac/hid.c:693:34: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
          entry = IORegistryEntryFromPath(kIOMasterPortDefault, path);
                                          ^~~~~~~~~~~~~~~~~~~~
                                          kIOMainPortDefault
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
  const mach_port_t kIOMasterPortDefault
                    ^
  1 warning generated.
  [ 97%] Building C object CMakeFiles/cryptoauth.dir/hal/hal_all_platforms_kit_hidapi.c.o
  /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/hal_all_platforms_kit_hidapi.c:127:17: warning: result of comparison of constant -1 with expression of type 'uint16_t' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare]
      if (*rxsize == -1)
          ~~~~~~~ ^  ~~
  1 warning generated.
  [ 98%] Building C object CMakeFiles/cryptoauth.dir/hal/hal_linux_uart_userspace.c.o
  [100%] Linking C shared library /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/build/lib.macosx-10.14-arm64-3.8/cryptoauthlib/libcryptoauth.dylib
  ld: warning: pointer not aligned at address 0x2836B (_g_tflxtls_cert_def_4_device + 99 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tflxtls_cert_def_4_device.c.o)
  ld: warning: pointer not aligned at address 0x28361 (_g_tflxtls_cert_def_4_device + 89 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tflxtls_cert_def_4_device.c.o)
  ld: warning: pointer not aligned at address 0x283C3 (_g_tnglora_cert_def_1_signer + 80 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_1_signer.c.o)
  ld: warning: pointer not aligned at address 0x28441 (_g_tnglora_cert_def_2_device + 99 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_2_device.c.o)
  ld: warning: pointer not aligned at address 0x28437 (_g_tnglora_cert_def_2_device + 89 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_2_device.c.o)
  ld: warning: pointer not aligned at address 0x2842E (_g_tnglora_cert_def_2_device + 80 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_2_device.c.o)
  ld: warning: pointer not aligned at address 0x284A2 (_g_tnglora_cert_def_4_device + 89 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_4_device.c.o)
  ld: warning: pointer not aligned at address 0x28499 (_g_tnglora_cert_def_4_device + 80 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_4_device.c.o)
  ld: warning: pointer not aligned at address 0x2850D (_g_tngtls_cert_def_1_signer + 89 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_1_signer.c.o)
  ld: warning: pointer not aligned at address 0x28582 (_g_tngtls_cert_def_2_device + 99 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_2_device.c.o)
  ld: warning: pointer not aligned at address 0x2856F (_g_tngtls_cert_def_2_device + 80 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_2_device.c.o)
  ld: warning: pointer not aligned at address 0x285ED (_g_tngtls_cert_def_3_device + 99 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_3_device.c.o)
  ld: warning: pointer not aligned at address 0x285E3 (_g_tngtls_cert_def_3_device + 89 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_3_device.c.o)
  ld: warning: pointer not aligned at address 0x285DA (_g_tngtls_cert_def_3_device + 80 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_3_device.c.o)
  ld: unaligned pointer(s) for architecture arm64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make[2]: *** [/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/build/lib.macosx-10.14-arm64-3.8/cryptoauthlib/libcryptoauth.dylib] Error 1
  make[1]: *** [CMakeFiles/cryptoauth.dir/all] Error 2
  make: *** [all] Error 2

  ----------------------------------------
  ERROR: Failed building wheel for cryptoauthlib
    ERROR: Command errored out with exit status 1:
     command: /Users/pronoyc/.platformio/penv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/setup.py'"'"'; __file__='"'"'/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-record-h98f6cna/install-record.txt --single-version-externally-managed --compile --install-headers /Users/pronoyc/.platformio/penv/include/site/python3.8/cryptoauthlib
         cwd: /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/
    Complete output (304 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.14-arm64-3.8
    creating build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
    copying cryptoauthlib/tng.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
    copying cryptoauthlib/library.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
    copying cryptoauthlib/device.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
    copying cryptoauthlib/iface.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
    copying cryptoauthlib/atjwt.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
    copying cryptoauthlib/__init__.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
    copying cryptoauthlib/atcab.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
    copying cryptoauthlib/atcacert.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
    copying cryptoauthlib/sha206_api.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
    copying cryptoauthlib/exceptions.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
    copying cryptoauthlib/talib.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
    copying cryptoauthlib/atcaenum.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
    copying cryptoauthlib/status.py -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
    running egg_info
    writing cryptoauthlib.egg-info/PKG-INFO
    writing dependency_links to cryptoauthlib.egg-info/dependency_links.txt
    writing requirements to cryptoauthlib.egg-info/requires.txt
    writing top-level names to cryptoauthlib.egg-info/top_level.txt
    reading manifest file 'cryptoauthlib.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'release_notes.md'
    writing manifest file 'cryptoauthlib.egg-info/SOURCES.txt'
    copying cryptoauthlib/cryptoauth.json -> build/lib.macosx-10.14-arm64-3.8/cryptoauthlib
    running build_ext
    Traceback (most recent call last):
      File "/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/setup.py", line 187, in build_extension
        subprocess.check_output(['cmake', '--build', '.'] + build_args, cwd=os.path.abspath(self.build_temp), stderr=subprocess.STDOUT)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 415, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 516, in run
        raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release']' returned non-zero exit status 2.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/setup.py", line 213, in <module>
        setup(
      File "/Users/pronoyc/.platformio/penv/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
        return distutils.core.setup(**attrs)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Users/pronoyc/.platformio/penv/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/install.py", line 561, in run
        self.run_command('build')
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Users/pronoyc/.platformio/penv/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 87, in run
        _build_ext.run(self)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 340, in run
        self.build_extensions()
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
        self._build_extensions_serial()
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
        self.build_extension(ext)
      File "/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/setup.py", line 192, in build_extension
        raise RuntimeError(e.output.decode('utf-8'))
    RuntimeError: [  1%] Building C object CMakeFiles/cryptoauth.dir/atca_basic.c.o
    [  2%] Building C object CMakeFiles/cryptoauth.dir/atca_cfgs.c.o
    [  4%] Building C object CMakeFiles/cryptoauth.dir/atca_debug.c.o
    [  5%] Building C object CMakeFiles/cryptoauth.dir/atca_device.c.o
    [  6%] Building C object CMakeFiles/cryptoauth.dir/atca_helpers.c.o
    [  8%] Building C object CMakeFiles/cryptoauth.dir/atca_iface.c.o
    [  9%] Building C object CMakeFiles/cryptoauth.dir/atca_utils_sizes.c.o
    [ 10%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_aes.c.o
    [ 12%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_aes_gcm.c.o
    [ 13%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_basic.c.o
    [ 15%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_checkmac.c.o
    [ 16%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_command.c.o
    [ 17%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_counter.c.o
    [ 19%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_derivekey.c.o
    [ 20%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_ecdh.c.o
    [ 21%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_execution.c.o
    [ 23%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_gendig.c.o
    [ 24%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_genkey.c.o
    [ 26%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_helpers.c.o
    [ 27%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_hmac.c.o
    [ 28%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_info.c.o
    [ 30%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_kdf.c.o
    [ 31%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_lock.c.o
    [ 32%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_mac.c.o
    [ 34%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_nonce.c.o
    [ 35%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_privwrite.c.o
    [ 36%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_random.c.o
    [ 38%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_read.c.o
    [ 39%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_secureboot.c.o
    [ 41%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_selftest.c.o
    [ 42%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_sha.c.o
    [ 43%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_sign.c.o
    [ 45%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_updateextra.c.o
    [ 46%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_verify.c.o
    [ 47%] Building C object CMakeFiles/cryptoauth.dir/calib/calib_write.c.o
    [ 49%] Building C object CMakeFiles/cryptoauth.dir/host/atca_host.c.o
    [ 50%] Building C object CMakeFiles/cryptoauth.dir/atcacert/atcacert_client.c.o
    [ 52%] Building C object CMakeFiles/cryptoauth.dir/atcacert/atcacert_date.c.o
    [ 53%] Building C object CMakeFiles/cryptoauth.dir/atcacert/atcacert_def.c.o
    [ 54%] Building C object CMakeFiles/cryptoauth.dir/atcacert/atcacert_der.c.o
    [ 56%] Building C object CMakeFiles/cryptoauth.dir/atcacert/atcacert_host_hw.c.o
    [ 57%] Building C object CMakeFiles/cryptoauth.dir/atcacert/atcacert_host_sw.c.o
    [ 58%] Building C object CMakeFiles/cryptoauth.dir/atcacert/atcacert_pem.c.o
    [ 60%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_hw_aes_cbc.c.o
    [ 61%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_hw_aes_cbcmac.c.o
    [ 63%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_hw_aes_ccm.c.o
    [ 64%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_hw_aes_cmac.c.o
    [ 65%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_hw_aes_ctr.c.o
    [ 67%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_pbkdf2.c.o
    [ 68%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_sw_ecdsa.c.o
    [ 69%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_sw_rand.c.o
    [ 71%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_sw_sha1.c.o
    [ 72%] Building C object CMakeFiles/cryptoauth.dir/crypto/atca_crypto_sw_sha2.c.o
    [ 73%] Building C object CMakeFiles/cryptoauth.dir/crypto/hashes/sha1_routines.c.o
    [ 75%] Building C object CMakeFiles/cryptoauth.dir/crypto/hashes/sha2_routines.c.o
    [ 76%] Building C object CMakeFiles/cryptoauth.dir/jwt/atca_jwt.c.o
    [ 78%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tflxtls_cert_def_4_device.c.o
    [ 79%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tng_atca.c.o
    [ 80%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tng_atcacert_client.c.o
    [ 82%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tng_root_cert.c.o
    [ 83%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_1_signer.c.o
    [ 84%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_2_device.c.o
    [ 86%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_4_device.c.o
    [ 87%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_1_signer.c.o
    [ 89%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_2_device.c.o
    [ 90%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_3_device.c.o
    [ 91%] Building C object CMakeFiles/cryptoauth.dir/hal/atca_hal.c.o
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/atca_hal.c:309:33: warning: incompatible function pointer types assigning to 'ATCA_STATUS (*)(ATCAIface, ATCAIfaceCfg *)' (aka 'ATCA_STATUS (*)(struct atca_iface *, ATCAIfaceCfg *)') from 'ATCA_STATUS (*)(void *, void *)' [-Wincompatible-function-pointer-types]
                    (*hal)->halinit = cfg->atcacustom.halinit;
                                    ^ ~~~~~~~~~~~~~~~~~~~~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/atca_hal.c:310:37: warning: incompatible function pointer types assigning to 'ATCA_STATUS (*)(ATCAIface)' (aka 'ATCA_STATUS (*)(struct atca_iface *)') from 'ATCA_STATUS (*)(void *)' [-Wincompatible-function-pointer-types]
                    (*hal)->halpostinit = cfg->atcacustom.halpostinit;
                                        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/atca_hal.c:311:36: warning: incompatible function pointer types assigning to 'ATCA_STATUS (*)(ATCAIface, uint8_t, uint8_t *, uint16_t *)' (aka 'ATCA_STATUS (*)(struct atca_iface *, unsigned char, unsigned char *, unsigned short *)') from 'ATCA_STATUS (*)(void *, uint8_t, uint8_t *, uint16_t *)' (aka 'ATCA_STATUS (*)(void *, unsigned char, unsigned char *, unsigned short *)') [-Wincompatible-function-pointer-types]
                    (*hal)->halreceive = cfg->atcacustom.halreceive;
                                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/atca_hal.c:312:33: warning: incompatible function pointer types assigning to 'ATCA_STATUS (*)(ATCAIface, uint8_t, uint8_t *, int)' (aka 'ATCA_STATUS (*)(struct atca_iface *, unsigned char, unsigned char *, int)') from 'ATCA_STATUS (*)(void *, uint8_t, uint8_t *, int)' (aka 'ATCA_STATUS (*)(void *, unsigned char, unsigned char *, int)') [-Wincompatible-function-pointer-types]
                    (*hal)->halsend = cfg->atcacustom.halsend;
                                    ^ ~~~~~~~~~~~~~~~~~~~~~~~
    4 warnings generated.
    [ 93%] Building C object CMakeFiles/cryptoauth.dir/hal/hal_linux.c.o
    [ 94%] Building C object CMakeFiles/cryptoauth.dir/hal/kit_protocol.c.o
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:347:59: warning: passing 'char [32]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
            if (ATCA_SUCCESS != (status = kit_phy_send(iface, txbuf, txlen)))
                                                              ^~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
    ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                       ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:354:62: warning: passing 'char [42]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
            if (ATCA_SUCCESS != (status = kit_phy_receive(iface, rxbuf, &rxlen)))
                                                                 ^~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
    ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                          ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:390:63: warning: passing 'char [32]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
                if (ATCA_SUCCESS != (status = kit_phy_send(iface, txbuf, txlen)))
                                                                  ^~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
    ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                       ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:396:45: warning: passing 'char [42]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
                status = kit_phy_receive(iface, rxbuf, &rxlen);
                                                ^~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
    ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                          ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:414:67: warning: passing 'char [32]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
                    if (ATCA_SUCCESS != (status = kit_phy_send(iface, txbuf, txlen)))
                                                                      ^~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
    ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                       ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:421:46: warning: passing 'char [42]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
                    (void)kit_phy_receive(iface, rxbuf, &rxlen);
                                                 ^~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
    ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                          ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:431:67: warning: passing 'char [32]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
                    if (ATCA_SUCCESS != (status = kit_phy_send(iface, txbuf, txlen)))
                                                                      ^~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
    ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                       ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:437:49: warning: passing 'char [42]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
                    status = kit_phy_receive(iface, rxbuf, &rxlen);
                                                    ^~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
    ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                          ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:480:34: warning: passing 'char [32]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
        status = kit_phy_send(iface, txbuf, txbuf_size);
                                     ^~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
    ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                       ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:501:58: warning: passing 'char [38]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
        if (ATCA_SUCCESS != (status = kit_phy_receive(iface, reply, &replysize)))
                                                             ^~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
    ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                          ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:577:59: warning: passing 'char *' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
            if (ATCA_SUCCESS != (status = kit_phy_send(iface, pkitbuf, nkitbuf)))
                                                              ^~~~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
    ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                       ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:638:62: warning: passing 'char *' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
            if (ATCA_SUCCESS != (status = kit_phy_receive(iface, pkitbuf, &nkitbuf)))
                                                                 ^~~~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
    ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                          ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:688:34: warning: passing 'char [7]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
        status = kit_phy_send(iface, wake, wakesize);
                                     ^~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
    ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                       ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:697:58: warning: passing 'char [42]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
        if (ATCA_SUCCESS != (status = kit_phy_receive(iface, reply, &replysize)))
                                                             ^~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
    ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                          ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:734:34: warning: passing 'char [7]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
        status = kit_phy_send(iface, idle, idlesize);
                                     ^~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
    ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                       ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:743:58: warning: passing 'char [38]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
        if (ATCA_SUCCESS != (status = kit_phy_receive(iface, reply, &replysize)))
                                                             ^~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
    ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                          ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:781:34: warning: passing 'char [7]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
        status = kit_phy_send(iface, sleep, sleepsize);
                                     ^~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:129:52: note: passing argument to parameter 'txdata' here
    ATCA_STATUS kit_phy_send(ATCAIface iface, uint8_t* txdata, int txlength)
                                                       ^
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:790:58: warning: passing 'char [38]' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
        if (ATCA_SUCCESS != (status = kit_phy_receive(iface, reply, &replysize)))
                                                             ^~~~~
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/kit_protocol.c:222:55: note: passing argument to parameter 'rxdata' here
    ATCA_STATUS kit_phy_receive(ATCAIface iface, uint8_t* rxdata, int* rxsize)
                                                          ^
    18 warnings generated.
    [ 95%] Building C object CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/third_party/hidapi/mac/hid.c.o
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/third_party/hidapi/mac/hid.c:693:34: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
            entry = IORegistryEntryFromPath(kIOMasterPortDefault, path);
                                            ^~~~~~~~~~~~~~~~~~~~
                                            kIOMainPortDefault
    /Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
    const mach_port_t kIOMasterPortDefault
                      ^
    1 warning generated.
    [ 97%] Building C object CMakeFiles/cryptoauth.dir/hal/hal_all_platforms_kit_hidapi.c.o
    /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/lib/hal/hal_all_platforms_kit_hidapi.c:127:17: warning: result of comparison of constant -1 with expression of type 'uint16_t' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare]
        if (*rxsize == -1)
            ~~~~~~~ ^  ~~
    1 warning generated.
    [ 98%] Building C object CMakeFiles/cryptoauth.dir/hal/hal_linux_uart_userspace.c.o
    [100%] Linking C shared library /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/build/lib.macosx-10.14-arm64-3.8/cryptoauthlib/libcryptoauth.dylib
    ld: warning: pointer not aligned at address 0x2836B (_g_tflxtls_cert_def_4_device + 99 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tflxtls_cert_def_4_device.c.o)
    ld: warning: pointer not aligned at address 0x28361 (_g_tflxtls_cert_def_4_device + 89 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tflxtls_cert_def_4_device.c.o)
    ld: warning: pointer not aligned at address 0x283C3 (_g_tnglora_cert_def_1_signer + 80 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_1_signer.c.o)
    ld: warning: pointer not aligned at address 0x28441 (_g_tnglora_cert_def_2_device + 99 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_2_device.c.o)
    ld: warning: pointer not aligned at address 0x28437 (_g_tnglora_cert_def_2_device + 89 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_2_device.c.o)
    ld: warning: pointer not aligned at address 0x2842E (_g_tnglora_cert_def_2_device + 80 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_2_device.c.o)
    ld: warning: pointer not aligned at address 0x284A2 (_g_tnglora_cert_def_4_device + 89 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_4_device.c.o)
    ld: warning: pointer not aligned at address 0x28499 (_g_tnglora_cert_def_4_device + 80 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tnglora_cert_def_4_device.c.o)
    ld: warning: pointer not aligned at address 0x2850D (_g_tngtls_cert_def_1_signer + 89 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_1_signer.c.o)
    ld: warning: pointer not aligned at address 0x28582 (_g_tngtls_cert_def_2_device + 99 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_2_device.c.o)
    ld: warning: pointer not aligned at address 0x2856F (_g_tngtls_cert_def_2_device + 80 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_2_device.c.o)
    ld: warning: pointer not aligned at address 0x285ED (_g_tngtls_cert_def_3_device + 99 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_3_device.c.o)
    ld: warning: pointer not aligned at address 0x285E3 (_g_tngtls_cert_def_3_device + 89 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_3_device.c.o)
    ld: warning: pointer not aligned at address 0x285DA (_g_tngtls_cert_def_3_device + 80 from CMakeFiles/cryptoauth.dir/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/app/tng/tngtls_cert_def_3_device.c.o)
    ld: unaligned pointer(s) for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/build/lib.macosx-10.14-arm64-3.8/cryptoauthlib/libcryptoauth.dylib] Error 1
    make[1]: *** [CMakeFiles/cryptoauth.dir/all] Error 2
    make: *** [all] Error 2

    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/pronoyc/.platformio/penv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/setup.py'"'"'; __file__='"'"'/private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-install-uxyw9m8o/cryptoauthlib_dadf2d8705064bcea0d3ad74bd64c482/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/j3/csj45mw17tlb2ggw27_3vfc00000gn/T/pip-record-h98f6cna/install-record.txt --single-version-externally-managed --compile --install-headers /Users/pronoyc/.platformio/penv/include/site/python3.8/cryptoauthlib Check the logs for full command output.
CalledProcessError: Command '['/Users/pronoyc/.platformio/penv/bin/python', '-m', 'pip', 'install', '--no-cache-dir', '-r', '/Users/pronoyc/Code/AWSIoT/edukit/Core2-for-AWS-IoT-EduKit/Blinky-Hello-World/utilities/AWS_IoT_registration_helper/requirements.txt']' returned non-zero exit status 1.:
  File "/Users/pronoyc/.platformio/penv/lib/python3.8/site-packages/platformio/builder/main.py", line 189:
    env.SConscript(item, exports="env")
  File "/Users/pronoyc/.platformio/packages/tool-scons/scons-local-4.3.0/SCons/Script/SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/Users/pronoyc/.platformio/packages/tool-scons/scons-local-4.3.0/SCons/Script/SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/Users/pronoyc/Code/AWSIoT/edukit/Core2-for-AWS-IoT-EduKit/Blinky-Hello-World/register_thing.py", line 39:
    install_dependencies()
  File "/Users/pronoyc/Code/AWSIoT/edukit/Core2-for-AWS-IoT-EduKit/Blinky-Hello-World/register_thing.py", line 37:
    subprocess.check_call( [ env.get( 'PYTHONEXE' ), '-m', 'pip', 'install', '--no-cache-dir', '-r',  os.path.join( cwd, 'utilities', 'AWS_IoT_registration_helper', 'requirements.txt') ] )
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364:
    raise CalledProcessError(retcode, cmd)
========================== [FAILED] Took 8.98 seconds ==========================
Environment             Status    Duration
----------------------  --------  ------------
core2foraws-device_reg  FAILED    00:00:08.984
==================== 1 failed, 0 succeeded in 00:00:08.984 ====================

Opened a new freature request with cryptoauthlib project

DarkSector commented 2 years ago

Doesn't build with python 3.7.12 on M1 with rosetta either

rashedtalukder commented 2 years ago

Hi @DarkSector, I think I found a solution to this since I just received my new M1 macbook. You'll need to use the Intel x86 version of VSCode for PlatformIO to work correctly with Rosetta: https://code.visualstudio.com/sha/download?build=stable&os=darwin

After that, I was able to use the command pio run -e core2foraws-device_reg -t register_thing and it worked perfectly. Do note that we update the repository recently to add the PIO extra script with the register_thing target. Make sure to pull the latest code.

DarkSector commented 2 years ago

Great idea! Let me try that

DarkSector commented 2 years ago

Okay that worked. For posterity, here are the steps to get it working with Apple M1 silicon

  1. Install the x86 version of vscode
  2. Install the x86 version of homebrew (you'll need it for packages like openssl, cmake, ffi etc.).
  3. If you're getting errors with arm64 dylibs - uninstall pyopenssl and cryptography from the platformIO environment.
  4. If you use AWS SSO add access keys as environment variables.

Should be able to build it then.

rashedtalukder commented 2 years ago

Thank you for those additional details. We now have ARM M1 AWS EC2 instances to test against so we can document the steps properly for M1 and ensure it works for all users.

Overall, I'm glad that the workaround for now is relatively straightforward. Hopefully we see native ARM M1 support for all dependencies instead of using Rosetta.

DarkSector commented 2 years ago

Is there a possibility of a docker image with all the dependencies baked in? It would be great to just pass the serial port to the container and never have to worry about installation etc.

rashedtalukder commented 2 years ago

Yes, this is something we have been wracking our brains trying to solve and have made multiple trials. However this can cause new complications on Windows due to Docker on Hyper-V.