From 0bb800fc6cdae3492246b6243db37f42b6bd01cf Mon Sep 17 00:00:00 2001 From: blakejameson <101538853+blakejameson@users.noreply.github.com> Date: Tue, 8 Oct 2024 13:09:42 -0500 Subject: [PATCH] Updated ReadMe to include a Windows specific section, as well as a Common Section for Linux/macOS and Windows (#24) * Updating README to include Windows section for WSL. More edits soon * Updated WSL section for CMake installation to include Linux commands * changed the 'check your environment' section to include Python3.12 note * for consistency with the WSL guide, I changed '.' to 'source' for venv * Reformatted some lines * Update README.md added copy option in markdown for the python command (#23) * Update README.md added copy option in markdown for the python command * Update README.md regarding checking the environment and cloning the repository * Revert "Update README.md added copy option in markdown for the python command (#23)" This reverts commit 93b9343d7f4b3cd92169410e68dc9698d85f62c1. * Noticed curl command was forward 1 too many spaces, lol * Made the 'Building and Running the Deployment' heading one size smaller * Removed empty lines from bottom of file and in line 69 * Added a line after last Windows step to inform to move onto Commons Included the use of more links for different sections in the page --------- Co-authored-by: blakejameson Co-authored-by: Ila Wallace <115182946+ila-w@users.noreply.github.com> --- README.md | 69 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 52 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 03cbd5b..e6d98f4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,41 @@ F´ (F Prime) flight software for the PROVES CubeSat Kit. This version of the PROVES flight software is under development and is not ready to be used with flight hardware. Please see [proveskit/flight_software](https://github.com/proveskit/flight_software/) for our latest flight ready software. -## Building and Running the Deployment +### **Note**: +This guide features setup for both Linux/macOS and Windows (through the use of WSL). There will be a section specific to only [Windows](#windows-specific-section) users, as well as a common section where steps will apply to both groups (Linux/macOS and Windows). + +If you're a Linux/macOS user, you can go straight to the [Common Section](#common-section-linuxmacos-and-windows). If a Windows user, do the [Windows](#windows-specific-section) section then go on to the [Common Section](#common-section-linuxmacos-and-windows) section. + +## Windows Specific Section +### Windows Subsystem for Linux (WSL) Install +If you don’t have Windows Subsystem for Linux (WSL) installed on your computer, install it by opening Windows Powershell and typing +```sh +wsl –install +``` + +After installation, search for an application on your PC called ‘Ubuntu’ and open. A terminal will open, and it may be accompanied with an error message.* + +*If you have an error message, restart your machine. Upon restarting, open the Ubuntu app, and it should now work properly. + +Proceed to enter a username and password. After you set up your profile, you are now able to use WSL. + +A good first step with your new environment is to install new versions of packages available. In your WSL terminal, the folowing command will install new packages for your WSL environment. +```sh +sudo apt update && sudo apt upgrade +``` + +Note: Your default Python3 installation in WSL may not come with 'venv', a package to create Python virtual environments. To install, enter +```sh +sudo apt install python3-venv +``` + +For some of us on WSL, the default download of CMake using apt resulted in build errors, but the latest version was able to allow for succesful builds. We recommend downloading the latest version of CMake. + ```sh + wget -qO- https://github.com/Kitware/CMake/releases/download/v3.30.4/cmake-3.30.4-linux-x86_64.tar.gz | tar xzv && sudo mv cmake-3.30.4-linux-x86_64/bin/* /usr/local/bin && rm -r cmake-3.30.4-linux-x86_64 + ``` +Now, you can proceed to the [Common Section](#common-section-linuxmacos-and-windows) and continue setup. +## Common Section (Linux/macOS and Windows) +### Building and Running the Deployment: Getting started is easy! Please let us know if you run into any issues with the instructions below. @@ -37,31 +71,32 @@ git --version ### Setup dependencies -1. Pull the fprime submodule - ```sh - git submodule update --init --recursive - ``` -2. Create a python venv +1. Pull the fprime submodule + ```sh + git submodule update --init --recursive + ``` +1. Create a python venv ```sh python3 -m venv fprime-venv ``` -3. Activate the venv +1. Activate the venv + ```sh + source fprime-venv/bin/activate + ``` +1. Install required packages ```sh - . fprime-venv/bin/activate + pip install -r fprime/requirements.txt ``` -4. Install required packages +2. Install the arduino-cli ```sh - pip install -r fprime/requirements.txt + curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=$VIRTUAL_ENV/bin sh ``` -5. Install the arduino-cli - ```sh - curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=$VIRTUAL_ENV/bin sh - ``` -6. Install the arduino-cli-wrapper +1. + Install the arduino-cli-wrapper ```sh pip install arduino-cli-cmake-wrapper ``` -7. Install the RP2040 board +2. Install the RP2040 board ```sh arduino-cli config init ``` @@ -71,7 +106,7 @@ git --version ```sh arduino-cli core install rp2040:rp2040@3.9.5 ``` -8. Install additional arduino-cli dependencies: +3. Install additional arduino-cli dependencies: ```sh arduino-cli lib install Time ```