GP32 which editor for devkitadv


motten37

Still Fresh
Joined
Dec 26, 2003
Messages
30
Hi all,

any recomendations for a good editor to use with devkitadv ?

I'm just starting to get into programming for the gp32 - I'm new to c and c++ as well, though I've done quite a bit of java and other stuff.

Anyways - I'm currently using Dev-C++ v. 4 with is ok'ish though I've no idea how to set it up to use the right compiler etc.
Right now I just edit with it and use the approach described in Ricos tutorial for compiling.

So, can anyone give me a few hints setting up Dev-C++ or maybe recomend another editor that would make life easier ? I have access to a legal Visual Studio license at work if that's the way to go ?

Great tutorial btw Rico - very helpful to a total gp32 / c newbie like me...

Cheers

/motten
 
I also use Dev-C++ but with modified compiler
settings. With the devkitadv compiler / lib.

With my new settings I could compile with the compile
button in the menu. At the moment I stil have problems
with thy cygwin environment. So I have to place a
hand made Makefile in every project.

I found the tutorial to configure Dev-C++ for the
ARM as target on
http://www.bloodshed.net/dev/doc/index.html
-> Section Tutorials
-> Configuring Dev-C++ for targetting ARM
 
i'm using kdevelop as I am programming in C++. but I can also strongly recommend vi!
 
Vi is cool, good if you got a cheat sheet ;)

but i use sc1 myself at the moment.
 
I use Visual Studio 7.1 as the front end to GCC (All DevKitAdv is really) and I wrote a crude little app to translate GCC errors into a format Visual Studio can understand.

That way after I added a custom menu with things like 'Project Build', 'Project Clean' etc. linked to my build scripts I now have a IDE that launches the compiler and gives me any errors in a 'click to jump to source' style.

Very nice to work with considering that I could not use Visual Studio for any ARM development otherwise.

I like Dev-C++ but it used to crash to often for my tastes.
 
Interesting DJWillis...is there any possibility Visual Studio .NET could be configured for GP32 development? Currently I am using .NET as my editor, with various batch files for actual compiling. It would be nice to integrate everything. Would VS C++ 6.0 be more configurable?
 
Interesting DJWillis...is there any possibility Visual Studio .NET could be configured for GP32 development? Currently I am using .NET as my editor, with various batch files for actual compiling. It would be nice to integrate everything. Would VS C++ 6.0 be more configurable?
generalnmx,

There is no way you could ever get MS's Win32 compiler to output ARM code ;). You could possabily get Embeded VC++ working but that would be lots of evil hacks.

All I really use is VS.Net and batch files/scripts. About the best you can get is adding the batch files/scripts to a menu, setting the output to display in the colsole output window in VS.Net then parseing it to make MS compatable error codes. I'll upload a screenshot that shows what I mean as soon as I can get into my web space.
 
Last edited by a moderator:
DJWillis, I think that's what he meant :) I did the same thing with a couple of 'Tool' buttons, and just let the error messages appear on the box at the bottom.

Nano however is a very nice little editor. Much like MS-DOS EDIT but GNU!
 
Rico, generalnmx,

Sorry guys, having a slow day ;).

Rico, I'll check that editor out. I LOVE DOS edit :D.

generalnmx,

The code below is NASTY but if you build it in a Win32 compiler (i.e. VC++ as a console app) it will give you a parser that you can throw GCC style messages at and get MS style ones out the other end. Ideal for making use of the 'jump to line' features of VS.

I based it on some notes/code I found years ago but I can't find the site now :(. I'll try and dig it out.

Just pipe your output to it from the make file like this example...

%.o : %.cpp
-$(CXX) $(C++FLAGS) $(ADD_FLAGS) -c $< -o $(@F) 2> $(TMP)\ccerr.txt
@type $(TMP)\ccerr.txt | gcc2vs


Code:
/////////////////////////////////////////////////////////////////////////////
//
// Quick and dirty C hack for getting GCC messages parsed into a format MSVS
// can understand.
//
// Build this with you favourite Win32 console compiler.
//
// Takes GCC message on stdin and passes MSVS message on stdout
//
// Made by John Willis (John.Willis@Distant-Earth.co.uk).
// Based on notes and code by François Pertin.
//
// I use this for C/C++ GCC ARM development but it should work for any GCC 
// development (In any language?)
//
/////////////////////////////////////////////////////////////////////////////

//************************************************************* DEFINES *****

#define _MAX_LINE_LEN 300
#define _SEPS ":"
#define _FROM " from "

//************************************************************ INCLUDES *****

#include <stdio.h>
#include <string.h>

//****************************************************** MAIN FUNCTIONS *****

static char _line[_MAX_LINE_LEN];
static char _tmp[_MAX_LINE_LEN];

int _isNum (char *x_str)
{
	size_t l_i;

	// ~FOR 
	for (l_i=0;l_i<strlen(x_str);l_i++)
	{
  //  ~IF 
  if ( !((x_str[l_i] >= '0') && (x_str[l_i] <= '9')) )
  { //  ~THEN 
  	return 0;
  } // ~ENDIF 
	} // ~ENDFOR 

	return 1;
}

int main (int x_argc, char *x_argv[ ] )
{
	FILE *l_in,*l_out;
	char *l_file;
	char *l_num;
	char *l_end;
	char *l_from;
	int l_ret;

	if (x_argc > 1)
	{
  fprintf (stderr, "No arguments. This uses stdin, stdout\n");
  return 1;
	}

	l_in = stdin;
	l_out = stdout;

//	fputs("coucou\n",l_out);
	l_ret = 0;
	while( fgets(_line,_MAX_LINE_LEN,l_in) )
	{
//  printf ("*%s", _line);
  strcpy (_tmp, _line);
  l_file = strtok( _tmp, _SEPS);
  //  ~IF 
  if ( l_file != NULL )
  { //  ~THEN 
//  	printf ("*file: %s\n", l_file);
  	l_num = strtok( NULL, _SEPS);
  	//  ~IF 
  	if ( l_num != NULL )
  	{ //  ~THEN 
    l_end = strtok(NULL, "");
//    printf ("*num: %s\n", l_num);
    l_num = strtok(l_num, " ");
    //  ~IF number
    if (_isNum (l_num) == 1)
    { //  ~THEN 
//    	printf ("*is num\n");
    	l_from = strstr (l_file, _FROM);
    	//  ~IF 
    	if ( l_from == NULL )
    	{ //  ~THEN 
      strcpy (_line, l_file);
      strcat (_line, "(");
      strcat (_line, l_num);
      strcat (_line, "): ");
      //  ~IF 
      if (l_end != NULL)
      { //  ~THEN 
      	strcat (_line, l_end);
      } // ~ENDIF 
      //  ~IF 
      if ( strstr (_line, "warning:") == NULL )
      { //  ~THEN 
      	l_ret = 1;
      } // ~ENDIF 
    	} // ~ENDIF 
    } // ~ENDIF 
  	} // ~ENDIF 
  } // ~ENDIF 

  fputs(_line,l_out);
	}

	return l_ret;
}
 
I based it on some notes/code I found years ago but I can't find the site now . I'll try and dig it out.

Just pipe your output to it from the make file like this example...

%.o : %.cpp
-$(CXX) $(C++FLAGS) $(ADD_FLAGS) -c $< -o $(@F) 2> $(TMP)\ccerr.txt
@type $(TMP)\ccerr.txt | gcc2vs

How do you use the "make" command work with the Visual Studio output window? I keep getting a "Win32 Error 6" from make.

I've tried converting everything to batch files, but for some reason the > and >> pipes aren't working in XP (or at least with the gcc compiler).

[EDIT]
OK, 2>> works with the gcc compiler. I've given up on make and put everything in batch files. Works fine now, and it's actually faster. I can post the batch files if anyone is interested - they're basically a port of devkitadv makefile.

[/EDIT]
 
Back
Top