Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Install cmake with brew install cmake in the terminal.

  2. Download the GNU ARM toolchain from ARM's website (get the Mac OS 64 Bit version), and extract it to your downloads folder.

  3. For the GNU ARM toolchain to run on most newer OS X versions, you will likely need to disable Gatekeeper systemwide: sudo spctl --master-disable

  4. Using the terminal, copy the entire folder to /usr/local on your machine by running this command: sudo cp -r ~/Downloads/gcc-armXXXX /usr/local/gcc-arm (replace "gcc-armXXXX" with the full name of the folder you extracted).

  5. Now we need to add the toolchain to your PATH. Navigate to your home directory by typing cd ~. Then, create a bash profile if you don't already have one by typing vim .bash_profile

    • If you use zsh, use .zshrc instead of .bash_profile in these steps

  6. Add the following line to the end of your .bash_profile file: export PATH=/usr/local/gcc-arm/bin:$PATH

  7. Save the file by hitting the escape key followed by ":wq"

  8. Restart all terminal windows or run source ~/.bash_profile in all open terminal windows.

  9. Next, make sure Pip is installed to your system python. In a terminal, run sudo -H python3 -m easy_install pip

  10. Now, install the needed packages for the build system: sudo -H python3 -m pip install intelhex prettytable

  11. Build and run the code

  12. If you get an error:

    • Look for error: -- Found Python3: [your python path] so you can see what python it’s using

    • Run: [python path] -m pip install intelhex prettytable

 

Linux

 

  1. Install CMake >= 3.12.

    • If your distro doesn't have a version this recent, you may have to build it from source.

    • For Ubuntu 14.04 and 16.04, use this PPA.

    • Many distros can also utilize the CMake snap package.

  2. Download the GNU ARM toolchain from ARM's website (get the Linux x86_64 Tarball) and extract it to your downloads folder.

  3. Using the terminal, copy the entire folder to /usr/local on your machine by running this command: sudo cp -r ~/Downloads/gcc-armXXXX /usr/local/gcc-arm (replace "gcc-armXXXX" with the full name of the folder you extracted).

  4. Navigate to your home directory by typing cd ~. Then, create a bash profile if you don't already have one by typing vim .bash_profile

    • If you use zsh, use .zshrc instead of .bash_profile in these steps

  5. Add the following line to your .bash_profile file: export PATH=/usr/local/gcc-arm/bin:$PATH

  6. Save the file by hitting escape followed by ":wq"

  7. Restart all terminal windows or run source ~/.bash_profile in all open terminal windows.

  8. Next, make sure Pip is installed to your system python. This depends on your specific distro, but on Ubuntu you should be able to run sudo apt-get install python3-pip python3-setuptools python3-wheel.

  9. Now, install the needed packages for the build system: sudo -H python3 -m pip install intelhex prettytable

...