Skip to content

Instantly share code, notes, and snippets.

@alex5250
Last active June 25, 2024 16:00
Show Gist options
  • Save alex5250/4d2ce9c5ad0586c46d6b1fde32d27ac0 to your computer and use it in GitHub Desktop.
Save alex5250/4d2ce9c5ad0586c46d6b1fde32d27ac0 to your computer and use it in GitHub Desktop.
Installing an rp2040 command to linux.
#!/bin/bash
# Define colors
RED="\033[0;31m"
GREEN="\033[0;32m"
YELLOW="\033[0;33m"
BLUE="\033[0;34m"
MAGENTA="\033[0;35m"
CYAN="\033[0;36m"
WHITE="\033[0;37m"
RESET="\033[0m"
# Print the logo
echo -e "${RED}██████${GREEN}╗${RESET} ██████${BLUE}╗ ${MAGENTA}███████${YELLOW}╗${RESET}"
echo -e "${RED}██${GREEN}╔══${RED}██${BLUE}╗${RESET}██${MAGENTA}╔════╝${YELLOW}██${RESET}╔════╝"
echo -e "${RED}██████${GREEN}╔╝${RESET}██${MAGENTA}║${YELLOW} ${RESET} █████╗ "
echo -e "${RED}██${GREEN}╔═══╝ ${RESET}██${MAGENTA}║${YELLOW} ${RESET} ██${RED}╔══╝ "
echo -e "${RED}██${GREEN}║ ${RESET}╚${MAGENTA}██████${YELLOW}╗${RESET}╚${RED}██████${GREEN}╗${RESET}"
echo -e "${RED}╚═╝ ╚═════╝ ╚═════╝${RESET}"
echo -e "${CYAN}RP2040 SDK${RESET}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export PICO_SDK_PATH=$SCRIPT_DIR
echo "Current directory has been added to PICO_SDK_PATH"
echo "PICO_SDK_PATH: $PICO_SDK_PATH"
@alex5250
Copy link
Author

alex5250 commented Jun 25, 2024

Copy it to pico-sdk folder and then on .bashrc or whatever you use append:

alias get_rp2040=". /home/alex/rp2040/pico-sdk/configure.sh"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment