Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Peter Hüwe
platformio-cypress_psco6
Commits
6f59f10f
Commit
6f59f10f
authored
Sep 28, 2021
by
Hackenberg Stefan (IFAG DSS TI SWP NTV)
Browse files
Add fix for framework-mbed and python3.9
parent
6e0851e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
builder/frameworks/mbed.py
View file @
6f59f10f
...
...
@@ -25,13 +25,37 @@ the mbed Developer Community.
http://mbed.org/
"""
from
os.path
import
join
import
os
from
SCons.Script
import
Import
,
SConscript
Import
(
"env"
)
def
fixi
():
"""Fix intelhex compat issue in framework-mbed 5 with python3.9"""
compat
=
os
.
path
.
join
(
env
.
PioPlatform
().
get_package_dir
(
"framework-mbed"
),
'platformio'
,
'package_deps'
,
'py3'
,
'intelhex'
,
'compat.py'
)
with
open
(
compat
)
as
fp
:
content
=
fp
.
read
()
if
'array_tobytes = getattr(array.array, "tobytes", array.array.tostring)'
in
content
:
content
=
content
.
replace
(
'array_tobytes = getattr(array.array, "tobytes", array.array.tostring)'
,
'array_tobytes = getattr(array.array, "tobytes", array.array.tobytes)'
,
)
with
open
(
compat
,
'w'
)
as
fp
:
fp
.
write
(
content
)
fixi
()
def
applymbedignore
():
import
mbedignore
mbedignorefile
=
env
.
subst
(
'$PROJECT_DIR/.mbedignore'
)
...
...
@@ -40,7 +64,9 @@ def applymbedignore():
applymbedignore
()
# https://github.com/platformio/builder-framework-mbed.git
SConscript
(
join
(
env
.
PioPlatform
().
get_package_dir
(
"framework-mbed"
),
"platformio"
,
os
.
path
.
join
(
env
.
PioPlatform
().
get_package_dir
(
"framework-mbed"
),
"platformio"
,
"platformio-build.py"
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment