Home
About
Meetings Program
 and Reports
Location
Contact Us
Links
Blog
Headlines List

Page updated Tuesday
23rd 2004f November 2004
06:34:22 UTC
Now 22:46:20 UTC
Hits:661


  Knoppix 3.6 from a "live CD" and getting a simple test program to work.

Date:November 12, 2004
Time:7:00 pm.
Place:WEA, 223 Angas Street, ADELAIDE
Presenter:SAMG Members

PROGRAMMING FORUMS

The last two SAMG meetings have largely been devoted to looking at alternative ways of getting back to software development and programming that has been sadly neglected by us for some years now.

Software development and programming in the electronics' community has now really taken off in a big way. It is now the major activity for most electronics' developers/manufacturers and considerable progress has been made on all fronts. In the meantime hardware design and development has largely levelled off or is even on the way down because most hardware can be obtained as generic "off-the-shelf" items these days leaving the software development to make it work in a specific application for the developer (maybe you) to do.

If we can catch up with and get a fair grasp of the methods and terminology it will greatly expand the scope of presentations and presenters available to us for meetings. This is not to say that the traditional presentations will cease, but they will be blended with more detailed software development than we have done in the last few years.

It is intended that we make progress fairly slowly so that no one is left behind. It will be easy-paced and interesting. It is intended to conduct forums (or if you like, fora) instead of having some designated lecturer talk, demonstrate and prepare notes every time. Everyone should enjoy these meetings no matter how little or how much they know. It should be possible to attend meetings reasonably regularly and pick up all that is necessary for a good understanding without any need for homework (remember that?) or any additional study - but there is nothing to stop anyone doing that if they really want to.

To keep everyone together at this early stage we will be starting with Knoppix 3.6 Linux and using the plethora of devlopment software (among the many other goodies) it brings with it. We can move on to other, say Windows based software, later. Knoppix 3.6 is an outstanding and amazing product ideally suited to our purpose. It is freely available and free of cost, it loads on any PC as a "live" CD distribution (ie. it can be loaded, run and then removed with no impact whatsoever on your PC unless you quite deliberately want it to).

SAMG Chairman, Andrew Braund, introduced the ease of using the Gnu C/C++ compiler at our October meeting by running it on an Apple laptop. Then at our November meeting Andrew ran Knoppix 3.6 on a PC to demonstrate the Kdevelop IDE (Integrated Development Environment) for simple test programs. Andrew also showed some of the many really useful applications that come with Knoppix such as Qtparted for hard drive partitioning.

Knoppix is recognized as one of the best ways to rescue files such as your emails after one of those frequent Windows disasters (boot failures from viruses or malicious code attacks, user errors, etc). You boot Knoppix from its live CD and pull out all your personal files and write them to a CD or DVD in a two ROM drive system, a Flash RAM drive in a one CD system, onto a LAN, or onto floppies.

Everyone at the meeting got a Knoppix 3.6 CD to take home. A few even rushed off a bit early to get home to try it out! Terry Smith was astounded to find he could get Knoppix to load and run so easily on his laptop and then get his sound to work for the first time as well as download some files off a Flash RAM drive through his laptop's USB port.

Those who missed out in November can pick up a CD at the December meeting.

We haven't made too much progress at this stage so you will easily be able to join the discussion in December and next year.

In addition, look forward to Nanotechnology, SIGGRAPH Computer Animations and Radio Controlled Electric Propelled Aircraft in the new year. Also, Annual General Meeting on Friday February 11 at 7:00 pm at the WEA and there is no meeting in January.

Best wishes for Xmas and the New Year,

Rick Matthews, Secretary/Treasurer

SA Microprocessor Group Inc (a member of WEA Clubs Inc)


KNOPPIX 3.6 LINUX - A FEW THINGS TO TRY OUT

Here are a few of things that Andrew demonstrated at the October and November meetings that those who attended might like to try out using their Knoppix 3.6 live CD.

The "Hello World!" test program is as follows. It was entered using the vim text editor (although any of the many other text editors available in Knoppix such as the easy-to-use Kwrite will do, but don't use a word processor such as Open Office.)

main ()

{

printf("Hello World!\n");

}

Close the file naming it, say, hello.c, then open a console and enter the command line:

knoppix@ttyp0[knoppix]$ gcc hello.c

The compiler should leave an executable file a.out that you can check is there using the ls(list files) command in that directory or the file manager (Home icon). Then run the test program from a console using:

knoppix@ttyp0[knoppix]$ ./a.out

You should see:

Hello, World!

If you have got that far then maybe try looking up the gcc manual from a console using:

knoppix@ttyp0[knoppix]$ man gcc

Try other alternatives on the command line such as, say, writing another output filename using:

knoppix@ttyp0[knoppix]$ gcc hello.c -o hello

Then run it using:

knoppix@ttyp0[knoppix]$ ./hello

Then maybe try compiling as far as producing just an object file with:

knoppix@ttyp0[knoppix]$ gcc -c hello.c

(Note: Strict programming purists will criticize the missing #include statements, type declarations and other items in the above Hello, World code. We can discuss that at a future meeting.)

After you are satisfied that all has worked so far you can try using the Kdevelop IDE as an alternative to command line compilation by clicking the Start Menu and looking for Kdevelop in a sub-menu Development and loading it. Then load a skeletal program from the Project | New Project . . . pull down menu. Look for C and then look under it for the Simple Hello world program and load it. The Application's name is required, then proceed to answer the other boxes if you wish through to Finish. It should take a few moments to settle after that. You then look along the toolbars for Build Project and click to run Automake and the compiler. After some delay you will see activity indicating various stages of compilation that should continue through to **success**. Now try running it from the Run icon on the toolbar.

It is possible your compilation will stall part way though because of limited memory in your system (256 MB or less) and live CDs need lots of it. A command line compilation from a console using Knoppix or some other Linux distribution installed on the hard drive is far less demanding and should work even with 128 MB. If you have trouble with insufficient RAM you can always allocate virtual RAM (a Linux swap partition) on the PC's hard drive if you know what you are doing, but that is not a trivial exercise.

If you have any problems with any of this or you want to add any other good or bad experiences bring them along to the next meeting on Friday December 3 (one week earlier than the usual 2nd Friday).

By the way, the Save Configuration that we "couldn't find for looking" on the night is located by clicking the Penguin Icon (next to Start) and look for Save KNOPPIX Configuration and follow the instructions (you need to make the hard drive R/W if you want to save to it).

Then again, if you want a bit of light entertainment after all that then try Start | Toys | bb then sit back, fasten your seatbelt, turn up the audio, wait and enjoy the very clever programming - Matrix fans will simply love it.

Bear in mind we not only want people who have had little or no programming experience to attend, but we also want those who can program to come along and make the forums as informative and interesting as possible. Remember they won't be asked to prepare lectures. It will be nearly all spontaneous with just a few subject suggestions and demos to keep things rolling along.

In the near future we will look at compiler and IDE prerequisites ie. how to ensure the compiler can access the sources, objects, libraries, headers, manuals and class, method and function descriptions as well as find out in considerable depth what these components actually are, what they do, how to examine them and how to write them.

Make sure everyone who you think might like to join us in this exciting adventure next year is aware that we are returning to programming as part of our normal meeting agenda. Don't forget to invite those past members who only used to come to meetings just for the programming.