Author Topic: [Help] How to using C:B development for Zilog CPUs Z80-Z180.  (Read 4613 times)

Offline mat75

  • Single posting newcomer
  • *
  • Posts: 6
[Help] How to using C:B development for Zilog CPUs Z80-Z180.
« on: February 27, 2009, 02:38:19 pm »
Hello,
I am using SDCC with the Codeblocks IDE and I am having a couple of issues when try compile file for Z80/Z180 target.
MCS51 target compile OK.
From commandline sdcc working fine e.g :
c:\sdcc main.c -mz80 -pz180.

But when create workspace in Codeblocks IDE and create empty project it causes only problems.
I'm change build target type from console to native and set compiler parameter -mz80, other compiler options -pz180, all compiler path are correct and the following error is generated :
[ 50.0%] Compiling: main.c
[100.0%] Linking console executable: bin\Debug\test.ihx
obj\Debug\main.o: cannot open.
Process terminated with status 1 (0 minutes, 1 seconds)
0 errors, 0 warnings

I'm observe in project options -> selected file properties, on advanced tab that variable: object file is set to main.rel (instead of main.o) and I cant change it to main.o
Thanks for your help,
         Mat.

Example main.c file
#include <z180.h>

unsigned int a;

void main(void){

while(1){
a=0xff;
};
//return 0;
}


P.S. My System use :
C::B Version 8.02
C:\>sdcc -v
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.8.0 #5117 (Mar 23 2008) (MINGW32)
My Os is Windows 2000 Service Pack 4.

Offline mat75

  • Single posting newcomer
  • *
  • Posts: 6
Re: [Help] How to using C:B development for Zilog CPUs Z80-Z180.
« Reply #1 on: February 27, 2009, 02:38:58 pm »
Hello,
I'm just solved this problem when I set option on "USE CUSTOM COMMAND TO BUILD THIS FILE:" and write
$compiler $options $includes -c $file -o ./obj/debug/main.o
(default is $compiler $options $includes -c $file -o $object ).
Thanks,
      Mat.