gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > IDE of choice? and how?

#159233 - Holland - Fri Jun 27, 2008 10:06 pm

Just curious what IDE people are using. I suppose this is a general question but I'm more curious in your IDE of choice for NDS development.

I recently got interested in NDS homebrew...I have had some GBA experience in the past as well as many years of C and C++ programming experience. I went and got devkitARM with the ndslib...but using Programmers Notepad is a nightmare!! I'm also not a huge fan of coding in one environment and then switching to commandline to make.

I attempted this article in order to get VS2008 to work, but I had no success. The article is for VS2005, but I hoped it would be about the same. I can use VS to compile and check for syntax errors, but it won't produce the .nds for me and it doesn't seem to care much about linking since it doesn't complain about false .h includes. I still have to go to command line and "make" if I want a .nds file.

So what IDE are you all using and did you use a tutorial to make it compile for you? I'd be interested in using VisualHAM if VS2008 is a no-go.

Thanks for the time!

#159234 - kusma - Fri Jun 27, 2008 10:13 pm

I'm not using an IDE for GBA/NDS development, I use UltraEdit and MSys.

#159235 - DensitY - Fri Jun 27, 2008 10:17 pm

I used a tutorial similar to the one you linked to get devkitpro working for me in Visual studio.

I use Visual Studio 2005 Professional *smells something burning in his pocket*, I use it simply because its what I use at work all day and everything else I write (on pc) I use visual studio 2005 so its really a big coding partnership.

I haven't used any other IDE for DS development.

#159237 - Dwedit - Fri Jun 27, 2008 10:42 pm

For compiling with devkitpro, I use Textpad. I have MAKE set up as a tool, so I just click it, then it pops up a build log at the bottom, and I can double click compiler errors to instantly get there in the file! Cool stuff.

For the benefit of other textpad users, my tool configuration for Make:
Code:

Command:
C:\devkitpro\msys\bin\bash
Parameters:
--login -c "cd $unixdir/../; exec make"
Initial Folder blank
only "Capture Output" checked
Regular Expression to match output:
^\([a-zA-Z]:?[^:]+\):\([0-9]+\):
File as register 1, Line as register 2

Note that this assumes the makefile is one folder below the current loaded file. If you don't want that, get rid of the /.. in the parameters.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#159240 - Holland - Fri Jun 27, 2008 11:05 pm

@DensitY: I'd be interested in reading the tutorial you used if you remember where you found it. The one I linked didn't work out for me...not sure why.

@Dwedit: Thanks...I got this working.

#159243 - silent_code - Fri Jun 27, 2008 11:42 pm

I'm using Code::Blocks. It's free, fully configurable (you don't have to, though) and easy and comfortable to use.

Btw: I use the same IDE for both PC and NDS programming, with no changes. ;^)
_________________
July 5th 08: "Volumetric Shadow Demo" 1.6.0 (final) source released
June 5th 08: "Zombie NDS" WIP released!
It's all on my page, just click WWW below.

#159245 - thesean - Sat Jun 28, 2008 12:26 am

I use VS 2005 and I think it's great, I've also used Bloodshed Dev C++ before and liked it as well. If you're having trouble getting VS 2008 to work with devKitARM this might be of service:

http://www.auby.no/wiki/index.php?title=VS_2008

#159246 - Holland - Sat Jun 28, 2008 1:14 am

I finally got it to work with VS2008. Now I'm hoping to find a way to turn this into a template or a project type that I can select. I'd much rather be able to go to New->Project->NDS Project as an option that will start a project up with these build and debug options by default.

#159249 - Holland - Sat Jun 28, 2008 2:42 am

silent_code wrote:
I'm using Code::Blocks. It's free, fully configurable (you don't have to, though) and easy and comfortable to use.

Btw: I use the same IDE for both PC and NDS programming, with no changes. ;^)


I did a bit of research on Code::Blocks. I like it I think, but i'm curious as to how the debugging works. I know the way I have VS set up I get full intellisense and full compile support, but I have no way of debugging. If I wanted to debug I'd have to do it through a secondary app (i.e. insight).

#159253 - gauauu - Sat Jun 28, 2008 3:49 am

I go back and forth between eclipse, and using gvim. It's like polar opposites: eclipse is heavy, but does everything for you. gvim is slim and wonderful, but I'd hardly consider it an IDE.

#159256 - Holland - Sat Jun 28, 2008 4:16 am

gauauu wrote:
I go back and forth between eclipse, and using gvim. It's like polar opposites: eclipse is heavy, but does everything for you. gvim is slim and wonderful, but I'd hardly consider it an IDE.


yeah..i gave gvim a look. that was immediately followed by nightmares of messing with vi a few years back. haha.

i've managed to get Visual Studio 2008 setup with a project template that loads up a simple "hello world" program and has all the build options set up. Only thing I have left to do at this point is figure out how to link debugging up to insight and dualis.

i don't think visual studio is set up to debug for ARM so i need to send it to insight when i build in debug. right now i have it set up now to load the .nds in dualis when i build in debug...but that's hardly debugging.

#159259 - .crazyninja. - Sat Jun 28, 2008 6:28 am

I use Visual Studio 2005 for NDS development, I followed CoderJoe's tutorial to set it up with devkitarm makefile. I get the make output and compile errors in different windows. I have to say that VS is very hard to beat in terms of easy of use and simplicity. Even intellisense works well with makefile projects.

I debug the build with no$gba, which is started directly from VS toolbar. Software breakpoints and debug messages both make debugging a brease with no$gba.

Plus, I use VisualSVN for version control. I have my local source code on my laptop and an subversion repository on an external usb hdd. Can't be too safe with source code. Refer to this article to install VisualVSN in Visual Studio.

Want to see what it looks like? take a look at my 1920x1200 VS setup in action!

cheers

#159265 - silent_code - Sat Jun 28, 2008 11:04 am

Well, debugging is an entirely other world than on the PC.
no$gba sounds like it is a great help, but Martin still doesn't respond (I mailed him because I wanted to order the debug version of no$gba) and I there's no way you can get anything but the free version of the emulator.

But even the free one has a very helpful feature: the F3 error counter!
Basically it gives you a rough idea of how buggy your program is and if you break execution at one potentially problematic line, hit F3, find no errors (or 1 standard error I get plus 11 errors that fatDefaultInit() causes - which all are no problem at all), continue execution, hit F3 and you see an increase in errors, you have a very basic (and not totally efficient) debugging system.

There have been some sources and stubs released around this forum. They include wifi debugging (I think it was simonjhall who release his implementation, as well as his profiler. I'm positive about the latter, but unsure about the first one.) and debug output in emulators (don't know who released it.)

I haven't used any of them, yet, so I am less of an help then I'd like to. Sorry.


Btw: It's really easy to set up a template in Code::Blocks. Simply make a new projct that contains all the settings and files (like the makefile) you need and you can create a template right away by clicking "File" -> "Save project as user-template", done.

Also make sure, you create compiler settings for the ARM gcc (devkitARM), simply by dublicating the default gcc settings and selecting your devkitARM folder (and selecting make form msys/bin.)

PS: You can also start batch files directly from C::B by double clicking them (they have to be included into the project, just like every "usual" file and set to "open with assosiated... " something :^p , when asked, which is a one time procedure.)
_________________
July 5th 08: "Volumetric Shadow Demo" 1.6.0 (final) source released
June 5th 08: "Zombie NDS" WIP released!
It's all on my page, just click WWW below.

#159267 - fluff - Sat Jun 28, 2008 12:00 pm

I'm using Visual C++ 2008 Express and loving it (though intellisense isn't _always_ working perfectly for me. Any ideas on why? I suppose it could be just good old intellisense buggery. It's been known to happen...).

There's a great nds project template wizard for it made by Rodrigo Sieiro. You can get it, along with instructions on how to set it up, at http://www.palib.info/wiki/doku.php?id=day1
under the heading "Installation". It was originally made for VS 2005 so you have to change a couple of lines to make it work with 2008. It's all explained on that page though.

The wizard is intended for PAlib projects but it's very easy to customize it to include whatever files you want in the project.

Great. I just noticed you'd actually gotten templates working already. :D Oh well, maybe it will help someone else...

#159286 - Holland - Sat Jun 28, 2008 6:47 pm

@fluff: yeah..only took an entire day but I finally got a template set up in VS2008 as well as got it compiling. Still don't have any solid way to debug. I used to debug with insight when I was doing GBA homebrew stuff...might have to try and hook that up through VS.

#159287 - fluff - Sat Jun 28, 2008 7:22 pm

I never really got started with using emulators for debugging. They seemed incompatible enough that I didn't put much effort into it either...

Much better to do your debugging on the real thing imho. But then again, I'm a simple man content with trace messages as my only debug tools.

I'm putting the finishing touches right now on a little dev lib with support for downloading a new .nds file off a web server and booting it (using rebootlib), all from within your app. Takes about 10 seconds to download and run a new version. Makes my day. :)

#159288 - Holland - Sat Jun 28, 2008 7:29 pm

I can put the .nds on my R4 and boot it up on the hardware, but that's pretty time consuming. I wouldn't mind an app that let me boot via wifi or even just sync up to a folder on my desktop SVN style.

#159355 - M3d10n - Sun Jun 29, 2008 7:02 pm

It would be amazing if Lino implemented GDB support in iDeaS. The latest versions are almost on par with no$gba in compatibility (if not better in a few areas) and performance (it's a little slower but looks much better than nocash's fast renderer).

Currently iDeaS has a basic debugger which allows you to break execution and step through the instructions. It's useful to grab offending addresses and throwing them into arm-eabi-addr2line.exe to figure out where the crashes are coming from.

#159384 - dovoto - Mon Jun 30, 2008 1:12 am

You can try the beta of my VS wizard for devkitpro toolchains. It supports ds, gba, cube, and wii. It pulls the source out of the official devkitpro example templates so should need minimal updating.

Last i checked it worked on 2k5 2k8 pro team and express (however it might need a one line modification for 2k5 but the forum topic should cover it)

http://forum.gbadev.org/viewtopic.php?t=14788&highlight=wizard
I suppose i should make a page for this but at some point this will be integrated with the devkitpro install.
_________________
www.drunkencoders.com

#159386 - Holland - Mon Jun 30, 2008 1:50 am

dovoto wrote:
You can try the beta of my VS wizard for devkitpro toolchains. It supports ds, gba, cube, and wii. It pulls the source out of the official devkitpro example templates so should need minimal updating.

Last i checked it worked on 2k5 2k8 pro team and express (however it might need a one line modification for 2k5 but the forum topic should cover it)

http://forum.gbadev.org/viewtopic.php?t=14788&highlight=wizard
I suppose i should make a page for this but at some point this will be integrated with the devkitpro install.


oh wow! where was this a few days ago when i was struggling to get vs up and running? lol...

i'll give this a try now!

#159413 - 0xtob - Mon Jun 30, 2008 1:43 pm

On Linux, I think Eclipse is the best choice for DS development, or development of any kind. The C++ code completion has become very fast and powerful. You can add your Makefile's targets to your project so you can easily build and install your project from within the ide.

And it's very very easy to set up: Just make a new non-managed c++ project using the "other toolchain" template and set the project folder to where your source is. In the project settings you may need to set the DEVKITPRO and DEVKITARM environment variables, and that should be it.

Also, I have a handy Makefile target:
Code:
install: $(TARGET).nds
    cp $(TARGET).nds /media/R4
    pumount /media/R4

_________________
http://blog.dev-scene.com/0xtob | http://nitrotracker.tobw.net | http://dsmi.tobw.net

#159432 - tepples - Mon Jun 30, 2008 7:50 pm

0xtob wrote:
Also, I have a handy Makefile target:
Code:
install: $(TARGET).nds
    cp $(TARGET).nds /media/R4
    pumount /media/R4

And I use a similar target in Windows. From the Lockjaw Tetromino Game dsmakefile:
Code:
#ejector is at http://jimprice.com/jim-soft.shtml#eject
#and is not necessary for building the program
cf: lj.nds
   cp lj.nds /h/
   ejector H:

_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.