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

Fix picotool usage #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions pico_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,29 @@ cd $OUTDIR
# Pick up new variables we just defined
source ~/.bashrc

# Picoprobe and picotool
for REPO in picotool picoprobe
will-v-pi marked this conversation as resolved.
Show resolved Hide resolved
do
DEST="$OUTDIR/$REPO"
REPO_URL="${GITHUB_PREFIX}${REPO}${GITHUB_SUFFIX}"
git clone $REPO_URL

# Build both
cd $DEST
git submodule update --init
mkdir build
cd build
cmake ../
make -j$JNUM

if [[ "$REPO" == "picotool" ]]; then
echo "Installing picotool"
sudo make install
fi

cd $OUTDIR
done

# Build blink and hello world for pico and pico2
cd pico-examples
for board in pico pico2
Expand All @@ -96,29 +119,6 @@ done

cd $OUTDIR

# Picoprobe and picotool
for REPO in picoprobe picotool
do
DEST="$OUTDIR/$REPO"
REPO_URL="${GITHUB_PREFIX}${REPO}${GITHUB_SUFFIX}"
git clone $REPO_URL

# Build both
cd $DEST
git submodule update --init
mkdir build
cd build
cmake ../
make -j$JNUM

if [[ "$REPO" == "picotool" ]]; then
echo "Installing picotool to /usr/local/bin/picotool"
sudo cp picotool /usr/local/bin/
fi

cd $OUTDIR
done

if [ -d openocd ]; then
echo "openocd already exists so skipping"
SKIP_OPENOCD=1
Expand Down