Cygwin and code::blocks. A dream becomes reality.

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
User avatar
SiZiOUS
DC Developer
DC Developer
Posts: 387
Joined: Fri Mar 05, 2004 2:22 pm
Location: France
Has liked: 16 times
Been liked: 10 times
Contact:

Post by SiZiOUS » Fri Jan 13, 2006 12:30 am

That's a very cool news, thanks for the work, pnp ! :mrgreen:
User avatar
pnpbios
DCEmu Freak
DCEmu Freak
Posts: 96
Joined: Mon May 16, 2005 5:28 pm
Has liked: 0
Been liked: 0

Post by pnpbios » Fri Jan 13, 2006 12:52 am

thanks! after i finish my SDL clone of PONG, I plan on learning the PVR, just so I can document the crap out of it.
LyingWake
DCEmu Super Poster
DCEmu Super Poster
Posts: 1342
Joined: Thu Aug 26, 2004 4:05 am
Has liked: 0
Been liked: 0
Contact:

Post by LyingWake » Thu Jan 19, 2006 2:25 am

So have you gotten anywhere with getting your setup non-dependent on my ISO?
User avatar
pnpbios
DCEmu Freak
DCEmu Freak
Posts: 96
Joined: Mon May 16, 2005 5:28 pm
Has liked: 0
Been liked: 0

Post by pnpbios » Thu Jan 19, 2006 11:25 pm

nope. not yet. I've had so much on my plate, my head is going to explode.
Dreamcast alive
DCEmu Junior
DCEmu Junior
Posts: 44
Joined: Tue Apr 11, 2006 3:29 am
Has liked: 0
Been liked: 0

Post by Dreamcast alive » Tue Jul 18, 2006 1:30 pm

Thanks for those nice tutorial pnpbios :D. I have a working DC C Compiler under Code::Blocks now. The Problem is the C++ Compiler. I can't open the two registry files because they can only be executed with newer versions of windows (syntax of regedit 5.0) and I have Win98SE (syntax of regedit 4.0). So what should I do now? Thanks.
dospro
Insane DCEmu
Insane DCEmu
Posts: 147
Joined: Thu Dec 30, 2004 7:12 pm
Has liked: 0
Been liked: 0
Contact:

Post by dospro » Fri Jan 12, 2007 10:17 pm

can someone fix the links to the C++ compiler ocnfiguration file please?
It doesn't work anymore.
Check the BioGB emulator any help me get it much better!!
http://www.geocities.com/instructivus
User avatar
pnpbios
DCEmu Freak
DCEmu Freak
Posts: 96
Joined: Mon May 16, 2005 5:28 pm
Has liked: 0
Been liked: 0

Post by pnpbios » Tue Mar 20, 2007 2:29 pm

Wow, it's been like... forever, and my thread is still on the front page! I'm amazed. Here's whats new.
*I finally got my hands on a Dreamcast again, and all my hardware.
*I transfered schools, and a lot of stuff didn't get backed up either. I lost most of my dream cast code.
*Give me a little while to try and redo my old setup, and reflect any changes made within the new dev-cd.
*I need to find my old hard-drive that had my pong source code on it.

It's good to sorta be back.
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has liked: 0
Been liked: 0
Contact:

Post by emptythought » Tue Mar 20, 2007 7:03 pm

Welcome back :).
User avatar
Arqueiro
DCEmu Nutter
DCEmu Nutter
Posts: 785
Joined: Tue Jul 02, 2002 9:29 am
Has liked: 0
Been liked: 0
Contact:

Post by Arqueiro » Thu Apr 05, 2007 11:25 am

welcome back, stay with the scene
3d graphics and visualization ?
http://www.arquiteturadigital.com
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has liked: 0
Been liked: 0
Contact:

Post by emptythought » Tue May 15, 2007 1:50 am

Give me a little while to try and redo my old setup, and reflect any changes made within the new dev-cd.
It should work with the new dev ISO as-is since there isn't any changes directory-wise. I'm planning on releasing a tool in two different styles; one dependent on the ISO the other independent. Because of the flexibly of Code::Blocks I figured out a way to get the ELFs compiling as if it was built in cygwin. This means though that Dev-C++ doesn't build the ELFs correctly so Dev-C++ will never work right as a Dreamcast IDE as you can't change the order the objects are passed to sh-elf-gcc. This news is probably irrelevant to ATani and BlackAura since they both use the wrappers KOS provides.

Basically this is what I need to finish before warranting a release (from my TODO list):

compile other projects for consistency with the current flags
add romdisk tools
find someone to test GDB support
integrate sh-elf-gdb into Code::Blocks
independent and dependent of DC Dev ISO
get C++ working

If you have any information to share feel free, else I will work as fast as possible.
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has liked: 0
Been liked: 0
Contact:

Post by emptythought » Thu May 17, 2007 1:23 am

Here's a WIP independent (DC Dev ISO isn't used) version which supports C \ C++.

It has slightly different settings than pnpbios' tutorial.

Extra includes path:

Code: Select all

C:\cygwin\usr\local\dc\sh-elf\include\c++\3.4.6
Compiler flags:

Code: Select all

-ml -m4-single-only -g -fno-builtin -fno-optimize-sibling-calls -fno-strict-aliasing -D_arch_dreamcast -D_arch_sub_pristine -Wall -O2 -fomit-frame-pointer
Linker flags (append -Wl,--start through -Wl,--end to this see: LINK)

Code: Select all

-ml -m4-single-only -Wall -nostdlib -nostartfiles -lstdc++ -Wl,-Ttext=0x8c010000
Link object files to console executable (Other tab, Advanced options):

Code: Select all

$linker $libdirs -o $exe_output "C:\cygwin\usr\local\dc\kos\kos\kernel\arch\dreamcast\kernel\startup.o" $link_objects $link_resobjects $link_options $libs
I also went ahead and configured genromfs and bin2o to make the romdisk stuff (remember to link to it) and added a DC template.

Download 22.3MB

A program will set all the compiler information for you after the install completes. Uninstalling is easy, just run the uninstaller and you can remove the DC compiler from the same program that set it.

Let me know what you think! :D
User avatar
pnpbios
DCEmu Freak
DCEmu Freak
Posts: 96
Joined: Mon May 16, 2005 5:28 pm
Has liked: 0
Been liked: 0

Re: Cygwin and code::blocks. A dream becomes reality.

Post by pnpbios » Thu May 24, 2007 3:10 pm

Man... I just don't have any luck... My dreamcast died on me, so now i had to buy another used one... Finaly got done with school and finals... I'll be working 2 jobs over the summer... But we'll see what i can cook up.


--fackue, i'll take a look at your system too.
Dreamcast alive
DCEmu Junior
DCEmu Junior
Posts: 44
Joined: Tue Apr 11, 2006 3:29 am
Has liked: 0
Been liked: 0

Re: Cygwin and code::blocks. A dream becomes reality.

Post by Dreamcast alive » Thu May 31, 2007 1:39 pm

Sorry, but what is the meaning of WIP?
And fackue, perhaps you can explain a little bit more detailed why you think Dev C++ will never work right as a Dreamcast IDE. Thank you.
User avatar
|darc|
DCEmu Webmaster
DCEmu Webmaster
Posts: 16170
Joined: Wed Mar 14, 2001 6:00 pm
Location: New Orleans, LA
Has liked: 23 times
Been liked: 5 times
Contact:

Re: Cygwin and code::blocks. A dream becomes reality.

Post by |darc| » Thu May 31, 2007 7:05 pm

Dreamcast alive wrote:Sorry, but what is the meaning of WIP?
Work in Progress
It's thinking...
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has liked: 0
Been liked: 0
Contact:

Re: Cygwin and code::blocks. A dream becomes reality.

Post by emptythought » Thu May 31, 2007 8:30 pm

Dreamcast alive wrote:And fackue, perhaps you can explain a little bit more detailed why you think Dev C++ will never work right as a Dreamcast IDE. Thank you.
In the sense of calling the compilers directly -- you can't change the order objects are linked... specifically startup.o. The ELF (will) work if you upload it via dc-tool but it won't work if you convert it into a binary, then selfboot it. At least this is what I'm told -- it proved true in nullDC... I don't have any hardware to test it on.
starlight
DCEmu Newbie
DCEmu Newbie
Posts: 4
Joined: Sat Jun 02, 2007 12:02 am
Has liked: 0
Been liked: 0

Re: Cygwin and code::blocks. A dream becomes reality.

Post by starlight » Sat Jun 02, 2007 12:06 am

Fackue, the installer for your WIP build has the Install button indefinitely grayed out (at least for me). I had to install it using CodeBlocks_DCDev_WIP.exe /S /D=C:\dc from the command line. Just noting in case anyone else that wanted to try it is having a similar issue (This was on XP64 & Vista32).
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has liked: 0
Been liked: 0
Contact:

Re: Cygwin and code::blocks. A dream becomes reality.

Post by emptythought » Sat Jun 02, 2007 12:43 am

I configured the installer to check for codeblocks.exe in the upper path, so make sure you select the folder CodeBlocks in installed in and add \dc.
starlight
DCEmu Newbie
DCEmu Newbie
Posts: 4
Joined: Sat Jun 02, 2007 12:02 am
Has liked: 0
Been liked: 0

Re: Cygwin and code::blocks. A dream becomes reality.

Post by starlight » Sat Jun 02, 2007 8:57 am

Ahh, I see- I installed the WIP installer first then Codeblocks after, as I normally use Eclipse as my IDE. It's all working now though =)
starlight
DCEmu Newbie
DCEmu Newbie
Posts: 4
Joined: Sat Jun 02, 2007 12:02 am
Has liked: 0
Been liked: 0

Re: Cygwin and code::blocks. A dream becomes reality.

Post by starlight » Sun Jun 03, 2007 10:10 pm

So far the WIP is making good progress, its straightforward to setup and actually builds all of the kos examples I have out of the box (I had attempted to build the chain on Linux but it proved to be very difficult on a modern distribution) and this seems to be an ideal solution.

There does seem to be issues with the included SDL stuff so far though. Headers and libraries exist, but they are in the wrong places which cause compiling and linking errors. Also, it includes the headers for SDL_ttf, and the source for it, but the actual library file is not built like the rest of them are.

I've been writing some SDL stuff for linux and it caught my attention that DC has SDL, and I wanted to try an experiment with getting my code running on DC, but I'd been rather discouraged trying to build the chain on a modern distro, this has atleast gotten a base environment up and running for me, keep up the good work =)

Edit: also, what is the reasoning behind the --nostdlib option? Can this package not use the standard library?
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has liked: 0
Been liked: 0
Contact:

Re: Cygwin and code::blocks. A dream becomes reality.

Post by emptythought » Sun Jun 03, 2007 11:20 pm

also, what is the reasoning behind the --nostdlib option? Can this package not use the standard library?
Well I don't know for certain. I do remember there were some issues if the flag (or one like it) wasn't set...

I'll get a bug fixed release out which will address the issues mentioned... but other than that, I think that's all there is to release... I was hopeful to get the wrappers working on Windows... that's probably not likely to happen. The arm toolchain isn't setup... I hope someone else can take a look at the configuration -- I would like to get custom makefiles to work with all the global KOS environment variables...

Code::Blocks is probably at lot more worry-free on Linux I assume -- you can probably set the global DC dev variables "active" somehow when Linux boots up... not really that simple on Windows, at least not that I know. But again, the custom makefiles is something more to look into.
Post Reply