|
3 | 3 | Using the Toolchain in an IDE
|
4 | 4 | =============================
|
5 | 5 |
|
6 |
| -CLion |
7 |
| ------ |
| 6 | +The CE Toolchain can be used in a variety of Integrated Development Enviornments (IDEs). |
| 7 | +The below are currently supported - Raise an issue or pull request on `GitHub <https://github.com/CE-Programming/toolchain>`_ if you would like to see a different one, or if an IDE update changes the current flow. |
8 | 8 |
|
9 |
| -CLion is a C/C++ IDE made by JetBrains. |
10 |
| -Open your project in CLion. |
11 |
| -If you're making a new one, make a copy of the :code:`examples/standalone_examples/template` folder to get a boilerplate Makefile. |
| 9 | +.. dropdown:: CLion |
12 | 10 |
|
13 |
| -.. rubric:: Open IDE settings |
| 11 | + CLion is a C/C++ IDE made by JetBrains. |
| 12 | + Open your project in CLion. |
| 13 | + If you're making a new one, make a copy of the :code:`examples/standalone_examples/template` folder to get a boilerplate Makefile. |
14 | 14 |
|
15 |
| -This is found under the drop-down option (:code:`File > Settings`). |
| 15 | + .. rubric:: Open IDE settings |
16 | 16 |
|
17 |
| -.. image:: images/ides_clion_1.png |
18 |
| - :align: center |
| 17 | + This is found under the drop-down option (:code:`File > Settings`). |
19 | 18 |
|
20 |
| -.. rubric:: (Windows Only) Configure the make executable |
| 19 | + .. image:: images/ides_clion_1.png |
| 20 | + :align: center |
21 | 21 |
|
22 |
| -(*WINDOWS ONLY*) Set the :code:`make` executable (:code:`Build, Execution, Deployment > Build Tools > Make`) to your CEdev :code:`bin/make.exe` file. |
| 22 | + .. rubric:: Configure the make executable |
23 | 23 |
|
24 |
| -.. image:: images/ides_clion_2.png |
25 |
| - :align: center |
| 24 | + **WINDOWS ONLY**: Set the :code:`make` executable (:code:`Build, Execution, Deployment > Build Tools > Make`) to your CEdev :code:`bin/make.exe` file. |
26 | 25 |
|
27 |
| -.. rubric:: Create CEdev Toolchain |
| 26 | + .. image:: images/ides_clion_2.png |
| 27 | + :align: center |
28 | 28 |
|
29 |
| -Navigate to the options :code:`Build, Execution, Deployment > Toolchains`, :code:`+`, :code:`System` |
| 29 | + .. rubric:: Create CEdev Toolchain |
30 | 30 |
|
31 |
| -.. image:: images/ides_clion_3.png |
32 |
| - :align: center |
| 31 | + Navigate to the options :code:`Build, Execution, Deployment > Toolchains`, :code:`+`, :code:`System` |
33 | 32 |
|
34 |
| -On Windows, set the "Build Tool" to :code:`CEdev/bin/make.exe` and both C compilers to :code:`CEdev/bin/ez80-clang.exe` |
| 33 | + .. image:: images/ides_clion_3.png |
| 34 | + :align: center |
35 | 35 |
|
36 |
| -On MacOS/Linux, set both C compilers to :code:`CEdev/bin/ez80-clang`. |
37 |
| -MacOS/Linux come with their own system :code:`make` executable, and the default system one can be used. |
| 36 | + On Windows, set the "Build Tool" to :code:`CEdev/bin/make.exe` and both C compilers to :code:`CEdev/bin/ez80-clang.exe` |
38 | 37 |
|
39 |
| -.. image:: images/ides_clion_4.png |
40 |
| - :align: center |
| 38 | + On MacOS/Linux, set both C compilers to :code:`CEdev/bin/ez80-clang`. |
| 39 | + MacOS/Linux come with their own system :code:`make` executable, and the default system one can be used. |
41 | 40 |
|
42 |
| -CLion will likely warn that "Test CMake run finished with errors". |
43 |
| -This is safe to ignore. |
| 41 | + .. image:: images/ides_clion_4.png |
| 42 | + :align: center |
44 | 43 |
|
45 |
| -.. rubric:: Enable CEdev Toolchain |
46 | 44 |
|
47 |
| -Set the Makefile Toolchain (:code:`Build, Execution, Deployment > Makefile`) to your newly created toolchain. |
| 45 | + CLion will likely warn that "Test CMake run finished with errors". |
| 46 | + This is safe to ignore. |
48 | 47 |
|
49 |
| -.. image:: images/ides_clion_5.png |
50 |
| - :align: center |
| 48 | + .. rubric:: Enable CEdev Toolchain |
51 | 49 |
|
52 |
| -Code assistance should be working now. |
53 |
| -If you opened a demo project, you should be able to hover over the functions to see documentation/usage. |
| 50 | + Set the Makefile Toolchain (:code:`Build, Execution, Deployment > Makefile`) to your newly created toolchain. |
54 | 51 |
|
55 |
| -.. rubric:: Build |
| 52 | + .. image:: images/ides_clion_5.png |
| 53 | + :align: center |
56 | 54 |
|
57 |
| -Before this step, make sure you added your CEdev :code:`bin` folder to your system's PATH environment variable, otherwise :code:`make` won't be able to find the compiler. |
| 55 | + Code assistance should be working now. |
| 56 | + If you opened a demo project, you should be able to hover over the functions to see documentation/usage. |
58 | 57 |
|
59 |
| -At the top right, 5 Run Configurations are auto-generated. |
| 58 | + .. rubric:: Build |
60 | 59 |
|
61 |
| -* Select "all" for the standard build. |
| 60 | + Before this step, make sure you added your CEdev :code:`bin` folder to your system's PATH environment variable, otherwise :code:`make` won't be able to find the compiler. |
62 | 61 |
|
63 |
| -* Select "debug" for a debug build for use with the `CEmu debugging toolchain <https://ce-programming.github.io/toolchain/static/debugging.html>`_. |
| 62 | + At the top right, 5 Run Configurations are auto-generated. |
64 | 63 |
|
65 |
| -* Only use the Build (the hammer icon) button with these. |
66 |
| - The Run icon tries to run the generated executables, which fails since .8xp files can't be run natively on PC. |
| 64 | + * Select "all" for the standard build. |
67 | 65 |
|
68 |
| -Other IDEs |
69 |
| ----------- |
| 66 | + * Select "debug" for a debug build for use with the `CEmu debugging toolchain <https://ce-programming.github.io/toolchain/static/debugging.html>`_. |
| 67 | + |
| 68 | + * Only use the Build (the hammer icon) button with these. |
| 69 | + The Run icon tries to run the generated executables, which fails since .8xp files can't be run natively on PC. |
70 | 70 |
|
71 |
| -If you know how to configure the toolchain to work with another IDE, raise an issue or pull request on `GitHub <https://github.com/CE-Programming/toolchain>`_. |
0 commit comments