I've downloaded the sdcc project to recompile some assembler code I had from a while back.
I can't seem to get aslink to link code I've previously produced. The linker doesn't give any warnings at all, it just spits out the no parameters/help text:
paul@paul-desktop:~/Projects/Z80/src/rel$ aslink pass_fai.rel
ASxxxx Linker V01.75 + NoICE + SDCC Feb 1999
-c Command line input
-f file[LNK] File input
-p Prompt and echo of file[LNK] to stdout (default)
-n No echo of file[LNK] to stdout
-k Library path specification, one per -k
-l Library file specification, one per -l
-b area base address = expression
-g global symbol = expression
-m Map output generated as file[MAP]
-x Hexadecimal (default), -d Decimal, -q Octal
-i Intel Hex as file[IHX]
-s Motorola S19 as file[S19]
-j Produce NoICE debug as file[NOI]
-z Produce SDCdb debug as file[cdb]
-u Update listing file(s) with link data as file(s)[.RST]
-a [iram-size] Check for internal RAM overflow
-v [xram-size] Check for external RAM overflow
-w [code-size] Check for code overflow
-y Generate memory usage summary file[mem]
-Y Pack internal ram
-A [stack-size] Allocate space for stack
-e or null line terminates input
Looking through the documentation I see that it says the linker supports versions 3,4,5 of the assembler.
The version shipped with sdcc is
ASxxxx Assembler V01.75 + SDCC mods (Zilog Z80 / Hitachi HD64180)
Should I download the latest from http://shop-pdp.kent.edu/?
Will this screw up sdcc if I come to writing C code later?
This is probably because the linker script is missing. I'll take a look…
> Should I download the latest from http://shop-pdp.kent.edu/?
No, they are not compatible (yet).
> Will this screw up sdcc if I come to writing C code later?
Linking from sdcc works without problems.
If you could give me a code snippet and a means of interfacing with aslink then that would be a good start.
Also, is it possible to assemble and link code (in asm) via sdcc?
I took a look: sdcc aslink (in the latest svn versions it is called sdld) behaves in the same way as asxxxx aslink before version 3.0, regarding the command line parameters.
> If you could give me a code snippet and a means of interfacing with aslink then that would be a good start.
The simples way is to write a small c program, compile it with sdcc, using the -V command line option to see how the assembler and linker are invoked, and analize the generated lnk file ;-)
> Also, is it possible to assemble and link code (in asm) via sdcc?
Yes, you can either use the c file inline assembler code or write separate assembler files and assemble / link them with with c files. Take a look to sdccman.pdf and to sdcc library source files.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.