Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better method for python3 compatibility #80

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

angyongen
Copy link

@angyongen angyongen commented Aug 6, 2021

https://docs.python.org/2.7/library/subprocess.html#subprocess.Popen.communicate
https://docs.python.org/3.8/library/subprocess.html#subprocess.Popen.communicate
The universal_newlines argument is equivalent to text and is provided for backwards compatibility. By default, file objects are opened in binary mode.

This fixes the TypeError: can only concatenate str (not "bytes") to str
(for error_string = cmd[0] + '\r' + err)
and also the TypeError: write() argument must be str, not bytes
(for fsym.write(out))

https://docs.python.org/2.7/library/subprocess.html#subprocess.Popen.communicate
The universal_newlines argument is equivalent to text and is provided for backwards compatibility. By default, file objects are opened in binary mode.
@angyongen
Copy link
Author

angyongen commented Aug 6, 2021

realised that the previous error can be solved by copying files using platforms.local.txt hooks
recipe.hooks.core.prebuild.01.pattern.windows=cmd /c copy /y {build.source.path}\*.s {build.path}\sketch\
see issue #78

Arduino doesn't seem to be copying the .s files from the sketch directory to the temp directory. This causes the following errors:
`undefined reference to 'ulp_count'` 
`undefined reference to 'ulp_entry'`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants