Skip to content

Commit 1a9a53e

Browse files
authored
Fix picotool usage (#43)
Install picotool before building SDK projects Fixes #41 and fixes #42
1 parent 4567073 commit 1a9a53e

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

pico_setup.sh

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,29 @@ cd $OUTDIR
7575
# Pick up new variables we just defined
7676
source ~/.bashrc
7777

78+
# Debugprobe and picotool
79+
for REPO in picotool debugprobe
80+
do
81+
DEST="$OUTDIR/$REPO"
82+
REPO_URL="${GITHUB_PREFIX}${REPO}${GITHUB_SUFFIX}"
83+
git clone $REPO_URL
84+
85+
# Build both
86+
cd $DEST
87+
git submodule update --init
88+
mkdir build
89+
cd build
90+
cmake ../
91+
make -j$JNUM
92+
93+
if [[ "$REPO" == "picotool" ]]; then
94+
echo "Installing picotool"
95+
sudo make install
96+
fi
97+
98+
cd $OUTDIR
99+
done
100+
78101
# Build blink and hello world for pico and pico2
79102
cd pico-examples
80103
for board in pico pico2
@@ -96,29 +119,6 @@ done
96119

97120
cd $OUTDIR
98121

99-
# Debugprobe and picotool
100-
for REPO in debugprobe picotool
101-
do
102-
DEST="$OUTDIR/$REPO"
103-
REPO_URL="${GITHUB_PREFIX}${REPO}${GITHUB_SUFFIX}"
104-
git clone $REPO_URL
105-
106-
# Build both
107-
cd $DEST
108-
git submodule update --init
109-
mkdir build
110-
cd build
111-
cmake ../
112-
make -j$JNUM
113-
114-
if [[ "$REPO" == "picotool" ]]; then
115-
echo "Installing picotool to /usr/local/bin/picotool"
116-
sudo cp picotool /usr/local/bin/
117-
fi
118-
119-
cd $OUTDIR
120-
done
121-
122122
if [ -d openocd ]; then
123123
echo "openocd already exists so skipping"
124124
SKIP_OPENOCD=1

0 commit comments

Comments
 (0)