Hi Matt,

I only mention the (Zilog) Z80 option because that's what I've been using 
myself lately. Obviously, you'll have to substitute the appropriate option 
for the target CPU you're aiming to program. I haven't had any experience 
with SDCC for other than the Z80, so I'm rather limited in what I can offer 
by way of advice outside of that.

I needed an #include like this...

#include <z180.h>

to make anything sensible happen (I'm using an enhanced Z80 variant); but 
again this is no good if you're using something else! There will be include 
files that are specific to the target you're using, and you might have to use 
your computer's search capabilities to find them!

The other guys have alluded to bits that you might be missing to get things to 
work properly. This could be a bit harder to get to the bottom of, and it 
might be helpful to know which distribution you're using to be able to offer 
more precise guidance. I use OpenSuse here, among others.

On Thursday 05 March 2009 18:00:33 Matt Baker wrote:
> Richard
> Thanks for the reply.
> Was from the documentation "sdcc -c test.c"  section 2.7 sdccman.html
>
> char test;
>
> void main(void) {
>     test=0;
> }
>
> With sdcc -mz80 test.c I get
> at 1: error 131: cannot generate code for target 'z80'
>
> Sorry to be a pain but I am struggling with this.
>
> Matt
>
<snip>

-- 
Richard.
PGP Key-id: 0x5AB3D350

In those days he was wiser than he is now -- he used to frequently take
my advice.
                -- Winston Churchill

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to