Archive for December, 2005

ARM Development with Code::Blocks IDE

I was searching around for IDEs with GDB support I could potentially use on Windows, and I didn’t find many. There was of course Eclipse, which as you might know I really don’t like, there are a few small text editors that support invoking Makefiles, and then there was Code::Blocks. Code::Blocks looks really nifty. The setup is only 4mb, and it installed with no problems. My first impressions were that it was robust, capable of handling a wide variety of projects, and definitely configurable.

It defaults to using a specified compiler and on-the-fly writing of its own makefile based on your project. After messing around a bit, I found out in the faq how to set the IDE to use a custom makefile. Code::Blocks now calls a custom makefile with make and builds ARM project code perfectly (easily compiled the demo lpc2148 project).

The IDE, along with all of the standard features you would expect, supports debugging, specifically with GDB. This is very useful, and once I figure it out, it can be my complete replacement for the memory-eating Eclipse. I’ve been running Code::Blocks for a while now, and it is using under 10mb of memory. Code::Blocks’ GUI is built on the wxWidgets toolkit (cross-platform).

Soon I’ll post a guide to setting it up to use custom Makefiles, and when I figure it out, setting it up to use OCDRemote and gdb for ARM debugging.

Comments

Setting up the ARM-GCC toolchain and IDE…

Well, following the famous “ARM Cross Development with Eclipse Tutorial“, I setup the ARM-GCC toolchain and installed several other programs necessary to compile, flash and debug ARM code for my lpc2148 board.

I’ll start off by saying that Eclipse is a nasty piece of crap, no matter what you think. It shouldn’t take a 2.0ghz 1gig computer to edit a file and call a few programs. An IDE should be clean, simple, and fast (Eclipse lacking the latter). It’s Java, really. I don’t think that in today’s world the cross-compatibility is worth the performance it forgoes.

So, realizing half-way through the tutorial that in this embedded gnu environment Eclipse does nothing but essentially call make and take up 200megs of memory to edit main.c, I decided that I could use another tiny IDE I already happen to have installed, “Programmers Notepad“. This thing is packaged with WinAVR and I use it for my AVR projects. It’s nothing special, really, but it delivers almost everything you need in a notepad and fast IDE. WinAVR happened to configure it to have menu options to call make all, make clean, make program. Since I have the whole arm-gcc toolchain setup with the windows path, it can compile the demo ARM projects out of the box.

The next issue is debugging with gdb. This is the main reason eclipse is still installed, as it is currently my only option for using the whole ocdremote and arm-gdb setup. Although for the first part of my project debugging isn’t necessarily crucial, it might be necessary as the code becomes more complex. As for eclipse, I’m aiming to get rid of it altogether–Programmer’s Notepad is one step, but hopefully I can build an IDE entirely with vim. However, I don’t think I could build a fully functioning IDE with vim because integrating gdb might be impossible. Eclipse provides several built-in windows to watch the system registers and memory, but this doesn’t seem to feasible with vim alone. Maybe I should just use vim as my editor and compiling IDE, and then use some very light but capable gdb frontend, I dunno. As long as it’s not eclipse.

Comments

fp

This is my electronics and embedded development blog, just setup 12-30-05. The image at the top of the page is from one of the best movies, Office Space, obviously. The primary categories I have setup for my posts are AVR, ARM, and Misc. I’ll be posting updates to projects, very small projects in whole, or just general notes. Soon I’ll setup the ARM Microcontroller Matrix page which doesn’t have anything on it, yet. It will be a table (preferably sortable) of all of the existing [hobbyist] ARM microcontrollers. Hopefully it will inspire someone else to either copy the table or create a new one at the ARM microcontroller wiki, where it would be most useful. Other pages will include bigger projects I’m working on, with pictures/schematics/etc.

Comments