Code::Blocks and devkitARM

support for the ARM toolchain
Rexhunter99
Posts: 23
Joined: Thu Sep 09, 2010 1:28 pm
Location: Australia
Contact:

Code::Blocks and devkitARM

Post by Rexhunter99 » Thu Sep 09, 2010 1:52 pm

Hi, I'm an intermediate C++ programmer and like working with OpenGL and Win32 & COM, I have fiddled around with libnds before and made a few homebrew samples from tutorials and modified them and such but now I'm sick of having multiple IDEs :/
See I use Code::Blocks for everything, my MSVC++ projects even run in it. I managed to get the devkitPPC to run with Code::Blocks and now want to get ARM going in it.

Now I copied and modified the GNU GCC ARM compiler settings, renamed them so I could find the DS version quickly and set up the toolchain to use the binaries in "C:\devkitpro\devkitARM\bin\" And I now have my environment spitting out what seems to be a valid .ELF file (at around 63kb) and I poked around the binaries folder and checked some makefiles but couldn't figure out how the .elf is turned into a .nds. If someone could help me out in figuring out where to go from the .elf that'd be much appreciated. Or if I could get some help using the makfiles in CodeBlocks (just whacking the makefile in my project folder and telling CodeBlocks to use it in the Project Properties doesn't work, and I have tried changing a few options here and there.
Move over Mario... and cruise by Crash... Croc Rocks!
It's a serious adventure 3D platformer for all retro gamers to drool over =D

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: Code::Blocks and devkitARM

Post by zeromus » Thu Sep 09, 2010 6:57 pm

C:\devkitPro\devkitARM\ds_rules

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Code::Blocks and devkitARM

Post by WinterMute » Thu Sep 09, 2010 10:33 pm

Unless Code::Blocks finally allowed you to use a custom makefile I'd give in and look for something else - I just had a look at the latest release and it's unfortunately basically unusable on OSX.

I've been having reasonable success playing with CodeLite though, I'm probably going to start using that as the default editor with the devkitPro toolchains once I get time to set up templates for it.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Rexhunter99
Posts: 23
Joined: Thu Sep 09, 2010 1:28 pm
Location: Australia
Contact:

Re: Code::Blocks and devkitARM

Post by Rexhunter99 » Sat Sep 11, 2010 9:10 am

WinterMute wrote:Unless Code::Blocks finally allowed you to use a custom makefile I'd give in and look for something else - I just had a look at the latest release and it's unfortunately basically unusable on OSX.

I've been having reasonable success playing with CodeLite though, I'm probably going to start using that as the default editor with the devkitPro toolchains once I get time to set up templates for it.
The latest CodeBlocks does allow custom makefiles but when I link the makefile to the CBProject for the NDS game the ARM compilers throw off some of the most rediculous errors like certain functions being redefined several times or not existing at all.
Move over Mario... and cruise by Crash... Croc Rocks!
It's a serious adventure 3D platformer for all retro gamers to drool over =D

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Code::Blocks and devkitARM

Post by WinterMute » Sun Sep 12, 2010 1:47 am

It would be helpful if you told us what the errors were and which Makefile you're using.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Rexhunter99
Posts: 23
Joined: Thu Sep 09, 2010 1:28 pm
Location: Australia
Contact:

Re: Code::Blocks and devkitARM

Post by Rexhunter99 » Mon Sep 13, 2010 4:33 am

WinterMute wrote:It would be helpful if you told us what the errors were and which Makefile you're using.
Yes I know but I haven't generated the error that I was getting at the time (getting all new errors now after I twiddled with the settings a little)
Here's the most recent spit out:
-------------- Build: Release in Croc-1-DS ---------------

Using makefile: Makefile
0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x71110000, RegionSize 0x160000, State 0x10000
C:\devkitPro\devkitARM\bin\make.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
The other one was something along the lines of "No rules for build target "Release""

I'll try and get it again.
Move over Mario... and cruise by Crash... Croc Rocks!
It's a serious adventure 3D platformer for all retro gamers to drool over =D

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: Code::Blocks and devkitARM

Post by zeromus » Mon Sep 13, 2010 5:35 am

folks seem to be solving issues like that by running the IDE as administrator. check around the forums and the web..

Rexhunter99
Posts: 23
Joined: Thu Sep 09, 2010 1:28 pm
Location: Australia
Contact:

Re: Code::Blocks and devkitARM

Post by Rexhunter99 » Mon Sep 13, 2010 8:29 am

zeromus wrote:folks seem to be solving issues like that by running the IDE as administrator. check around the forums and the web..
I have to run it as administrator or the application just hangs in the CPU cores :/ that and it has to be in WinXP Pro SP2 compatibility mode (I run a Windows 7 Home Premium x64 machine)

By the way, I got the other error:
-------------- Build: Debug in basic_sound ---------------

Using makefile: Makefile
dev_make.exe: *** No rule to make target `Debug'. Stop.
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings
Move over Mario... and cruise by Crash... Croc Rocks!
It's a serious adventure 3D platformer for all retro gamers to drool over =D

User avatar
Izhido
Posts: 107
Joined: Fri Oct 19, 2007 10:57 pm
Location: Costa Rica
Contact:

Re: Code::Blocks and devkitARM

Post by Izhido » Mon Sep 13, 2010 3:43 pm

Hey... since you already stated that you're using Win7 x64, well, you might consider replacing Code::Blocks with Visual C++ Express 2010. Royalty free, and it works wonderfully. Only problem I see with it (and that's only because I do not know how to configure it), is Intellisense, since it usually warns about stuff that doesn't fit with their own C++ compiler. Apart from that, it works fine. Highly recommended.

User avatar
vuurrobin
Posts: 219
Joined: Fri Jul 11, 2008 8:49 pm
Location: The Netherlands
Contact:

Re: Code::Blocks and devkitARM

Post by vuurrobin » Mon Sep 13, 2010 8:16 pm

I'm not sure what you all have done, so I'll list everything that you need to do from a new project.

1. from a new project, first remove the default code file. then copy paste the makefile, source dir etc from one of the examples to the project dir and add them in codeblocks.
2. goto project -> properties and select "this is a custom makefile" and make sure the name of the makefile is right.
3. goto project -> build options... -> "Make commands" and remove the $target part from "build project/target" and "clean project/target". this does mean you can't use targets, but thats just as it is.

that should be enough to compile it. I haven't found out to directly execute it but that wasn't really necisairy for me.


as for visual studio:
http://www.charlespetzold.com/etc/DoesV ... eMind.html

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests