xobs / platformio-ltc

Platformio platform for Love-to-Code
MIT License
0 stars 1 forks source link

crash upon platformio install #2

Open pelikhan opened 7 years ago

pelikhan commented 7 years ago
C:\gh\pxt-chibitronics [master ≡]> pio platform install https://github.com/xobs/platformio-ltc
PlatformManager: Installing platformio-ltc
git version 2.11.0.windows.3
Cloning into 'C:\Users\jhalleux\.platformio\platforms\_tmp_installing-g2fwy4-package'...
remote: Counting objects: 12, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 12 (delta 0), reused 8 (delta 0), pack-reused 0
Unpacking objects: 100% (12/12), done.
ltc @ 016591f has been successfully installed!
Error: Traceback (most recent call last):
  File "C:\yotta\python\lib\site-packages\platformio\__main__.py", line 106, in main
    cli(None, None, None)
  File "C:\yotta\python\lib\site-packages\click\core.py", line 700, in __call__
    return self.main(*args, **kwargs)
  File "C:\yotta\python\lib\site-packages\click\core.py", line 680, in main
    rv = self.invoke(ctx)
  File "C:\yotta\python\lib\site-packages\click\core.py", line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\yotta\python\lib\site-packages\click\core.py", line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\yotta\python\lib\site-packages\click\core.py", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\yotta\python\lib\site-packages\click\core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "C:\yotta\python\lib\site-packages\platformio\commands\platform.py", line 301, in platform_install
    skip_default_package=skip_default_package):
  File "C:\yotta\python\lib\site-packages\platformio\managers\platform.py", line 69, in install
    p = PlatformFactory.newPlatform(platform_dir)
  File "C:\yotta\python\lib\site-packages\platformio\managers\platform.py", line 226, in newPlatform
    _instance = platform_cls(join(platform_dir, "platform.json"))
  File "C:\yotta\python\lib\site-packages\platformio\managers\platform.py", line 427, in __init__
    self.engines['platformio']):
  File "C:\yotta\python\lib\site-packages\semantic_version\base.py", line 532, in __contains__
    return self.match(version)
  File "C:\yotta\python\lib\site-packages\semantic_version\base.py", line 515, in match
    return all(spec.match(version) for spec in self.specs)
  File "C:\yotta\python\lib\site-packages\semantic_version\base.py", line 515, in <genexpr>
    return all(spec.match(version) for spec in self.specs)
  File "C:\yotta\python\lib\site-packages\semantic_version\base.py", line 478, in match
    return self.spec <= version < self.spec.next_minor()
  File "C:\yotta\python\lib\site-packages\semantic_version\base.py", line 104, in next_minor
    '.'.join(str(x) for x in [self.major, self.minor + 1, 0]))
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

============================================================

An unexpected error occurred. Further steps:

* Verify that you have the latest version of PlatformIO using
  `pip install -U platformio` command

* Try to find answer in FAQ Troubleshooting section
  http://docs.platformio.org/page/faq.html

* Report this problem to the developers
  https://github.com/platformio/platformio-core/issues

============================================================
xobs commented 7 years ago

Is this due to Platformio not supporting tilde ranges, which were fixed by @mmoskal in f5d582c5a4637a38f94d2f41189279ebd8ba4c81?

pelikhan commented 7 years ago

Probably related.

pelikhan commented 7 years ago

Going further but still issues which might be pio specific.

]> pio platforms install https://github.com/xobs/platformio-ltc/
PlatformManager: Installing platformio-ltc
git version 2.11.0.windows.3
Cloning into '...\.platformio\platforms\_tmp_installing-r8muz9-package'...
remote: Counting objects: 12, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 12 (delta 0), reused 9 (delta 0), pack-reused 0
Unpacking objects: 100% (12/12), done.
ltc @ f8ded35 has been successfully installed!
PackageManager: Installing framework-ltc @ ^1.0.0
Downloading...
Unpacking  [####################################]  100%
framework-ltc @ 1.0.0 has been successfully installed!
PackageManager: Installing toolchain-gccarmnoneeabi @ >=1.40803.0,<1.40805.0
toolchain-gccarmnoneeabi @ 1.40804.0 is already installed
Error: Traceback (most recent call last):
  File "C:\yotta\python\lib\site-packages\platformio\__main__.py", line 106, in main
    cli(None, None, None)
  File "C:\yotta\python\lib\site-packages\click\core.py", line 700, in __call__
    return self.main(*args, **kwargs)
  File "C:\yotta\python\lib\site-packages\click\core.py", line 680, in main
    rv = self.invoke(ctx)
  File "C:\yotta\python\lib\site-packages\click\core.py", line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\yotta\python\lib\site-packages\click\core.py", line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\yotta\python\lib\site-packages\click\core.py", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\yotta\python\lib\site-packages\click\core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "C:\yotta\python\lib\site-packages\platformio\commands\platform.py", line 301, in platform_install
    skip_default_package=skip_default_package):
  File "C:\yotta\python\lib\site-packages\platformio\managers\platform.py", line 80, in install
    self.cleanup_packages(p.packages.keys())
  File "C:\yotta\python\lib\site-packages\platformio\managers\platform.py", line 137, in cleanup_packages
    p = PlatformFactory.newPlatform(manifest['__pkg_dir'])
  File "C:\yotta\python\lib\site-packages\platformio\managers\platform.py", line 226, in newPlatform
    _instance = platform_cls(join(platform_dir, "platform.json"))
  File "C:\yotta\python\lib\site-packages\platformio\managers\platform.py", line 427, in __init__
    self.engines['platformio']):
  File "C:\yotta\python\lib\site-packages\semantic_version\base.py", line 532, in __contains__
    return self.match(version)
  File "C:\yotta\python\lib\site-packages\semantic_version\base.py", line 515, in match
    return all(spec.match(version) for spec in self.specs)
  File "C:\yotta\python\lib\site-packages\semantic_version\base.py", line 515, in <genexpr>
    return all(spec.match(version) for spec in self.specs)
  File "C:\yotta\python\lib\site-packages\semantic_version\base.py", line 478, in match
    return self.spec <= version < self.spec.next_minor()
  File "C:\yotta\python\lib\site-packages\semantic_version\base.py", line 104, in next_minor
    '.'.join(str(x) for x in [self.major, self.minor + 1, 0]))
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

============================================================

An unexpected error occurred. Further steps:

* Verify that you have the latest version of PlatformIO using
  `pip install -U platformio` command

* Try to find answer in FAQ Troubleshooting section
  http://docs.platformio.org/page/faq.html

* Report this problem to the developers
  https://github.com/platformio/platformio-core/issues

============================================================
pelikhan commented 7 years ago

It does try to build locally so I can make progress here.

xobs commented 7 years ago

In order to get it building, I needed to remove ~/.platformio/platforms/ltc/ which had the older symver value.

I've posted a repo that should give you a blob you can link against, as long as you provide a functionsAndBytecode symbol.

Do you have a good way of debugging this binary?

mmoskal commented 7 years ago

You should be able to use hardware debugger (eg IBDAP), openocd and gdb. Point it to the elf binary but deploy pxt generated code. You cannot source debug pxt code but you can the C++

xobs commented 7 years ago

The problem is that the build is failing, so there is no elf binary to feed to a debugger.

mmoskal commented 7 years ago

Oh. Then this is advice for later :))