issues after reading "How to use SGDK from command line

SGDK only sub forum

Moderator: Stef

Post Reply
zhengyaxin_8bit
Very interested
Posts: 101
Joined: Thu Sep 04, 2008 2:57 am
Location: China

issues after reading "How to use SGDK from command line

Post by zhengyaxin_8bit » Wed Nov 23, 2011 11:56 am

1. my computer's environment variable setting like this:

GDK_WIN=D:\apps\gendev
bin=D:\apps\gendev\bin[/b][/b]

2. When i run the make file command, then the result is

D:\apps\gendev\bin>make -f D:\apps\gendev\makelib.gen
D:\apps\gendev/bin/sjasm -iD:\apps\gendev/src -iD:\apps\gendev/include D:\apps\g
endev/src/z80_drv1.s80 D:\apps\gendev/src/z80_drv1.o80 out.lst
zsh: no such file or directory: D:appsgendev\bin\sjasm
make: *** [D:\apps\gendev/src/z80_drv1.o80] Error 1


...............................................................................
Could you let me know what's wrong with all my setting?

3. can I compile the sound.cbp on command line?
4. could you tell me what's the differnces between .tfd and .tfe ,,,or how to transfer from .tfe to .tfd ?
5. where can i find the files defined in sound.h?

[/img]

Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

Post by Pascal » Wed Nov 23, 2011 1:51 pm

in computer's environment, you should have only 1 variable:
GDK=D:\apps\gendev

and modify the PATH variable to append the bin path: D:\apps\gendev\bin

be sure you have this in the makefile
BIN= $(GDK)/bin
LIB= $(GDK)/lib

that'd do the trick

zhengyaxin_8bit
Very interested
Posts: 101
Joined: Thu Sep 04, 2008 2:57 am
Location: China

Post by zhengyaxin_8bit » Wed Nov 23, 2011 2:20 pm

in my computer's system environment ,the PATH variable is
path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;D:\tool;D:\apps\gendev\bin
and the makelib.gen like this
BIN= $(GDK)/bin
LIB= $(GDK)/lib

SRC= $(GDK)/src
RES= $(GDK)/res
INCLUDE= $(GDK)/include

SHELL=$(BIN)/sh
AR= $(BIN)/ar
CC= $(BIN)/gcc
LD= $(BIN)/ld
OBJCPY= $(BIN)/objcopy
ASMZ80= $(BIN)/sjasm
MACCER= $(BIN)/mac68k
......

zhengyaxin_8bit
Very interested
Posts: 101
Joined: Thu Sep 04, 2008 2:57 am
Location: China

Post by zhengyaxin_8bit » Wed Nov 23, 2011 2:27 pm

I make one file "zyx.bat"
%GDK_WIN%\bin\make -f %GDK_WIN%\makelib.gen
pause
after run zyx.bat will creat error

----------------------------------------------------------
D:\apps\gendev>D:\apps\gendev\bin\make -f D:\apps\gendev\makelib.gen
D:\apps\gendev/bin/sjasm -iD:\apps\gendev/src -iD:\apps\gendev/include D:\apps\g
endev/src/z80_drv1.s80 D:\apps\gendev/src/z80_drv1.o80 out.lst
zsh: no such file or directory: D:appsgendev\bin\sjasm
make: *** [D:\apps\gendev/src/z80_drv1.o80] Error 1

D:\apps\gendev>PAUSE
---------------------------------------------------------
Press any key to continue . . .

Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

Post by Pascal » Wed Nov 23, 2011 2:53 pm

zhengyaxin_8bit wrote:I make one file "zyx.bat"
%GDK_WIN%\bin\make -f %GDK_WIN%\makelib.gen
pause
after run zyx.bat will creat error

----------------------------------------------------------
D:\apps\gendev>D:\apps\gendev\bin\make -f D:\apps\gendev\makelib.gen
D:\apps\gendev/bin/sjasm -iD:\apps\gendev/src -iD:\apps\gendev/include D:\apps\g
endev/src/z80_drv1.s80 D:\apps\gendev/src/z80_drv1.o80 out.lst
zsh: no such file or directory: D:appsgendev\bin\sjasm
make: *** [D:\apps\gendev/src/z80_drv1.o80] Error 1

D:\apps\gendev>PAUSE
---------------------------------------------------------
Press any key to continue . . .
try this batch:
SET GDK="D:\apps\gendev"
cd %GDK%
make -f makelib.gen

zhengyaxin_8bit
Very interested
Posts: 101
Joined: Thu Sep 04, 2008 2:57 am
Location: China

Post by zhengyaxin_8bit » Wed Nov 23, 2011 5:16 pm

I have found the question, I must setting GDK=D:/apps/gendev;but I use window xp. Thanks Pascal :)

zhengyaxin_8bit
Very interested
Posts: 101
Joined: Thu Sep 04, 2008 2:57 am
Location: China

Post by zhengyaxin_8bit » Wed Nov 23, 2011 5:50 pm

--------------------------------------------------
Now you can compile the library by using
%GDK_WIN%\bin\make -f %GDK_WIN%\makelib.gen
When the library is compiled you should obtain the following files
%GDK%/lib/sega.o
%GDK%/lib/libgendev.a
--------------------------------------------------
after compiled the library,I don't find sega.o ,and libgendev.a
is exist before compile the library.
I try to put sega.s and rom_head.c into "D:\apps\gendev\src\" and run compile library agian ,will creat error as here:

---------------------------------------------------
D:\apps\gendev>make -f makelib.gen
D:/apps/gendev/bin/gcc -m68000 -Wall -O1 -fomit-frame-pointer -fno-builtin-mems
et -fno-builtin-memcpy -ID:/apps/gendev/include -c D:/apps/gendev/src/sega.s -o
D:/apps/gendev/src/sega.o
D:/apps/gendev/src/sega.s: Assembler messages:
D:/apps/gendev/src/sega.s:43: Error: file not found: out/rom_head.bin
make: *** [D:/apps/gendev/src/sega.o] Error 1

D:\apps\gendev>PAUSE
Press any key to continue . . .

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Fri Nov 25, 2011 9:43 am

zhengyaxin_8bit wrote:--------------------------------------------------
Now you can compile the library by using
%GDK_WIN%\bin\make -f %GDK_WIN%\makelib.gen
When the library is compiled you should obtain the following files
%GDK%/lib/sega.o
%GDK%/lib/libgendev.a
--------------------------------------------------
after compiled the library,I don't find sega.o ,and libgendev.a
is exist before compile the library.
I try to put sega.s and rom_head.c into "D:\apps\gendev\src" and run compile library agian ,will creat error as here:

---------------------------------------------------
D:\apps\gendev>make -f makelib.gen
D:/apps/gendev/bin/gcc -m68000 -Wall -O1 -fomit-frame-pointer -fno-builtin-mems
et -fno-builtin-memcpy -ID:/apps/gendev/include -c D:/apps/gendev/src/sega.s -o
D:/apps/gendev/src/sega.o
D:/apps/gendev/src/sega.s: Assembler messages:
D:/apps/gendev/src/sega.s:43: Error: file not found: out/rom_head.bin
make: *** [D:/apps/gendev/src/sega.o] Error 1

D:\apps\gendev>PAUSE
Press any key to continue . . .
From the problem you're experiencing it seems i need to update my tutorial from command line. I'll check that and get back here to explain what was the problem.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Sun Nov 27, 2011 5:56 pm

Just figured your problem, actually you need to set both variables GDK and GDK_WIN. Here's what is written on tutorial :
Define "GDK" environment variable to your installation path in unix path format (example D:/sgdk).
Define "GDK_WIN" which still point to your installation path but in windows format (exemple D:\sgdk).
And both lines concern windows OS as anyway SGDK works only for windows.
If you need the GDK variable set in unix path like it's because internals GCC tools handle path this way.

Post Reply