About SimpleIDE Windows, Projects, Tabs, and Files

One Project per Window

When you open an example program in SimpleIDE, it is contained in a project.  SimpleIDE is designed to be a one-project per window system.  If you want to have more than one project open, just open more than one SimpleIDE window.  For example, here is what it looks like to have two example programs open. 


Opening Windows, in Windows and Mac

In Windows, every time you double-click a .side file, it’ll open the project into a new SimpleIDE window and automatically open its .c main into the editor pane. 

In Mac, you have to first make one or more copies of the Applications Folder’s SimpleIDE app.  Then, any time you need more than one window open, just double-click more than one SimpleIDE copy in the Applications folder. 

New, Open, Save, Save As

Whenever you use New Project, Open Project, Save Project, or Save Project As, you are creating/opening/saving the entire project, including the C code files.  These choices are available as buttons on the button bar, and also through the Project menu. 


Tabs are for Files that are Part of the Project

Some example projects just contain a single .c file. Others contain multiple .c files, and still others contain multiple files of various types that get compiled into a Simple Library.  For projects with multiple files, click the lower-left Project Manager button to view them.  Each file you click in that list will open into a new editor tab.  Remember, all the tabs that open in that SimpleIDE window are files that are part of that project.  For more examples of working with multiple files, see the Library Studies guide.


Find and Use Precompiled Libraries

Need to go shopping for libraries that support devices?  In SimpleIDE, Click Help and select Simple Library Reference.  When you have found a Simple Library you want to use, simply #include that library in your program, and SimpleIDE takes care of the rest.  For example, if the ping library has the functions you need to incorporate a Ping))) sensor into your project, add #include “ping.h” to your project.  Your program can then call any function in the ping library. 

Propeller GCC also contains most standard C libraries.  These libraries have been documented many times over on the web at large, so if you are looking for info on something like string manipulation, try a Google search like this: "How do I compare two strings with C language?"  In this case, you might discover examples showing that you need to add #include <string.h> to your program, along with calls to one or more of the string library’s functions, like strcmp in this case.

Why "filename.h" or <filename.h> ?
It has to do with where the C compiler pre-processor will first search for files. By convention, user-created libraries use the "filename.h" notation. Standard libraries and device-specific libraries that are packaged with the compiler use the <filename.h> location.  But don't worry, PropGCC and SimpleIDE will find your libraries either way.



Project File Organization

Each project has at least two files, a .side project file and a main file.  For example, the Count to Ten project has two files, Count to Ten.side, and Count to Ten.c. 

  • Count to Ten.side contains project information – basically all the settings you can view and adjust in the Project Manager pane. 
  • Count to Ten.c has the actual code that appears in the Editor pane when you open the project.


Authors of larger programs will often sort functions into multiple files.  The code will always start in the function named main, but main might call functions in other files.  The simplest way to add files to your project is to keep them in the same folder with the .side file.  For example, if you want to add files to your project, click Project and select Add Tab to Project.  If you want to open files existing files into your project, put them in the same folder with your project, then use Project -> Open Tab to project.  Both of these features have a dropdown for setting the type of file to create/add. 


Custom Libraries

If you want to create your own Simple Library, see the Library Studies guide.  It also has step-by-step examples of working with multiple files in a project.

If you want to customize a Simple Library for use with a specific project without affecting the Simple Libraries folder, just put a copy of the Simple Library (a folder whose name starts with lib) into the folder that contains the project.  You do not need to add anything to the project manager, just make sure to #include the library in your code.  SimpleIDE automatically checks subfolders under the project for libraries before it checks in …Documents/SimpleIDE/Learn/Simple Libraries/. 

Libraries that have not been precompiled might just be a collection of one or more .h, .c, and optionally other files.  These can either be converted to Simple Library project with those files using techniques introduced in Library Studies guide, or manually added to a given Project.  Adding files to a project can be done with the Add/Open Tab to Project, but the files can also be placed in a subfolder, then incorporated into the project by right-clicking the Project Manager’s file list and selecting Add File Link.  

Legacy Features

SimpleIDE was originally created to provide an alternate option to the command line tools that were being used while the Propeller GCC compiler was still in development.  This earlier version of the software had a number of features that made it easy for beginners who are not yet aware of the distinctions between projects and files to create bugs — bugs that bring learning to a screeching halt.  To make SimpleIDE more available to to new programmers (often students just getting started in an educational environment), a new user interface called Simple View was designed to prevent file operations happening in place of the intended project operations.  This new interface still allows the more advanced project creations that were performed with the original, but without file operation traps for new users that the older Project View had.  

Project View is still available in SimpleIDE, though not actively supported by Parallax.  Access to these features is also intentionally nonintuitive to prevent new users from unintentionally accessing them.  For information on how to access Project View and explanations of its features, open the SimpleIDE User Guide from SimpleIDE's Help menu, and read the Project View section.