Posted: Sun Jun 01, 2008 8:48 pm
Thank you.TmEE co.(TM) wrote:You have some pretty nice HW stuff in your blog !!! Too bad I don't understand French...

I will translate it as soon as possible. Sorry.
Sega Megadrive/Genesis development
http://gendev.spritesmind.net/forum/
Thank you.TmEE co.(TM) wrote:You have some pretty nice HW stuff in your blog !!! Too bad I don't understand French...
Code: Select all
D:/GenesisDev/bin/gcc -m68000 -Wall -O1 -fomit-frame-pointer -ID:/GenesisDev/include -c main.c -o main.o
D:/GenesisDev/bin/gcc -TD:/GenesisDev/bin/md.ld -nostdlib VangelisS.o main.o tranceS.o -LD:/GenesisDev/lib -lsega -lgcc -v -o rom.bin
Using built-in specs.
Configured with: ./configure --disable-nls --disable-shared --disable-threads --prefix=/usr/local/m68kgcc/out --target=m68k-elf --enable-languages=c
Thread model: single
gcc version 3.4.6
ld -o rom.bin -LD:/GenesisDev/lib VangelisS.o main.o tranceS.o -lsega -lgcc -TD:/GenesisDev/bin/md.ld
Thanks, already solved that, didn`t knew that objcopy cuts out elf header.mic_ wrote:Try linking with -oformat binary
Or you can convert from ELF to binary in a separate step, using something like objcopy -O binary a.out myrom.bin
That aside, you should probably consider adding prefixes to the GNU binaries (i.e. gcc -> m68k-elf-gcc or whatever). It makes it clear exactly what they are, and also avoids problems when you've got many different versions of GCC on your computer, and all of them are in your PATH.! C:\GenesisDev20080812.zip: Unknown method in bin\as.exe
! C:\GenesisDev20080812.zip: Unknown method in bin\bintoc.exe
! C:\GenesisDev20080812.zip: Unknown method in bin\cc1.exe
etc etc..
I used 7-zip. I'll repack and upload it as soon as google back from maintenance.mic_ wrote:I don't know what you used to create the archive, but WinRAR refuses to extract some of the files:
There are no such problems with this setup, because binary folder is added to PATH only at runtime.mic_ wrote: That aside, you should probably consider adding prefixes to the GNU binaries (i.e. gcc -> m68k-elf-gcc or whatever). It makes it clear exactly what they are, and also avoids problems when you've got many different versions of GCC on your computer, and all of them are in your PATH.
I missed your first message along i'm cheking the forum almost everyday sorry :pYuge wrote:Thanks, already solved that, didn`t knew that objcopy cuts out elf header.mic_ wrote:Try linking with -oformat binary
Or you can convert from ELF to binary in a separate step, using something like objcopy -O binary a.out myrom.bin
Trying to improve devkit, I`ve rearranged some stuff & added some clever makefiles (mostly copied from devkitpro for NDS).
Here is the installation manual I`ve tested:
Genesis Devkit installation manual
1. Download and unzip (no link) to some folder (e.g. C:/GenesisDev), it will be your root folder.
2. Download and install msys* to the same folder (C:/GenesisDev/msys/bin).
3. Add Environment Variable:
DEVKITGEN = /c/GenesisDev (use only forward slashes!)
4. Add msys/bin folder to PATH:
PATH = C:\GenesisDev\msys\bin\
* If you already have one, be sure to check whether it's bin directory is added to PATH.
Usage
The pnproj files provided in example directories are Programmers Notepad(included) project files.
There are some hotkeys setup for quick start:
Alt+1 - make (build project, produces binary executable in the same directory)
Alt+2 - clean (delete all build files)
After pressing make, you should get something similiar to this:
Link
Happy deving! -Yuge.
PS. I haven`t seen Stef here in a while, but maybe he could consider moving this project to sourceforge (or similiar), so that automatic 'one click' installer could be made.
Yeah, I don't use no Code::blocks nor Eclipse IDE's. I was looking for more general solution.Stef wrote: Normally if you follow exactly all tutorial steps you should compile correcty your rom
I guess you missed something in section 17, anyway now it's fixed![]()
Actually I don't think that you need to pre-configure IDE now. I removed all hardcoded paths. It only needs to know, where msys make is. And the rest of the magic is now done with makefile.Stef wrote: It would be really nice if we could even include Code::blocks IDE with pre-configured genesis compiler and libraries, then add reals debug features but i guess this step can come later![]()
Yep makefile is a simpler solution but for some reasons makefile doesn't always behave as i'm expecting.Yuge wrote:Ok, original devkit post updated, link added.Yeah, I don't use no Code::blocks nor Eclipse IDE's. I was looking for more general solution.Stef wrote: Normally if you follow exactly all tutorial steps you should compile correcty your rom
I guess you missed something in section 17, anyway now it's fixed![]()
Actually I don't think that you need to pre-configure IDE now. I removed all hardcoded paths. It only needs to know, where msys make is. And the rest of the magic is now done with makefile.Stef wrote: It would be really nice if we could even include Code::blocks IDE with pre-configured genesis compiler and libraries, then add reals debug features but i guess this step can come later![]()
msys has rm though, but I don't know how the make shortcut is set up in PN.win32 doesn't have "rm" command and "del" command doesn't work in the same way so almost time the "makefile clean" is wrong.
Code: Select all
clean:
@rm -fr $(BUILD) -fr $(DEPENDS) $(TARGET).elf $(TARGET).bin
It happens, but rarely.Also when i'm using makefile the compilation errors aren't correctly catched by the output analyser
Tools->Options->Tools->Scheme (None-Global Tools)but I don't know how the make shortcut is set up in PN.
it's why I talked some months ago to add rm on GenDevKit...Stef wrote: Yep makefile is a simpler solution but for some reasons makefile doesn't always behave as i'm expecting.
The clean stuff to start with : win32 doesn't have "rm" command and "del" command doesn't work in the same way so almost time the "makefile clean" is wrong.
it's why I used Eclipse.Also when i'm using makefile the compilation errors aren't correctly catched by the output analyser and you have to find them yourself in your code instead of "just clicking on the error to see it"
Anyway makefile give more control on compilation :
- z80 asm file compilation
- resource compilation
- ...
which garantee correct compilation in every cases, so it's definitly the solution we should keep.