Monday, February 6, 2012

Project Folder and Files Structure

Among other things, a good project has a meaningful and useful folder structure that allows easy navigation among the different files. Anzhelka is interesting in that source files not only include code for one processor, but potentially several; it has both hardware files and software files, and all the associated files are cross platform!

It's been quite a challenge to come up with something flexible yet meaningful, and not difficult to the point where we won't use it. So, the details are below. It will probably change as the project evolves, but that's ok: it can only get better.

So, what do we have?

Structure

 /hardware
    /frame
    /pcb
 /software
    /spin
       /src
       /lib
       /test
       /tool
       /config
    /java
       /src
       /lib
       /test
       /tool
       /config
 /doc
    /datasheet

Hardware
Subfolders will store the major components of the project. For example, the frame has several .dxf files that are sent to the laser cutter, so that will all go into a subfolder called frame. The project may have several PCBs made as well, and so each should go into a subfolder under pcb.


Software
The software is separated by language into separate folders. This makes sense because each processor in the project will have only one language running, but separate processors that are running the same language may share components (library files, for example). Each language has a number of subfolders:

  • src is where the source code for the project is stored. Subfolders as appropriate.
  • lib stores all general purpose library files (code) such as Propeller Obex objects.
  • test stores the test harnesses such as unit tests and Spin code to test a particular module (the latter case would have a 'main' type method and would be self supporting when running on the Propeller).
  • tool holds all the relevant development tools for that language (bstc for Spin, for example).
  • config stores any sort of relevant compile time or testing configuration files.

Documentation
This folder stores all the relevant datasheets in the datasheet subdirectory, and any other project documentation that is deemed to fit. Note that most documentation probably belongs in the anzhelka wiki.


Note: all this information will be kept updated on the project wiki on this page.