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.

Beginners > Setting up DevKitArm with Codeblocks (or any IDE)

#54273 - yaustar - Sat Sep 17, 2005 12:43 pm

http://www.codeblocks.org/

I would like to use this IDE to do my GBA development as it seems to be more feature rich then DevCpp but less complicated to use then Eclipse but am not sure on the steps to configure a compiler to this IDE.

At the same time, I was also wondering if there was a generic proceedure to for setting up a compiler to any IDE.

Cheers

#55080 - biubid_boy - Sun Sep 25, 2005 7:10 am

I'm probably wrong, but i think you can use Code::Blocks and devkitAdv with a makefile.

#55086 - wintermute - Sun Sep 25, 2005 9:16 am

biubid_boy wrote:
I'm probably wrong, but i think you can use Code::Blocks and devkitAdv with a makefile.


1. You are wrong.
2. The question was about devkitARM

#55089 - wintermute - Sun Sep 25, 2005 10:15 am

yaustar wrote:
http://www.codeblocks.org/

I would like to use this IDE to do my GBA development as it seems to be more feature rich then DevCpp but less complicated to use then Eclipse but am not sure on the steps to configure a compiler to this IDE.

At the same time, I was also wondering if there was a generic proceedure to for setting up a compiler to any IDE.

Cheers


Unfortunately CodeBlocks doesn't currently allow for custom makefiles. You can of course configure external tools and use make that way but it doesn't capture the error output making it next to useless.

http://forums.codeblocks.org/index.php/topic,907.0.html

I tried setting up a gba project but it's rather convoluted and not really very flexible.

  • Click Settings->Compiler
  • Select the GNU GCC compiler
  • Click Copy
  • Set the name of the new compiler to devkitARM
  • Click the programs tab
  • Select the install directory of devkitARM
  • Rename all the tools to arm-elf-* except make, name that make.exe
  • Click Project->New Empty Project
  • Browse to to directory containing your source files, name the project & save
  • Add your source files
  • Click Project->properties
  • Click the target tab
  • set the output filename to <your target>.elf and click OK
  • Click Project->Build Options
  • In the linker tab add gba to the link libraries (assuming you're using libgba)
  • In Other Linker Options add -mthumb -mthumb-interwork -specs=gba.specs
  • Click the Directories tab
  • in the compiler tab in the bottom box add <path/to>/libgba/include
  • in the linker tab in the bottom box add <path/to>/libgba/lib
  • in the commands tab, in the post-build steps, add arm-elf-objcopy -O binary <your target>..elf <your target>.gba


With that all done you should be able to hit ctrl F9 and build a gba file.

Alternatively just use Programmer's Notepad provided with the devkitPro installer & let it use the makefiles provided in the examples. The devkitPro installer sets it up so that ALT 1 runs make, ALT 2 runs make clean.

#55236 - yaustar - Mon Sep 26, 2005 8:46 pm

Cheers for that... I was hoping it be a little more flexiable in terms of options.. :/