Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 163b825

Browse files
committed
mbed-os-to-arduino: add -g flag to restore gdb debug info
1 parent 0b317c9 commit 163b825

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

‎mbed-os-to-arduino‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ apply_patches () {
112112
cd -
113113
fi
114114
echo " done."
115+
if [ "$RESTORE_GDB_INFO" -eq 1 ]; then
116+
echo "Restoring gdb info (this increases libmbed binary size, not suitable for release)"
117+
cd mbed-os
118+
git checkout tools/profiles/develop.json
119+
cd -
120+
fi
115121
fi
116122
}
117123

@@ -277,11 +283,12 @@ patch_spi_h () {
277283
# MAIN LOOP #
278284
#############
279285

280-
while getopts "cuar:b:p:" opt; do
286+
while getopts "cuagr:b:p:" opt; do
281287
case $opt in
282288
c ) export MBED_CLEAN=1 ;;
283289
u ) export MBED_UPDATE=1 ;;
284290
a ) export APPLY_PATCHES=1 ;;
291+
g ) export RESTORE_GDB_INFO=1 ;;
285292
r ) export LOCAL_REPO="$OPTARG" ;;
286293
b ) export REMOTE_BRANCH="$OPTARG" ;;
287294
p )
@@ -329,13 +336,15 @@ export MBED_CORE_LOCATION=${MBED_CORE_LOCATION:-$PWD}
329336
export MBED_CLEAN=${MBED_CLEAN:-0}
330337
export MBED_UPDATE=${MBED_UPDATE:-0}
331338
export APPLY_PATCHES=${APPLY_PATCHES:-0}
339+
export RESTORE_GDB_INFO=${RESTORE_GDB_INFO:-0}
332340
export LOCAL_REPO=${LOCAL_REPO:-""}
333341
export REMOTE_BRANCH=${REMOTE_BRANCH:-""}
334342

335343
echo
336344
echo MBED_CLEAN=$MBED_CLEAN
337345
echo MBED_UPDATE=$MBED_UPDATE
338346
echo APPLY_PATCHES=$APPLY_PATCHES
347+
echo RESTORE_GDB_INFO=$RESTORE_GDB_INFO
339348
echo LOCAL_REPO="$LOCAL_REPO"
340349
echo REMOTE_BRANCH="$REMOTE_BRANCH"
341350
echo MBED_CORE_LOCATION="$MBED_CORE_LOCATION"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /