Sudden issues with making new projects...

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

I have been working with AVR studio for over a year now, and all of the sudden I can't seem to even make a simple project and have it compile. Yet when I open my previous projects they work fine. I have a prototype program which I am going to do another revision on, so I copied the .c files created a new project folder pasted them in, added them to the source files/header files folders respectively and it keeps giving me errors on each of the .c files, yet I don't understand what the error is. So I created another simple project with just one source file, an put an endless loop in it and the same thing.

avr-gcc -mmcu=atmega88p -Wall -gdwarf-2 -std=gnu99 -DF_CPU=20000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT PP5_SafetyStop.o -MF dep/PP5_SafetyStop.o.d -c ../PP5_SafetyStop.c
avr-gcc -mmcu=atmega88p -Wl,-Map=PP5_SafetyStop.map PP5_SafetyStop.o -o PP5_SafetyStop.elf
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature PP5_SafetyStop.elf PP5_SafetyStop.hex
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex PP5_SafetyStop.elf PP5_SafetyStop.eep || exit 0
avr-objdump -h -S PP5_SafetyStop.elf > PP5_SafetyStop.lss

AVR Memory Usage
----------------
Device: atmega88p

Program: 76 bytes (0.9% Full)
(.text + .data + .bootloader)

Data: 0 bytes (0.0% Full)
(.data + .bss + .noinit)

Build failed with 5 errors and 0 warnings...

What I don't understand is what some of those error messages mean, avr-gcc is not liking something, but not sure what because all its telling me is that it couldn't build the object files and all that jazz...

I have 2 computers with Avr Studio 4 build 700(newest) with newest win avr, on XP-Pro SP3, both doing the same thing. The commonality is that my files are stored on a flash drive, but I tried doing everything locally thinking there was a corrupt memory segment, same problem. So I must be doing something wrong and gcc is telling me, but I don't understand what its telling me.

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

Quote:

What I don't understand is what some of those error messages mean, avr-gcc is not liking something, but not sure what because all its telling me is that it couldn't build the object files and all that jazz...

What you have pasted above does not show any errors except in the summary?!? The very fact that it created a .lss suggests the build actually succeeded so I don't know why Studio is reporting "5 errors" - looks like it's got itself confused somehow.

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

That's what I am so confused about, I have compared what it "reports" as errors, yet what gcc is showing is that it did built correctly, I have the original program with the exact same code just a different name and it has no issues at all, yet every time I try and create a new project now it doesn't work, even if I make a project with a single file its not working. I am so confused. Whats even more strange is that its doing the same thing on two completely different PC's, both XP SP3 with build 700 of studio 4(latest) and the latest win avr gcc compiler.

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

I solved the problem by using a much simpler project name, previously my naming schemes for folders and project files were using underscores and it had worked without issues, but for some reason when I named the project PP5_SafetyStop it threw fits, so I reduced the project name and folder name to PP5, copied the .c and .h files I am reusing into the PP5 folder, added them in inside avr studio to the project, compiled and it worked fine. I don't know why, but certain folder names it has issues with.

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

Quote:

I don't know why, but certain folder names it has issues with.

I think it's because Studio does not quote "" path/filenames then passes them to Unix style shells which will treat them differently to WinDOS

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

Another speculation: Studio doesn't check the exit code of make (bad Atmel programmers, bad!). Instead it scans / parses the messages from make to figure out if everything worked. Maybe some of the error indicators they look for is 'Stop'.

Stealing Proteus doesn't make you an engineer.

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

I just ran into that issue again, there must be certain keywords it just does not like, I had a function named Check_If_EStop(); and placed in a source file named EStop.c, it threw fits about that particular .c file yet everything else compiled just fine, it had 2 errors but there was no message about the errors, it just listed the compile results and had a red circle instead of a green one in front of the file that didn't compile correctly. I then changed to Stop.c, same thing, then changed it to E-Stop.c, same thing, finally I renamed the function to Check_If_ESTOP(); in all caps, and renamed the .c source file the function is located in to E-STOP.c and it compiled fine.

This is becoming aggravating to say the least. And I have no clue why gcc is being so screwy with naming source files and the folder names.

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

ThEThInG wrote:
This is becoming aggravating to say the least. And I have no clue why gcc is being so screwy with naming source files and the folder names.

It is not gcc, it is Atmel's AVR studio not looking for the exit code of make, but looking for keywords in the messages from make and gcc.

Stealing Proteus doesn't make you an engineer.

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

Yes, it seems to be a bug with AVR Studio and not with AVR Gcc.

Check the snap shot attached to this reply.

:( Some one has to report a bug.... I don't know how to report a BUG to AVRStudio to ATMEL :(

Attachment(s): 

ATMEL--Heart Beat
Nothing Impossible

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

Quote:
It is not gcc, it is Atmel's AVR studio not looking for the exit code of make

Maybe that part of the avr-gcc Studio plug-in was written by one of the FLIP programmers... :mrgreen:
Quote:
but looking for keywords in the messages from make and gcc.

...in the worst way possible, with like strstr(), rather than actually trying to find it in the correct position. Someone at Atmel needs to learn about regular expressions..

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]