Richard,

>I have a 'C' program, which I hope will work, on paper in my hand ... 

Yeah, the BBC (bare-brain-computer). ;-)

>There's a computer running Windows on the desk in front of me.  I want to 
>compile this program for introduction by whatever means might be available 
>into a system based on one of the target MCU's supported by SDCC.  What's my 
>first step?  ... then what ... ?

I assume some prerequisites which might not hold true. For example, that you 
have some experience with programming under Windows (I don't mean writing 
programs for Windows but using Windows-based PC as a host for 
cross-development). Please say "stop" if I miss a step.

0. Download and install SDCC.

1. Create some suitable directory (aka folder) for your program. For example, 
C:\SW\Blinkey. 
Sidenotes:
1a. Micro$oft has some ideas about where you should place files created by you, 
like "C:\Documents and Settings\Username\My Documents\something". If you like 
that scheme, proceed accordingly. I personally don't like it.
1b. For start, I assume your program will be something simple (blinkey.c), 
single-file, includes only the standard headers and local headers, uses no 
other than standard libraries etc. All SDCC-generated files will then go into 
this directory, together with your sources. Things might get more complicated 
later.

2. Type in your blinkey.c program, using some suitable editor.

3. Run a command window (a.k.a. DOS window, DOS box). Click Start->Run, in W9x 
type "command", in W2k/WXP type "cmd". Go to your directory (e.g. using "cd 
C:\SW\Blinkey").

4. Type 'sdcc blinkey.c' (if the target is 8051, which I assume is your case).
4a. If it says 'Bad command or file name', something went wrong during 
installation and the path to the SDCC executables did not get into the PATH 
environment variable. In this case, you need to type '"C:\Program 
Files\SDCC\bin\sdcc" blinkey.c'
4b. Enjoy SDCC's opinion on your program :-)

5. Providing SDCC was completely happy, the output you are looking for is in 
the same directory (C:\SW\Blinkey), named 'blinkey.ihx', and it is a standard 
intelhex (note the suffix is different than the standard .hex).

Please comment.

Jan



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to