Visual studio with Winavr

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

At the risk of being branded a heratic, I'll like to say that I prefer the MS Visual studio for my editing. I have PM, & source contol. I have set up studio to use winavr gcc, and external "make". Everything works ok. Except does anybody know how to get a "click on error" to cause the editor to jump to the correct line of code. It looks like I need a bsc file. I can generate this with BSCMAKE if the gcc complier could emit a .sbr file. Can it do this? I couldn't find any info with a google search.
Thanks all

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I also use MSVS for my IDE It has a lot of features I find very useful. If you figure out how to make it go to errors please post for the rest of us.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

colin17814 wrote:
At the risk of being branded a heratic, I'll like to say that I prefer the MS Visual studio for my editing. I have PM, & source contol. I have set up studio to use winavr gcc, and external "make". Everything works ok. Except does anybody know how to get a "click on error" to cause the editor to jump to the correct line of code. It looks like I need a bsc file. I can generate this with BSCMAKE if the gcc complier could emit a .sbr file. Can it do this?

Remember, the GCC compiler comes from the Unix-ish world of GNU. So, of course it won't emit a .sbr file as that is strictly an MS thing. There are a host of other editors out there (besides PN) that can probably provide you with what you want. Perhaps you can broaden your horizons. :)

Last Edited: Thu. May 20, 2004 - 03:22 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK I figured it out:
Msdev just requires the error messages to be in a format of XXX.c(line#):
where www is the file name.
I used a passer that you can pipe the stderr from gcc through to put it in the correct format.

Place the attached file in your Winavr/utils/bin directory

Modify make file to pipe stderr out
$(CC) -c $(ALL_CFLAGS) $< -o $@ 2>&1 | gnu2msdev

and voila

I have the source if any one is interested.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for figuring it out!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm unclear on the makefile modification. Where would this line be placed?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I used the sample makefile with the Winavr release. There should be a definition for making the object files :

# Compile: create object files from C source files.
%.o : %.c

@echo
@echo $(MSG_COMPILING) $<
$(CC) -c $(ALL_CFLAGS) $< -o $@

Add the pipe to the end of the compile command

# Compile: create object files from C source files.
%.o : %.c

@echo
@echo $(MSG_COMPILING) $<
$(CC) -c $(ALL_CFLAGS) $< -o $@ 2>&1 | gnu2msdev