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
653eade8
Commit
653eade8
authored
Sep 28, 2021
by
Stefan Hackenberg
Browse files
Add fastbuild option
parent
6f59f10f
Changes
2
Hide whitespace changes
Inline
Side-by-side
builder/frameworks/mbed.py
View file @
653eade8
...
...
@@ -28,6 +28,7 @@ http://mbed.org/
import
os
from
SCons.Script
import
Import
,
SConscript
import
os
Import
(
"env"
)
...
...
@@ -66,7 +67,27 @@ def applymbedignore():
applymbedignore
()
oldbuild
=
env
.
BuildSources
def
fastbuild
(
variant_dir
,
src_dir
,
src_filter
=
None
):
env
.
Append
(
LINKOBJS
=
[
env
.
subst
(
f
'$PROJECT_DIR/mbedos/
{
f
}
'
)
for
f
in
os
.
listdir
(
env
.
subst
(
'$PROJECT_DIR/mbedos'
))
if
f
.
endswith
(
'.o'
)
]
)
if
env
.
GetBuildType
()
==
'release'
and
os
.
path
.
exists
(
env
.
subst
(
'$PROJECT_DIR/mbedos'
)):
env
.
Replace
(
LINKCOM
=
"${TEMPFILE('$LINK -o $TARGET $LINKFLAGS $__RPATH $LINKOBJS $SOURCES $_LIBDIRFLAGS $_LIBFLAGS','$LINKCOMSTR')}"
)
env
.
BuildSources
=
fastbuild
# https://github.com/platformio/builder-framework-mbed.git
SConscript
(
os
.
path
.
join
(
env
.
PioPlatform
().
get_package_dir
(
"framework-mbed"
),
"platformio"
,
"platformio-build.py"
))
env
.
BuildSources
=
oldbuild
builder/main.py
View file @
653eade8
...
...
@@ -134,3 +134,13 @@ AlwaysBuild(env.Alias('upload', target_elf, upload_actions))
#
Default
([
target_buildprog
,
target_size
])
#
# Custom targets
#
env
.
AddCustomTarget
(
'Unpack Mbed OS'
,
None
,
'cd mbedos; $AR x mbedos.lib'
,
)
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