There are two methods of running a Proteus program: (1) on the physical Proteus or (2) on the Proteus Simulator. This page is about compiling a project using the Proteus Simulator. If you are looking for compiling and running a project on the physical Proteus, see this page instead.
Compiling on the Proteus Simulator
- Getting Started
- Download the Proteus_Simulator_Template.
- Unzip the Proteus Simulator Template
- If you are on a Hitchcock computer, copy the “Proteus_Simulator” folder to your U: drive. When selecting your U: drive, do not use shortcuts (like Desktop or Documents). To do this, open a File Explorer, select “This PC”, and choose “name.# (U:)”.
- Open Visual Studio Code. Open the project folder that you extracted by navigating to File -> Add Folder To Workspace and then selecting your project folder (Proteus_Simulator, not Proteus_Simulator_Template), as in Figure 1. Select Yes if you are prompted with the warning “Do you trust the authors of the files in this folder?”
- Notice that your project files can now be viewed in the explorer. If the explorer is not open, open it by clicking the explorer button highlighted in Figure 2.
- Open the main.cpp file by double clicking on it. This is the entry point to your application and it should print Hello World! to the Proteus screen.
- Compiling and Running a Proteus Simulator Program
- In VS Code, open the terminal window by navigating to Terminal -> New Terminal as in Figure 3.
- If you are on a Hitchcock computer, you will need to open a Git Bash terminal
- In VS Code, modify the main.cpp file to contain the program you want to run on the Proteus Simulator.
- Compile the program
- On Windows devices, enter the command mingw32-make to compile your code.
- On Mac devices, enter the command make to compile your code.
- Run the program
- On Windows devices, run the program by either typing game into the VS Code terminal or by double clicking on the game.exe file generated in the folder you are working in.
- On Mac Devices, run the program by typing ./game.out into the VS Code terminal.
- In VS Code, open the terminal window by navigating to Terminal -> New Terminal as in Figure 3.