CO Lab Manual
Course Page
  • Course Information
    • Welcome
    • Introduction
    • Your Contributions
    • Lab Sessions and Etiquette
    • Team Setup
    • Assumed Prior Knowledge
  • Setup Guides
    • GitHub Repository Setup
    • Technical Setup
      • Windows
      • Linux
      • macOS
    • GitHub SSH Setup
    • Framework Setup
  • Reference Documentation
    • Introduction to the Documentation
    • A Brief History Lesson
    • Syntax (Intel vs. AT&T)
      • Section Exercises
    • Memory
      • Memory Management
      • Section Exercises
    • Registers
      • Section Exercises
    • Instructions
    • Subroutines
      • Calling Subroutines
      • Writing Subroutines
      • Section Exercises
    • Input/Output
      • Printing to the Terminal
      • Reading from the Terminal
      • Section Exercises
    • Programming Constructs
    • Assembler Directives
    • C/C++ vs Assembly
    • Building and Running Programs
    • Address Sanitization
    • A0: A Running Example
  • Assignments
    • Introduction to the Assignments
    • Mandatory Assignments
      • A1: Subroutines and I/O
      • A2: Recursion
    • Extra Assignments
      • A3-a: Fibonacci Calculator
      • A3-b: Fibonacci REPL
      • A4: Diff
      • A5: Printf
      • A6: HPC
      • A7: Bitmap
      • A8: Game
  • Appendix
    • Acknowledgments
    • Rules and Regulations
    • Frequently Asked Questions
    • How to use a Debugger
Powered by GitBook
On this page
  • Step 1: Install VS Code
  • Step 2: Install the Command Line Tools
  • Step 3: Install Homebrew
  • Step 4: Install CMake
  • Step 5: Install Rosetta 2 (Only on Apple Silicon)
  • Step 6: Install Docker (Only on Apple Silicon)
  • Step 7: Set up SSH with GitHub
  1. Setup Guides
  2. Technical Setup

macOS

PreviousLinuxNextGitHub SSH Setup

Last updated 4 months ago

macOS has its roots in FreeBSD and with that in the "original" Unix distributed by Bell Labs in the 1960s. All macOS releases since Mac OS X Leopard (except OS X Lion) have been UNIX certified. With that, macOS gives an environment that offers everything needed for the assignments.

This setup guide is universal for both Apple Silicon (M1/M2/...) and Intel Macs. The steps that must be ignored on Intel Macs are marked with (Only on Apple Silicon).


Step 1: Install VS Code

Download (VS Code) for macOS and move the application to your "Applications" folder (depending on your browser you may need to unzip the downloaded archive first).

Now, to also enable the code command for your terminal, follow these steps:

  1. Open VS Code and press ⌘⇧P to open the Command Pallete.

  2. In the prompt, enter "install code" and select the option named: "Shell Command: Install 'code' command in PATH".

  3. Confirm the prompt that will pop up and enter your password to finish the installation.


Step 2: Install the Command Line Tools

Open a Terminal window and enter:

xcode-select --install

If the command line tools are not yet installed, a window should pop up with a prompt to do so. Follow all the steps of the installer, it may take a few minutes to download and install all the tools needed.


Step 3: Install Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Enter your password and press the Enter key when prompted. The command takes around 2 minutes to run.


Step 4: Install CMake

Open a Terminal window and enter:

brew install cmake

Step 5: Install Rosetta 2 (Only on Apple Silicon)

Open a Terminal window and enter:

softwareupdate --install-rosetta

When prompted, type 'A' and press enter to install.


Step 6: Install Docker (Only on Apple Silicon)


Step 7: Set up SSH with GitHub

is a convininet package manager for macOS. We will use this program for the next step. Open a Terminal window and enter:

Navigate to the page and download the version corresponding to your architecture. Double click on the donwloaded .dmg file and drag-and-drop the application.

Once installed, open Docker Desktop and navigate to Settings . In the general section, ensure the following settings are enabled:

The framework provides a script that will run Docker for you, so you do not have to worry about understanding the internal procedures. Docker will be used to contain your executables to test for memory errors. Learn more in the section.

One of the easiest ways to access your GitHub account (and with that your private repository) is to set up a Secure Shell (SSH) key. Follow the for this.

Visual Studio Code
Homebrew
Docker Desktop
address sanitization
GitHub SSH Setup Guide