Using the Toolchain in an IDE

CLion

CLion is a C/C++ IDE made by JetBrains. Open your project in CLion. If you’re making a new one, make a copy of the examples/standalone_examples/template folder to get a boilerplate Makefile.

Open IDE settings

This is found under the drop-down option (File > Settings).

../_images/ides_clion_1.png

(Windows Only) Configure the make executable

(WINDOWS ONLY) Set the make executable (Build, Execution, Deployment > Build Tools > Make) to your CEdev bin/make.exe file.

../_images/ides_clion_2.png

Create CEdev Toolchain

Navigate to the options Build, Execution, Deployment > Toolchains, +, System

../_images/ides_clion_3.png

On Windows, set the “Build Tool” to CEdev/bin/make.exe and both C compilers to CEdev/bin/ez80-clang.exe

On MacOS/Linux, set both C compilers to CEdev/bin/ez80-clang. MacOS/Linux come with their own system make executable, and the default system one can be used.

../_images/ides_clion_4.png

CLion will likely warn that “Test CMake run finished with errors”. This is safe to ignore.

Enable CEdev Toolchain

Set the Makefile Toolchain (Build, Execution, Deployment > Makefile) to your newly created toolchain.

../_images/ides_clion_5.png

Code assistance should be working now. If you opened a demo project, you should be able to hover over the functions to see documentation/usage.

Build

Before this step, make sure you added your CEdev bin folder to your system’s PATH environment variable, otherwise make won’t be able to find the compiler.

At the top right, 5 Run Configurations are auto-generated.

  • Select “all” for the standard build.

  • Select “debug” for a debug build for use with the CEmu debugging toolchain.

  • Only use the Build (the hammer icon) button with these. The Run icon tries to run the generated executables, which fails since .8xp files can’t be run natively on PC.

Other IDEs

If you know how to configure the toolchain to work with another IDE, raise an issue or pull request on GitHub.