Recipe for target failed

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

I think I am having issues with the new Atmel Studio 7, but I am really not sure.  I am receiving 3 errors that I don't think should be present.

-  ld returned 1 exit status

-  recipe for target 'GccApplication1.elf' failed

- undefined reference to 'variable'

 

When I double click on the second error, the output I receive is:

 

$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) $(LINKER_SCRIPT_DEP)
    @echo Building target: $@
    @echo Invoking: AVR/GNU Linker : 4.9.2
    $(QUOTE)E:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="GccApplication1.map" -Wl,--start-group -Wl,-lm  -Wl,--end-group -Wl,--gc-sections -mmcu=atmega328p -B "E:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.98\gcc\dev\atmega328p"  
    @echo Finished building target: $@
    "E:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures  "GccApplication1.elf" "GccApplication1.hex"
    "E:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom  --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0  --no-change-warnings -O ihex "GccApplication1.elf" "GccApplication1.eep" || exit 0
    "E:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "GccApplication1.elf" > "GccApplication1.lss"
    "E:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "GccApplication1.elf" "GccApplication1.srec"
    "E:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-size.exe" "GccApplication1.elf"
   

I honestly have no idea what this all means.  It looks like gibber to me.  I would appreciate some help in the right direction.

Andrew

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

Somewhere in your code you have a reference to something named "variable", possibly with the 'extern' keyword. The actual definition of that is however not seen anywhere.

For us to say more, you need to show us code. Reduce to the minimal that displays the problem and post here.

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]

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

theaddies wrote:

I think I am having issues with the new Atmel Studio 7, but I am really not sure.  I am receiving 3 errors that I don't think should be present.

-  ld returned 1 exit status

-  recipe for target 'GccApplication1.elf' failed

- undefined reference to 'variable'

 

When I double click on the second error, the output I receive is:

 

$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) $(LINKER_SCRIPT_DEP)
    @echo Building target: $@
    @echo Invoking: AVR/GNU Linker : 4.9.2
    $(QUOTE)E:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="GccApplication1.map" -Wl,--start-group -Wl,-lm  -Wl,--end-group -Wl,--gc-sections -mmcu=atmega328p -B "E:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.0.98\gcc\dev\atmega328p"  
    @echo Finished building target: $@
    "E:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures  "GccApplication1.elf" "GccApplication1.hex"
    "E:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom  --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0  --no-change-warnings -O ihex "GccApplication1.elf" "GccApplication1.eep" || exit 0
    "E:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "GccApplication1.elf" > "GccApplication1.lss"
    "E:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "GccApplication1.elf" "GccApplication1.srec"
    "E:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-size.exe" "GccApplication1.elf"
   

I honestly have no idea what this all means.  It looks like gibber to me.  I would appreciate some help in the right direction.

 

Did you solved ?

because i have the same issue 

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

Ahmed.ben.kamal wrote:
because i have the same issue
Are you saying you have an "undefined reference" error then? That simply means the data/function named is not provided in the link - so you likely omitted one of the source files from the build.

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

Ahmed.ben.kamal wrote:
i have the same issue

Then the answer is the same as already given: https://www.avrfreaks.net/comment...

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Thu. Mar 16, 2017 - 10:40 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i am having the same issue too. 

Blessed

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

If it's the same issue then, again, the answer is the same as already given: https://www.avrfreaks.net/comment...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello Andrew,

 

Off topic, as I hope you solved your problem with the info above.

 

Just thought I'd say Hi from Hudson, practically next door.

 

JC

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

Hi, I see that you repeated the indication for solution but what was that solution ?

 

I try  to build (as fairly new to Studio)  and get only this, and three compilation warning for implicit declarations and no errors.

And the recipe (what the heck that word means, would be good with some kind of error message explanations.....) is for .elf

And clicking on the error message I get into the mysterious glue file "makefile", also with nada explanationary text, just a "dont touch this".

 

Is your reference to solution ablovee still valid ?

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

gechxx wrote:
I try  to build (as fairly new to Studio)  and get only this, and three compilation warning for implicit declarations and no errors.
 

Show us the complete build output.

 

Do a Rebuild. Switch to the output tab. Mark everything. Copy and paste in a post here.

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]

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

gechxx wrote:
Hi, I see that you repeated the indication for solution

The initial problem - in the opening post of this thred - was this error message:

undefined reference to 'variable'

The solution to this was given in post #2.

 

We then had 2 subsequent posters saying they had, "the same issue"

 

So, clearly, if it is the same issue - then it must have the same solution!

 

 

but what was that solution ?

It was this: https://www.avrfreaks.net/comment... - that is a link to post #2.

 

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, I'm not sure that the problem that getchxx has is "the same" as the OPs.

 

We can claim that it should have been a separate thread, but applying the "friendly 'freaks" approach I am interested in seeing the build output that getchxx has.

 

As for a separate thread, I leave this for the moderators to decide and possibly act upon.

 

My major critique would be with his vague/superficial problem description, while at the same time complaining about the error messages/diagnostics being vague... Someone here said just the other day "we don't do magic here". 100% applicable to #9.

 


 

@getchxx:

 

The "recipe" wording is a concept from Make, the utility that actually executes your build. A recipe is a description for how a certain target (the ultimate one, or an intermediate one) is to be built.

 

Re the mystery about Make and makefiles: Anything is mysterious that one does not study. You can either gradually get to know how a failed build manifestates itself or actually dive into how Make works (given a reasonable first ambition level it is actually not that hard). If you opt for the latter, then ask questions about Make in a separate new thread.

 

The reasons for not touching the make file is that (with default project settings) the makefile is generated as the very first step of the build. Therefore it is meaningless to change anything in the makefile since it will be overwritten upon the next build.

 

I am asking about the complete build output because with that we can, in many cases, determine what is wrong. We can not do that with sweeping and superficial descriptions of a failed build. Things like "some errors/warnings" does not leave much to go on. It might well be that the failure at the step where the ELF file is to be produced is a consequence of earlier errors or warnings in the build sequence.

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]

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

 

short impass on; yes, I will produce an output. My major problem with generated glue, like the makefile is not the scripting itself, but the lack of information where you can read why and how it should look. Thus the learning curve is unappetizinig. Be back. Thanks for support.

Last Edited: Wed. Oct 4, 2017 - 09:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gechxx wrote:
My major problem with generated glue, like the makefile is not the scripting itself, but the lack of information where you can read why and how it should look.

GNU Make documentation is here.

 

With a fairly high degree of certainty there is no error in the makefile as such that Atmel Studio has generated (but knowing how to read a makefile can sometimes help hunt down an error elsewhere).

 

I will moderate my previous statements with this: If you want to prioritize what you want to learn then here is my rough advice:

 

1. The C (or C++) language itself. Fundamental for understanding a lot of error messages. This includes the idiosyncrasies of how GCC some error messages are formulated.

 

2. The different parts of the tool chain (compiler, linker and binutils (especially objcopy) and how they come together to make up the different steps of a build).

 

3. Learning, very much by experience, how to read diagnostic messages from the different links in the tool chain. What several of us here stress, or at least hint at, from time to time is to get used to switching to the Output tab and learn how to read the contents there. This is in contrast to merely looking at the Errors tab which often is not sufficient to correctly diagnose and understand what goes wrong in a build.

 

4. Learning, at some level, GNU Make.

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]

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

gechxx wrote:
as fairly new to Studio

Is that just new to Studio specifically, or new to programming in general?

 

It helps to know - in order to be able to frame replies at an appropriate level.

 

As Johan said in #14, understanding the C (or C++) language itself is fundamental to understanding a lot of error messages...

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, here it is:

 

(thank you for pointing me in the right direction; when I read thoroughly the "output tab" (advice "switch to the output tab and copy all") )

 

Reading through the output: I find there is no main !!!! thus the compiler accepts all the code without complaint, but the linker

of cause gets a bit off. My main problem (no pun intended) was to not open the full "tab" (window... whatever) and read through it.

 

But when thinking of it, what actually got me lost was the error indications popping up in the other window, where clicking on the error

got the makefile opened and the strange complaint about "recipe ..... ", had that not existed I  whould have looked in the more intelligible output. So that was an unhelping helpfunction.

 

(the main consists only in one single call, and had been commented away by /* ...*/ accidently.....

 

THANKS again, now Im just back to where I should have been 3days ago :)

 

/georg

Last Edited: Wed. Oct 4, 2017 - 10:34 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gechxx wrote:
the recipe (what the heck that word means

A "recipe" in this context is the same as a recipe in the cooking context - it is a list of "ingredients" (your source files, etc) and operations to be performed with those ingredients in order to produce the result.

 

https://en.oxforddictionaries.com/definition/recipe

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gechxx wrote:
but the lack of information where you can read why and how it should look.
Unless there is a bug in AS7 you should never need to. In fact that is kind of the point of using IDEs - they write the Makefiles so you don't have to. All that is "hidden runes".

 

As others have said the one thing that IS misleading in AS7 is this insistence on switching to the "Error List" at the end of the build. It just gives some one line summaries of what has failed without giving any of the detail. Often it is useless/misleading. As others have said the true way to see what went wrong is to switch to the Output tab and read the complete output of the build. Look for "error". Especially the first one as often the first triggers the next 100! There is likely some error that causes one compilation or link to fail, that in turn stops the building of the "recipe" for the project and back over on the error list you are just told "recipe failed" with no explanation (the error that caused this may also be on that error list somewhere but the sort order does not appear to be chronological!).

 

The ONLY point I have ever found in the Error List (in Visual Studio not AS7) is when you are building a Solution with 100 projects. At the end of the build you are told "97 successfully built, 2 failed, 1 skipped". Trying to identify the 2 that failed in pages and pages of build output can be tricky. If you switch to the Error List and enable the column that gives the project names  you can instantly see the names of the 2 that failed.

 

So far that is the only time I have ever found Microsoft's "Error List" useful.

 

(for AVR this is unlikely to occur - on the whole, in AS7 there tends to be only 1 project per solution. At a pinch I guess there may be 2 or 3 but spotting the failure in the Build Output is pretty easy usually)

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

clawson wrote:
the "Error List" ... just gives some one line summaries of what has failed without giving any of the detail

Worse than that, it re-orders messages so that things which need to be read together no longer come together!

 

angry

 

Often it is useless/misleading.

Indeed.

 

Note that this is exactly the same in Eclipse - another for the "Pet Peeves" list ...

 

The ONLY point I have ever found in the Error List...

I actually find that the error list is useful for trivial errors - that is, the case where it really just needs to tell you "Error Here!" and you can see the problem immediately when you look at the line.

 

Otherwise, as you say, the 'Output' tab (or "Console" in Eclipse) is the place to go.

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So... I was troubled by this

gechxx wrote:
get only this, and three compilation warning for implicit declarations and no errors.

in combination with

gechxx wrote:
there is no main

 

So I switched over to Windoze and did a quick test. For a "null" project with no main I get this in the error list:

 

 

Conclusions and observations:

 

  • The claim from getchxx that there was only the "recipe failed" error and two warnings was probably not true.

 

  • Errors from the linker is not transformed nicely by Atmel Studio (IIRC we've discussed this before in ancient days). The actual build output contains a reasonably good error message. Atmel Studio should extract that "undefined reference to main". Perhaps it would also make sense to filter out the "recipe ... failed" error completely?

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]

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

Hi again and thanx for some good thinking. As to me claiming only one error Im not sure. Well from what I precieved to be compilation. Then I note that you have reveresed the sequence of the two events (up arrow) In the default the errors occur the other way around and I made the misstake (?) of interpreting those as time evolving in descending order.

 

NOW, i know that I should start a new discussion, but as usual I get stuck!! I see no button for making a new topic (!!? have I been blocked :)  or only my usual fail ).

 

Well, this is it (yes very wrong place):  

 

I want to study the timing on acivities in the simulator/simulation /debug. So I had expected one could step by clock cycle and then (have a) log the output on e.g. two pins (GPIO /TWI) and see what happens

in approximate (need not be exact) time with respect to clock (needent have flanks e.g. just if pin is on or off in clock sykle).  Cannot see how/if that is possible.

 

/georg

Last Edited: Thu. Oct 5, 2017 - 10:45 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gechxx wrote:
 I see no button for making a new topic

Go to the "home" page:

 

 

The 'select a forum' link takes you to the list of Forums:

(you could have got straight there with the 'FORUMS' button at the top of the page)

 

Then you select an appropriate forum for your topic; eg, Atmel Studio (AVR-related) - and there's your 'Start a New Topic' (orange) button:

 

 

EDIT

 

It has been noted before that this not particularly obvious.

 

EDIT 2

 

And noted again, just to be sure: https://www.avrfreaks.net/forum/how-start-new-thread-not-obvious

 

#HowToStartNewThread

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Thu. Oct 5, 2017 - 01:40 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well I have done that before, but now I didnt get the "broniwh" button " Start a New Topic"  !!!?? (btw using opera on w10 (not a favorit), as earlier Firefox on XP.....)(neighter the "mark all read", green one)

Ill retry, but if I have missed the button and find it now, I think I might consult a ...

Last Edited: Thu. Oct 5, 2017 - 12:33 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You do need to be logged-in.

 

But then you need to be logged-in to post a reply in an existing thread - and that is clearly working ...

 

You know when you're logged-in because your user name appears at top right, by the 'envelope' icon - and there's 'LOGOUT' next to that

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What you need to realize is that there are two similar but separate sets of forum listings.

 

1) go to www.avrfreaks.net and you get "SUMMARY OF RECENT ACTIVITY FOR ALL AVR FREAKS FORUMS". This lists all activity in all AVRfreaks forums. The list can be "filtered" by using the drop-down box (but there's still a "SUMMARY OF RECENT ACTIVITY FOR ALL AVR FREAKS FORUMS" headline).

 

2) Go to https://www.avrfreaks.net/forum (you can do this by clicking the "FORUMS" link in the page head) and you get a list of available forums. From here you can select a list of activity in a specific forum deceptively similar to the filtered list in 1) above but this one has the "Mark all topics read" button, and the "Start a new topic" button (if you have the rights in that specific forum).

 

It's a mess. Get used to it.

 

It won't change as long as the current laws of the universe holds true.

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]

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

Ok, tried again and got there. Really need to check how things are with percption. /g

Btw thanks for assistance.

Last Edited: Thu. Oct 5, 2017 - 01:06 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JohanEkdahl wrote:
2) Go to https://www.avrfreaks.net/forum ... has the "Mark all topics read" button, and the "Start a new topic" button

Errr - No.

 

That one has  "Mark all topics read",  but does not have "Start a new topic".

 

It doesn't even have the prompt to tell you that you have to select a specific forum before you can start a new topic.

 

Only when you are in one particular forum can do you actually get the  "Start a new topic" button.

 

It's a mess

It certainly is!

 

<rolls-eyes>

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Come on awneil... Don't cut out half of what I wrote, quote that and then claim I was wrong.

 

Let me emphasise what you cut out:

 

JohanEkdahl wrote:
Go to https://www.avrfreaks.net/forum (you can do this by clicking the "FORUMS" link in the page head) and you get a list of available forums. From here you can select a list of activity in a specific forum [...]
 

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]

Last Edited: Thu. Oct 5, 2017 - 01:38 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think I just misunderstood what you were saying - not trying to misrepresent it.

 

But my point is that you have to go via a page where there is neither a 'Start New Topic' button nor any hint on how to start a new topic.

 

So I can see that this would be the point at which newbies get "lost" - and say they can't find any way to start a new thread ... ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

 

error

 

 

 

Build started.

Project "pro test1.cproj" (default targets):

Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').

Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Compiler.targets" from project "c:\users\pankaj\Documents\Atmel Studio\7.0\pro test1\pro test1\pro test1.cproj" (target "Build" depends on it):

Using "RunCompilerTask" task from assembly "C:\Program Files (x86)\Atmel\Studio\7.0\Extensions\Application\AvrGCC.dll".

Task "RunCompilerTask"

Shell Utils Path C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils

C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils\make.exe all --jobs 4 --output-sync 

Building file: .././main.c

Invoking: AVR/GNU C Compiler : 5.4.0

In file included from .././includes.h:15:0,

                 from .././main.h:4,

                 from .././main.c:8:

c:\program files (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\util\delay.h(92,3): warning: #warning "F_CPU not defined for <util/delay.h>" [-Wcpp]

# warning "F_CPU not defined for <util/delay.h>"

   ^

In file included from .././includes.h:22:0,

                 from .././main.h:4,

                 from .././main.c:8:

c:\users\pankaj\Documents\Atmel Studio\7.0\pro test1\pro test1\dly.h(4,0): warning: "F_CPU" redefined

#define F_CPU     7327800UL

^

In file included from .././includes.h:15:0,

                 from .././main.h:4,

                 from .././main.c:8:

c:\program files (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\util\delay.h(108,0): info: this is the location of the previous definition

# define F_CPU 1000000UL

^

.././main.c: In function 'main':

c:\users\pankaj\Documents\Atmel Studio\7.0\pro test1\pro test1\main.c(68,3): warning: implicit declaration of function 'sleep' [-Wimplicit-function-declaration]

   sleep();

   ^

"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe"  -x c -funsigned-char -funsigned-bitfields -DDEBUG  -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.150\include"  -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega32a -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.150\gcc\dev\atmega32a" -c -std=gnu99 -MD -MP -MF "main.d" -MT"main.d" -MT"main.o"   -o "main.o" ".././main.c" 

Finished building: .././main.c

.././main.c: In function '__vector_5':

c:\users\pankaj\Documents\Atmel Studio\7.0\pro test1\pro test1\main.c(104,19): warning: unused variable 'k' [-Wunused-variable]

  static int8u i,j,k;

                   ^

In file included from .././main.c:8:0:

.././main.c: At top level:

c:\users\pankaj\Documents\Atmel Studio\7.0\pro test1\pro test1\main.h(45,13): warning: 'dispMsg' declared 'static' but never defined [-Wunused-function]

static void dispMsg  (void);

             ^

c:\users\pankaj\Documents\Atmel Studio\7.0\pro test1\pro test1\main.h(48,13): warning: 'EXTinit' declared 'static' but never defined [-Wunused-function]

static void EXTinit  (void);

             ^

Building target: pro test1.elf

Invoking: AVR/GNU Linker : 5.4.0

"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe" -o "pro test1.elf"  apr.o buz.o delay.o lcd.o led.o main.o   -Wl,-Map="pro test1.map" -Wl,--start-group -Wl,-lm  -Wl,--end-group -Wl,--gc-sections -mmcu=atmega32a -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.150\gcc\dev\atmega32a"  

c:\users\pankaj\Documents\Atmel Studio\7.0\pro test1\pro test1\Debug\Makefile(173,1): error: recipe for target 'pro test1.elf' failed

main.o: In function `main':

c:\users\pankaj\Documents\Atmel Studio\7.0\pro test1\pro test1\main.c(68,1): error: undefined reference to `sleep'

collect2.exe(0,0): error: ld returned 1 exit status

make: *** [pro test1.elf] Error 1

The command exited with code 2.

Done executing task "RunCompilerTask" -- FAILED.

Done building target "CoreBuild" in project "pro test1.cproj" -- FAILED.

Done building project "pro test1.cproj" -- FAILED.

 

im new to programming getting this error 

help in removing it 

thank you

Last Edited: Fri. Mar 23, 2018 - 11:18 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

The error there is quite clear:

c:\users\pankaj\Documents\Atmel Studio\7.0\pro test1\pro test1\main.c(68,1): error: undefined reference to `sleep'

so you are calling some function called sleep() at line 68 of main.c but nothing in any of the files being built provides a function by that name.

 

You haven't shown your code but if you are using these functions for sleep:

 

http://nongnu.org/avr-libc/user-...

 

then as you can see there the actual function to make the CPU sleep is called sleep_cpu() not just sleep().

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

thank you

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

I always wondered if "Recipe for target failed" is a funny translation from another language. Perhaps Norse?

 

277,232,917 -1 The largest known Mersenne Prime

Measure twice, cry, go back to the hardware store

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

Actually just a generic thing from GNU "make":

 

https://www.gnu.org/software/mak...

 

They simply call the actions in a makefile "recipes":

 

https://www.gnu.org/software/mak...

 

The fault here is Atchip actually collecting and reporting "make" errors. The important thing in a build is not that make had an error (it's VERY unlikely there's something wrong with make itself!) but that a command that make executed reported an error. This is a real wood / trees thing. Beginners focus on the "recipe error" when that's not actually important to them at all. If I were Atchip I would simply filter anything that mentions the word "recipe" form the Error List and leave just the descriptive errors.

Last Edited: Fri. Mar 23, 2018 - 03:40 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Actually a possibly simpler solution is simply to order this:

 

error

chronologically as these things actually appeared in the build. If they did that the top one (and presumably also the "important one" and also the one the programmer will focus on first?) would be "undefined reference to 'sleep'" and, as actually happened during the build, the "ld" one and the "recipe" ones would just appear as a consequence of what was actually wrong.

 

I have no idea what the current sorting algorithm on the Error List actually is. It does not seem to be alpha order on Decription or File or even numeric order on Line number - so it's a complete mystery why they are ordered in the way they are presented?