platformio / builder-framework-mbed

ARM mbed build script for PlatformIO Build System
http://platformio.org/frameworks/mbed
Apache License 2.0
4 stars 17 forks source link

Intelhex version outdated #28

Closed Python380 closed 2 years ago

Python380 commented 2 years ago

On python 3.9.6, building AND creating projects using mbed failed on my laptop.

I have looked at the error messages and looked at the code, and I have a suggested fix: change install_python_deps.py, line 35, from "intelhex>=1.3,<=2.3.0", to "intelhex==2.3.0",

valeros commented 2 years ago

Hi @Python380 ! Could you specify here what was the error message exactly? I tried Python 3.9.6 and everything worked as expected.

Python380 commented 2 years ago

I was getting an AttributeError. This is due to versions before 2.3.0 running array_tobytes = getattr(array.array, "tobytes", array.array.tostring. The reason this fails is because (probably quite obviously) array.array.tostring() does not exist (At least in the latest few versions of python).

Another reason mbed may have failed is because it didn't auto install latest allowed for some reason. (sorry for replying so late, I live in the western US)

EDIT I should point out that this is in compat.py EDIT and the original issue (Before I realized this was an mbed issue): https://github.com/platformio/platformio-home/issues/4360

Python380 commented 2 years ago

Opened pull request

valeros commented 2 years ago

It seems a similar issue was already discussed some time ago here https://github.com/platformio/builder-framework-mbed/issues/22. You sure you're using the latest mbed package, right?

Python380 commented 2 years ago

I'm not entirely sure, how do I check? Sounds like the same problem though.

Python380 commented 2 years ago

Using 5.51105.190312 according to the package.json.

Python380 commented 2 years ago

So can you provide instructions on how to update?

ivankravets commented 2 years ago

What is your platformio.ini?

Python380 commented 2 years ago

Platform.ini:

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:nrf51822_y5_mbug]
platform = nordicnrf51
board = nrf51822_y5_mbug
framework = mbed
valeros commented 2 years ago

@Python380 I've updated the mbed package with fixes for legacy platforms. Try to pull the latest changes by running the pio platform update nordicnrf51 command in the IDE terminal and compile your project.

Python380 commented 2 years ago

nrf51 is not supported by mbed anymore, but the nrf51822_y5_mbug and nrf51822_mkit boards completely disappeared from the PlatformIO boards list...

ivankravets commented 2 years ago

Please check release details https://github.com/platformio/platform-nordicnrf51/releases

Python380 commented 2 years ago

I see. Thank you!