Richard Erlacher wrote:
>
>> 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.
>>
>>     
> OK ... The path, etc, is a pretty standard thing under Windows, so it's a 
> matter of preference.  The target MCU might change ... but not for now.  The 
> output includes an ASM file, right?  What else should I look for?
>   
Off the top of my head, for a multi-file project you would do:

sdcc blinky.c -c --debug
sdcc blinky_part2.c  -c --debug
sdcc main_lives_here.c -c --debug

# Note that main_lives_here contains the main() function, and should be 
first in the list.  All interrupt service routines need to be defined in 
this file as well.  I just include the appropriate headers to do this.

sdcc main_lives_here.rel blinky.rel blink_part2.rel -o amazing-blinker 
--debug

Normally I let make do all the work.  If you are on Windows, and plan to 
use make, I suggest downloading and using MinGW and MSYS.  The use the 
msys verison of make.  That way you'll be using GNU make with tons of 
helpful extensions.  As a bonus, your makefiles will run under a bash 
prompt, which is far more powerful than a dos prompt.

For each source file (eg blinky.c), you will have:

blinky.adb   A debugger file that I haven't ever needed to mess with.
blinky.asm   The assembler output version of the file- pre-linkage version.
blinky.lst      The assembler output and machine code all in one 
file--pre-linkage version.
blinky.rel     The object file.  This is a text file.
blinky.sym   A big list of symbols allocated in the file and where they go.

After linkage you get also:
blinky.rst   Basically the .lst file with addresses fixed up after linkage.

If your output target is amazing-blinker, after linking you get these 
files as well:

amazing-blinker         An OMF51 file.  from --debug switch
amazing-blinker.cdb  Another debugger file.
amazing-blinker.ihx   Intel hex file.
amazing-blinker.map A listing of what is assigned where.  Very useful to 
learn to read.
amazing-blinker.mem A memory allocation overview.  Easy to read, and 
important too.

IIRC there's a something the User's Guide about the different files 
generated.  Don't remember where.

I hope this helps.

--Mark Swayne

-------------------------------------------------------------------------
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