Skip to content

How to set up a development environment

J.SH edited this page Jul 6, 2022 · 8 revisions

This guide will teach you how to set up the development environment on Quartz.
This assumes you are using VSCode as your editor.

Prerequisites

  1. Install devkitPro for your respective platform.
  2. Install switch-dev package using devkitPro-pacman on Unix platforms or select Switch in the windows installer.

Setup

Install these extensions

Clangd

Clangd 14 has a known issue when recognizing headers, you could use an older version of clang or download the snapshot release.
If using the snapshot build change the clangd.path option in VSCode JSON settings to point toward the clangd binary.

Configuring clangd properly

  1. Open the command palette (CTRL+SHIFT+P)
  2. Open clangd: Open user configuration file
  3. Paste
---

If:
  PathMatch: /opt/devkitpro/.* # Change this to the devkitPro path if you are on windows

CompileFlags:
  Add: [-D__DEVKITA64__]
  Remove: [-mtp=*]

Active Kit

Change the cmake active kit to devkitPro

Write code

Everything else is taken care of by the toolchain file and the configurations in .vscode.

Clone this wiki locally