From d695dce1a7ea28433db8e893025d1ec66fb077b2 Mon Sep 17 00:00:00 2001 From: Dawsyn Schraiber <32221234+dawsynth@users.noreply.github.com> Date: Sun, 12 Nov 2023 01:06:57 -0500 Subject: Header styles and file naming conventions; CMake ARM Linux musl Compiler Co-authored-by: Gregory Wainer --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index eb36387..18ec6bc 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,63 @@ # Active Drag System (ADS) -This is the main codebase for Rocketry at Virginia Tech's Active Drag System, also known coloquially as the ADS, for the 2023-2024 competition year. It runs primarily on a BeagleBone Black, and its goal is to autonomously control the ADS' deployment during flight. +This is the main codebase for Rocketry at Virginia Tech's Active Drag System, also known colloquially as the ADS, for the 2023-2024 competition year. It runs primarily on a BeagleBone Black, and its goal is to autonomously control the ADS' deployment during flight. ## BUILD +```shell +vagrant up +vagrant ssh +cmake /vagrant +cmake --build . +``` + +## BUILD Alternative (Windows) +Enable WSL2 in windows +Install Ubuntu 22 LTS from Windows Store +```shell +sudo apt update && upgrade +sudo apt install build-essential cmake valgrind crossbuild-essential-armhf +sudo apt install musl musl-tools +``` +Then to actually build: +```shell cmake -B build cmake --build build/ +``` + +## BUILD Alternative (Mac) +```shell +brew install arm-linux-gnueabihf-binutils +# This installs just the arm library, you can remove x86_64 if you want those too +brew install FiloSottile/musl-cross/musl-cross --without-x86_64 --with-arm-hf +``` +To check if installed correctly run: +```shell +ls /opt/homebrew/bin | grep "musl" +``` +you should see: +```shell +arm-linux-musleabihf-gcc +arm-linux-musleabihf-g++ +``` ## RUN -cd build && src/ads +```shell +scp -r src/ads debian@beaglebone.local:~/ +ssh debian@beaglebone.local +./ads +``` ## TEST -cd build && ctest +```shell +scp -r test/test_ads debian@beaglebone.local:~/ +ssh debian@beaglebone.local +./test_ads +``` + +## GPIO Pins +The GPIO number is calculated by taking the GPIO chip +number, multiplying it by 32, and then adding the offset. For example, +GPIO1_12 = (1 × 32) + 12 = GPIO 44. +```shell +/sys/class/gpio/gpio44 = GPIO1_12 +``` \ No newline at end of file -- cgit v1.2.3