Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tutorial:toolchain_setup [2020/10/15 13:02] iridescence created |
tutorial:toolchain_setup [2022/09/26 23:12] (current) iridescence |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Choosing A Toolchain ====== | ====== Choosing A Toolchain ====== | ||
- | There are currently 3 toolchains for PSP development in C/C++, Rust, and Zig. Each one is slightly different, and has a different process to set up. Below are instructions for each, and on popular platforms. | + | There are currently 3 toolchains for PSP development in C/C++, Rust, and Zig. Each one is slightly different, and has a different process to set up. Below are instructions for each, and on popular platforms. |
===== C/C++ ===== | ===== C/C++ ===== | ||
Line 16: | Line 16: | ||
You'll want to make sure you've installed developer tools including git. | You'll want to make sure you've installed developer tools including git. | ||
- | To get the toolchain, you will need to run < | + | To get the toolchain, you will need to run < |
- | If you' | + | If you use Linux, use the prepare script according to your distro. For example, |
If you're on Mac OS, you'll need Ports or Homebrew to develop. After that, you can use the ./ | If you're on Mac OS, you'll need Ports or Homebrew to develop. After that, you can use the ./ | ||
Line 27: | Line 27: | ||
| | ||
- | Once that's done you'll need to initiate compilation with: < | + | To setup your working directory: |
+ | < | ||
+ | export PSPDEV=/usr/ | ||
+ | sudo mkdir -p $PSPDEV | ||
+ | sudo chown -R $USER: $PSPDEV | ||
+ | </ | ||
- | After installation, | + | And in your login script: |
+ | < | ||
+ | export PSPDEV=/ | ||
+ | export PATH=$PATH: | ||
+ | </ | ||
+ | |||
+ | Once that's done you'll need to initiate compilation with: < | ||
+ | |||
+ | After installation, | ||
Congratulations! You now have a working installation! | Congratulations! You now have a working installation! | ||
Line 35: | Line 48: | ||
===== Rust ===== | ===== Rust ===== | ||
- | To install Rust on your computer, you'll need to head to the official Rust installer, [[https:// | + | To install Rust on your computer, you'll need to head to the official Rust installer, |
Follow the instructions and install Rust. If you're on Windows, you'll need [[https:// | Follow the instructions and install Rust. If you're on Windows, you'll need [[https:// | ||
- | After you've finished that, you'll need to hop into your favorite terminal (or refresh your terminal instance) and set your toolchain to nightly and add the Rust-SRC component. Then, we'll install | + | After you've finished that, you'll need to hop into your favorite terminal (or refresh your terminal instance) and set your toolchain to nightly and add the '' |
< | < | ||
rustup default nightly | rustup default nightly | ||
Line 44: | Line 57: | ||
cargo install cargo-psp | cargo install cargo-psp | ||
</ | </ | ||
+ | This will set your default Rust toolchain to be '' | ||
+ | < | ||
+ | cargo new my-psp-app | ||
+ | cd my-psp-app | ||
+ | rustup override set nightly | ||
+ | </ | ||
+ | |||
+ | Finally, add the '' | ||
Now you've got a working PSP Toolchain in Rust! | Now you've got a working PSP Toolchain in Rust! | ||
Line 49: | Line 70: | ||
===== Zig ===== | ===== Zig ===== | ||
- | For working with Zig-PSP, all you need is the latest version | + | For working with Zig-PSP, all you need is the v0.8.1 |
Once you've installed Zig, and it is in your path (see above), make sure you also have git installed for general repository work. You'll need to make a copy of the GitHub template with the following command: | Once you've installed Zig, and it is in your path (see above), make sure you also have git installed for general repository work. You'll need to make a copy of the GitHub template with the following command: |