IDE Folder Structure

From Pinguino
Jump to: navigation, search


The Pinguino Integrated Development Environment (IDE) is contained in a single directory/folder (~/pinguino for example).

Basic Structure

The basic structure of the directories/folders used by the Pinguino IDE is shown below. This structure is taken from that used for Pinguino X.2 for linux (r208) but similar structures are used for Windows and Mac OS X as indicated.

  • ~/pinguino/
    • examples/
    • extra/
    • linux/ = win32/ for windows and = macosx/ on Macintosh OS X
      • p8/
      • p32/
    • locale/
    • p8/
      • include/
      • lib/
      • lkr/
      • obj/
      • share/
    • p32/
      • include/
      • lib/
      • lkr/
      • obj/
      • share/
    • source/
    • theme/

Contents of Individual Directories/Folders

~/pinguino/ Contains Python Source (IDE and python classes)
Contains the various example programs for 8 bit and 32 bit Pinguinos.
Used to store some necessary files including :-
  • dev rules for 8 bit Pinguinos
  • hex file of 8 bit bootloader
  • glcd which is a graphical tool to create a font
Used to store the binary tools (compiler, linker, bootloader) for 8 bit and 32 bit systems (see below).
Used to store the binary tools (compiler, linker, bootloader) for 8 bit systems.
Used to store the binary tools (compiler, linker, bootloader) for 32 bit systems.
Contains the translation files for multi-language operation together with a "HOW TO" (text) file for the translation system.

Separate sub-folders are used for each language.

Contains the libraries and necessary files for compilation for 8 bit systems in a series of separate directories/sub-folders which are detailed below.
Contains the source file used by pinguino ( core/basics for low level hardware implementation and libraries for extension ). During the compilation step, the include folder is used to find the libraries or include files used by the user program.
This is probably the most important folder. It is used to ensure compatibility with arduino C++ instructions. As pinguino is not used with a C++ compiler, there is a preprocessor which translates C++ instructions to pure C. For example, if you write Serial.begin(9600) the C compiler can not process this instruction. You need to translate it before compilation to something understandable by the C compiler. The Pinguino preprocessor scans for the C++ instructions and translates them to correct C syntax. To achieve this, the preprocessor needs to know what is the form of the C++ instruction and then needs to replace this instruction with correct C syntax and, of course, include the right file. This is achieved using the files located in the lib folder. For example, if you open the serial.pdl file ( pdl is for pinguino description library ), you will see the first line is :-
Serial.begin serial_begin#include <serial.c>

so, every time the pinguino preprocessor finds Serial.begin in the program file, it replaces it with serial_begin and include <serial.c> in the define.h. At each start of the IDE, the files located in p8/lib or (p32/lib for 32 bit ) are read and used to translate instructions.

Used to store some object files used by the linker ( mostly used to insure compatibility with vasco bootloader on 8 bit systems and a runtime specially coded for pinguino crt0ipinguino.o ).
Used to store files in relation with SDCC and GPUTILS.
Contains the libraries and necessary files for compilation for 32 bit systems in a series of separate sub-folders which follow the same structure as those for 8 bit systems detailed above.
This folder contains :-
  • main.c and main32.c files used for the compilation step. They include a user.c file generated by the IDE preprocessor ( the user program )
  • makefile.linux and Makefile.win32 are the makefile used for 32 bit system ( pinguino32 )
  • stdout is generated by the compiler and the linker. it is a complete description of what happened during the compilation step. If everything is OK, stdout is empty.
  • define.h is generated by the IDE preprocessor, it includes libraries and standard description depending on the board used.
  • common_types.h - an old file used for 8 bits system which may be removed from future versions.

The files in this folder, other than common_types.h, are generated by the compiler or the linker depending on the board used.

Contains all the graphical material for the user interface. A separate folder contains icons for the GUI for each theme. You can use your own folder here to create your own theme.