Compiling a Project on the Proteus Simulator

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
    1. Download the Proteus_Simulator_Template.
    2. 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:)”.
    3. 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?”

      Figure 1: Opening a folder in Visual Studio Code.

    4. 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.

      Figure 2: Proteus Simulator Template

    5. 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
    1. In VS Code, open the terminal window by navigating to Terminal -> New Terminal as in Figure 3.

      Figure 3: Opening a Terminal in Visual Studio Code

      • If you are on a Hitchcock computer, you will need to open a Git Bash terminal 

        Figure 4: Opening a Git Bash Terminal in Visual Studio Code

    2. In VS Code, modify the main.cpp file to contain the program you want to run on the Proteus Simulator.
    3. 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.
    4. 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.