Adapting Code::Blocks IDE for ARM Development

This brief guide can be followed after the ARM-GCC toolchain is setup. For instructions to setup the ARM-GCC toolchain, refer to the “Setting up the ARM-GCC Toolchain on Windows” page of this site.

I recently found perhaps the only other suitable IDE for Windows named Code::Blocks. Unlike Eclipse, it’s slim, fast and native. Like Eclipse, it’s highly configurable and can be used with GCC. In addition, Code::Blocks can be easily used with GDB to debug your code (major factor in choosing another IDE). This is good to use later with OCDRemote/gcc to debug your ARM code (although I haven’t configured it, yet.)

So here are the instructions for setting up the Code::Blocks to work with the ARM GCC toolchain. To do this, all that needs to be done is configuring Code::Blocks to use an external Makefile, but finding the location of these settings took a rather long time.

Screenshot:
Code::Blocks IDE

Step One - Create a New Project
Since none of the included project templates really fit for ARM GCC development, it’s easiest to start out by making a new blank project. So do this by clicking on the “Project” menu, then “New empty project”. Save the project in the folder of your project, where you plan to hold the code.

Code::Blocks New Empty Project

You will see several window panes in the IDE. I will briefly describe them here:

Step Two - Configure Build Settings
The next step is to setup Code::Blocks to use an external Makefile instead of automatically and directly calling GCC.

Click on the “Settings” menu, then “Compiler”.
1. Keep your Selected Compiler as the “GNU GCC Compiler”. 2. Click on the “Other” tab. 3. Change “Build Method” to “Work with Makefiles (GNU ‘make’ is required)”. 4. Click “OK” to close the window.
Code::Blocks Compiler Settings


Next the path of the Makefile must be defined. Click on the “Project” menu, then “Properties”.

1. Type the name of the external Makefile (given it is in the same directory as where the project is saved, if not, modify the path revelant to the project file or provide an absolute path) in the “Makefile:” textbox. 2. Check the “This is a Custom Makefile” checkbox. 3. Click “OK” to close the window.
Code::Blocks Project Options


Here is a list of several features Code::Blocks features which you can further configure if you please:

Code::Blocks Messages Pane Thumb

Print This Page Print This Page