Skip to content

Instantly share code, notes, and snippets.

@joshenders
Last active April 1, 2025 14:05
Show Gist options
  • Save joshenders/4e43259eb641ce2342dea9416154c2c1 to your computer and use it in GitHub Desktop.
Save joshenders/4e43259eb641ce2342dea9416154c2c1 to your computer and use it in GitHub Desktop.

Revisions

  1. joshenders renamed this gist Nov 24, 2023. 1 changed file with 0 additions and 4 deletions.
    4 changes: 0 additions & 4 deletions catalina_devkitpro_setup.md → devkitpro_setup_macos.md
    Original file line number Diff line number Diff line change
    @@ -72,10 +72,6 @@ You should now have a file in the current directory called `example.nro`.

    ![example](https://i.imgur.com/xPsvWfR.jpg)

    ## Acknowledgements

    Huge thanks to <https://devkitpro.org> for making this process so easy. Follow them on [Twitter](https://twitter.com/devkitpro) and support them on [Patreon](http://patreon.com/devkitPro)

    ## License

    This work is licensed under CC BY-NC version 4.0 <https://creativecommons.org/licenses/by-nc/4.0/> © 2020, Josh Enders. Some Rights Reserved.
  2. joshenders revised this gist Nov 23, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion catalina_devkitpro_setup.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ xcode-select --install

    ## Install the devkitpro Package Manager

    1. Download the latest [devkitpro-macpman-installer.pkg](https://github.com/devkitPro/pacman/releases/latest) from the GitHub releases page.
    1. Download the latest [devkitpro-pacman-installer.pkg](https://github.com/devkitPro/pacman/releases/latest) from the GitHub releases page.
    2. Install it with:

    ```sh
  3. joshenders revised this gist Nov 23, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion catalina_devkitpro_setup.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ xcode-select --install

    ## Install the devkitpro Package Manager

    1. Download the latest [dekitpro-macpman-installer.pkg](https://github.com/devkitPro/pacman/releases/latest) from the GitHub releases page.
    1. Download the latest [devkitpro-macpman-installer.pkg](https://github.com/devkitPro/pacman/releases/latest) from the GitHub releases page.
    2. Install it with:

    ```sh
  4. joshenders revised this gist Nov 23, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion catalina_devkitpro_setup.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ xcode-select --install

    ## Install the devkitpro Package Manager

    1. Download the latest [dekitpro-macpman-installer.pkg](https://github.com/devkitPro/pacman/releases) from the GitHub releases page.
    1. Download the latest [dekitpro-macpman-installer.pkg](https://github.com/devkitPro/pacman/releases/latest) from the GitHub releases page.
    2. Install it with:

    ```sh
  5. joshenders revised this gist Nov 23, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion catalina_devkitpro_setup.md
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@ xcode-select --install
    2. Install it with:

    ```sh
    sudo installer -pkg /path/to/devkitpro-pacman.pkg -target /
    sudo installer -pkg /path/to/devkitpro-pacman-installer.pkg -target /
    ```

    ## Install the libraries and tools for switch development
  6. joshenders revised this gist Jul 3, 2020. 1 changed file with 4 additions and 17 deletions.
    21 changes: 4 additions & 17 deletions catalina_devkitpro_setup.md
    Original file line number Diff line number Diff line change
    @@ -15,16 +15,6 @@ xcode-select --install
    sudo installer -pkg /path/to/devkitpro-pacman.pkg -target /
    ```

    3. Update `RootDir` in `pacman.conf` to work around unresolved Catalina issue.

    Catalina uses a unique partitioning scheme to ensure system integrity. As such, the root partition isn't writeable and so we have to update the pacman configuration to accomodate for this.

    Follow the GitHub issue here: <https://github.com/devkitPro/pacman/issues/15>

    ```sh
    sudo sed -i '' 's|^#RootDir\ *= /|RootDir = /System/Volumes/Data|' /opt/devkitPro/pacman/etc/pacman.conf
    ```

    ## Install the libraries and tools for switch development

    Install the `switch-dev` package group using `dkp-pacman`.
    @@ -35,16 +25,13 @@ sudo dkp-pacman --noconfirm --sync switch-dev

    ## Update your shell runtime configuration

    1. Create `~/.bash_profile` or edit it if you have one already and add the following envrionment variables.
    1. Create `~/.bash_profile` or edit it if you have one already and add the following envrionment variables:

    ```sh
    export DEVKITPRO=/opt/devkitpro
    export DEVKITARM=${DEVKITPRO}/devkitARM
    export DEVKITPPC=${DEVKITPRO}/devkitPPC
    ```

    ```sh
    export PATH=${DEVKITPRO}/tools/bin:$PATH
    export DEVKITARM="${DEVKITPRO}/devkitARM"
    export DEVKITPPC="${DEVKITPRO}/devkitPPC"
    export PATH="${DEVKITPRO}/tools/bin:${PATH}"
    ```

    2. Source your updated `~/.bash_profile`
  7. joshenders revised this gist Jun 27, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion catalina_devkitpro_setup.md
    Original file line number Diff line number Diff line change
    @@ -85,7 +85,7 @@ You should now have a file in the current directory called `example.nro`.

    ![example](https://i.imgur.com/xPsvWfR.jpg)

    ## Acknolwedgements
    ## Acknowledgements

    Huge thanks to <https://devkitpro.org> for making this process so easy. Follow them on [Twitter](https://twitter.com/devkitpro) and support them on [Patreon](http://patreon.com/devkitPro)

  8. joshenders revised this gist Jun 26, 2020. 1 changed file with 11 additions and 11 deletions.
    22 changes: 11 additions & 11 deletions catalina_devkitpro_setup.md
    Original file line number Diff line number Diff line change
    @@ -17,13 +17,13 @@ xcode-select --install

    3. Update `RootDir` in `pacman.conf` to work around unresolved Catalina issue.

    Catalina uses a unique partitioning scheme to ensure system integrity. As such, the root partition isn't writeable and so we have to update the pacman configuration to accomodate for this.

    Follow the GitHub issue here: <https://github.com/devkitPro/pacman/issues/15>

    ```sh
    sudo sed -i '' 's|^#RootDir\ *= /|RootDir = /System/Volumes/Data|' /opt/devkitPro/pacman/etc/pacman.conf
    ```
    Catalina uses a unique partitioning scheme to ensure system integrity. As such, the root partition isn't writeable and so we have to update the pacman configuration to accomodate for this.
    Follow the GitHub issue here: <https://github.com/devkitPro/pacman/issues/15>
    ```sh
    sudo sed -i '' 's|^#RootDir\ *= /|RootDir = /System/Volumes/Data|' /opt/devkitPro/pacman/etc/pacman.conf
    ```

    ## Install the libraries and tools for switch development

    @@ -49,9 +49,9 @@ sudo dkp-pacman --noconfirm --sync switch-dev

    2. Source your updated `~/.bash_profile`

    ```sh
    source ~/.bash_profile
    ```
    ```sh
    source ~/.bash_profile
    ```

    ## Your first build

    @@ -83,7 +83,7 @@ You should now have a file in the current directory called `example.nro`.

    4. You should see your example code running.

    ![example](https://i.imgur.com/xPsvWfR.jpg)
    ![example](https://i.imgur.com/xPsvWfR.jpg)

    ## Acknolwedgements

  9. joshenders revised this gist Jun 26, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion catalina_devkitpro_setup.md
    Original file line number Diff line number Diff line change
    @@ -91,4 +91,4 @@ Huge thanks to <https://devkitpro.org> for making this process so easy. Follow t

    ## License

    This work is licensed under CC BY-NC version 4.0 https://creativecommons.org/licenses/by-nc/4.0/ © 2020, Josh Enders. Some Rights Reserved.
    This work is licensed under CC BY-NC version 4.0 <https://creativecommons.org/licenses/by-nc/4.0/> © 2020, Josh Enders. Some Rights Reserved.
  10. joshenders revised this gist Jun 26, 2020. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions catalina_devkitpro_setup.md
    Original file line number Diff line number Diff line change
    @@ -84,3 +84,11 @@ You should now have a file in the current directory called `example.nro`.
    4. You should see your example code running.

    ![example](https://i.imgur.com/xPsvWfR.jpg)

    ## Acknolwedgements

    Huge thanks to <https://devkitpro.org> for making this process so easy. Follow them on [Twitter](https://twitter.com/devkitpro) and support them on [Patreon](http://patreon.com/devkitPro)

    ## License

    This work is licensed under CC BY-NC version 4.0 https://creativecommons.org/licenses/by-nc/4.0/ © 2020, Josh Enders. Some Rights Reserved.
  11. joshenders revised this gist Jun 26, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions catalina_devkitpro_setup.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Getting started with Nintendo Switch Development using devkitpro on macOS Catalina
    # Getting started with Nintendo Switch Development using devkitpro on macOS

    ## Prerequsite: Ensure Xcode command line tools are installed

    @@ -47,7 +47,7 @@ sudo dkp-pacman --noconfirm --sync switch-dev
    export PATH=${DEVKITPRO}/tools/bin:$PATH
    ```

    2. Source your updated ~/.bash_profile`
    2. Source your updated `~/.bash_profile`

    ```sh
    source ~/.bash_profile
  12. joshenders created this gist Jun 26, 2020.
    86 changes: 86 additions & 0 deletions catalina_devkitpro_setup.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,86 @@
    # Getting started with Nintendo Switch Development using devkitpro on macOS Catalina

    ## Prerequsite: Ensure Xcode command line tools are installed

    ```sh
    xcode-select --install
    ```

    ## Install the devkitpro Package Manager

    1. Download the latest [dekitpro-macpman-installer.pkg](https://github.com/devkitPro/pacman/releases) from the GitHub releases page.
    2. Install it with:

    ```sh
    sudo installer -pkg /path/to/devkitpro-pacman.pkg -target /
    ```

    3. Update `RootDir` in `pacman.conf` to work around unresolved Catalina issue.

    Catalina uses a unique partitioning scheme to ensure system integrity. As such, the root partition isn't writeable and so we have to update the pacman configuration to accomodate for this.

    Follow the GitHub issue here: <https://github.com/devkitPro/pacman/issues/15>

    ```sh
    sudo sed -i '' 's|^#RootDir\ *= /|RootDir = /System/Volumes/Data|' /opt/devkitPro/pacman/etc/pacman.conf
    ```

    ## Install the libraries and tools for switch development

    Install the `switch-dev` package group using `dkp-pacman`.

    ```sh
    sudo dkp-pacman --noconfirm --sync switch-dev
    ```

    ## Update your shell runtime configuration

    1. Create `~/.bash_profile` or edit it if you have one already and add the following envrionment variables.

    ```sh
    export DEVKITPRO=/opt/devkitpro
    export DEVKITARM=${DEVKITPRO}/devkitARM
    export DEVKITPPC=${DEVKITPRO}/devkitPPC
    ```

    ```sh
    export PATH=${DEVKITPRO}/tools/bin:$PATH
    ```

    2. Source your updated ~/.bash_profile`

    ```sh
    source ~/.bash_profile
    ```

    ## Your first build

    Devkitpro comes with [example code](https://github.com/switchbrew/switch-examples) installed at `${DEVKITPRO}/examples`. You can use this code to test your toolchain or as a boiler plate for your first project.

    ```sh
    cp -r "${DEVKITPRO}/examples/switch/templates/application" /tmp/example
    cd /tmp/example
    make
    ```

    You should now have a file in the current directory called `example.nro`.

    ## Using NetLoader and nxlink to test your build

    1. Launch the `hbmenu` using your favorite method. I'm partial to the [RCMLoader](https://www.xkit.xyz/rcmloader/) myself.

    ![hbmenu](https://i.imgur.com/tRwZxGD.jpg)

    2. Ensure that your Switch is connected to Wifi (not in Airplane mode) and press 'Y' to start NetLoader

    ![netloader](https://i.imgur.com/GJjFOci.jpg)

    3. In your build directory, run nxlink with the IP address shown on the NetLoader screen:

    ```sh
    nxlink --address 192.168.1.10 example.nro
    ```

    4. You should see your example code running.

    ![example](https://i.imgur.com/xPsvWfR.jpg)