Aug 10, 2009

Galileo, NetBurner and the STL

It seems most people doing embedded work haven't fully embraced C++ over C and when they do they mostly write C and compile it with the C++ Compiler. I do many projects with 32 bit based NetBurner products. These processors have enough memory and horsepower that I feel comfortable taking full advantage of all that C++ has to offer, including the Standard Template Library. I was hoping the  Content Assist feature of Eclipse would obviate the need for keeping an STL reference book on the speed shelf. The good news is it does, the bad news is it requires a little help to get it going.



I use the Galileo version of Eclipse (which is the latest as of this writing Aug/2009). The NetBurner Development kit ships with a customized version of Eclipse based on Ganymede. Their customized versions always cause problems with the plug-ins I like to use. Since they now distribute the NetBurner specific items as plug-ins it a simple matter to copy over the NB plug-ins to my standard Eclipse installation.

Getting the Content Assist to work with the STL required setting up the correct include paths. In Galileo this starts with the Project->Properties menu. Select Path and Symbols on the left, and select the C++ Source Files. Click the Add button followed by the File System button and then navigate to the C:\NBurn\gcc-m68k\m68k-elf\include\c++\4.2.1  folder as shown in the picture
.








Following a suggestion on the NetBurner forum from fanat9 I also adjusted my Eclipse memory settings as shown in the images.





Then modify the eclipse.ini file which you will find in the same folder as your eclipse.exe file.









Update 12/9/2009
While the above helped for some STL components I still had some problems with things like <map> and <iostream>. Fanat9 again came to the rescue and it seems at a minimum a couple of more paths are needed as shown in the following image.
image

Don’t forget to rebuild indices after adding the new paths. Right click on the project and select the option as shown below
image

About Me

My photo
Tod Gentille (@todgentille) is now a Curriculum Director for Pluralsight. He's been programming professionally since well before you were born and was a software consultant for most of his career. He's also a father, husband, drummer, and windsurfer. He wants to be a guitar player but he just hasn't got the chops for it.