diff --git a/pico_setup.sh b/pico_setup.sh index 1e58f9f..f630a7d 100755 --- a/pico_setup.sh +++ b/pico_setup.sh @@ -75,6 +75,29 @@ cd $OUTDIR # Pick up new variables we just defined source ~/.bashrc +# Debugprobe and picotool +for REPO in picotool debugprobe +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 @@ -96,29 +119,6 @@ done cd $OUTDIR -# Debugprobe and picotool -for REPO in debugprobe 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