Error: recipe for target '.../.../../hal.o' failed

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

Im trying to import stack file to my project in Atmel Studio 7.
What should I do to solve this problem?

 


./%.o: .././%.c
	@echo Building file: $<
	@echo Invoking: AVR/GNU C Compiler : 4.9.2
	$(QUOTE)H:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE)  -x c -DDEBUG -DBOARD=ATMEGA256RFR2_XPLAINED_PRO -DPHY_ATMEGARFR2 -DSAL_TYPE=ATMEGARF_SAL  -I"H:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.1.130\include" -I"../src/ASF/common/boards" -I"../src/ASF/mega/utils/preprocessor" -I"../src/ASF/mega/utils" -I"../src/ASF/common/utils" -I"../src/ASF/mega/boards" -I"../src/ASF/mega/boards/atmega256rfr2_xplained_pro" -I"../src" -I"../src/config" -I"../src/ASF/mega/drivers/cpu" -I"../src/ASF/mega/drivers/macsc" -I"../src/ASF/mega/drivers/sleep" -I"../src/ASF/thirdparty/wireless/avr2130_lwmesh/apps/wsndemo" -I"../src/ASF/common/services/clock" -I"../src/ASF/common/services/delay" -I"../src/ASF/common/services/ioport" -I"../src/ASF/common/services/serial/megarf_usart" -I"../src/ASF/common/services/serial" -I"../src/ASF/common/services/sleepmgr" -I"../src/ASF/common/utils/stdio/stdio_serial" -I"../src/ASF/mega/drivers/usart" -I"../src/ASF/thirdparty/wireless/addons/sio2host/uart" -I"../src/ASF/thirdparty/wireless/avr2130_lwmesh/source/nwk/inc" -I"../src/ASF/thirdparty/wireless/avr2130_lwmesh/source/phy/atmegarfr2/inc" -I"../src/ASF/thirdparty/wireless/avr2130_lwmesh/source/sys/inc" -I"../src/ASF/thirdparty/wireless/services/common_hw_timer" -I"../src/ASF/thirdparty/wireless/services/common_hw_timer/mega" -I"../src/ASF/thirdparty/wireless/services/mega/drivers/tc" -I"../src/ASF/thirdparty/wireless/services/sal/inc" -I"../src/ASF/thirdparty/wireless/services/sleep_mgr"  -O1 -fdata-sections -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -g3 -Wall -mmcu=atmega256rfr2 -B "H:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.1.130\gcc\dev\atmega256rfr2" -c -std=gnu99 -fno-strict-aliasing -Wstrict-prototypes -Wmissing-prototypes -Werror-implicit-function-declaration -Wpointer-arith -mrelax -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)"   -o "$@" "$<" 
	@echo Finished building: $<
	

 

Last Edited: Wed. Apr 19, 2017 - 06:58 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

kyrul wrote:
Im trying to import stack file to my project in Atmel Studio 7.

What "stack file"?

From where have you obtained it?

Have you contacted the author for assistance?

 

What steps, exactly, have you taken to "import" it?

 

kyrul wrote:
What should I do to solve this problem?

How about posting the complete build output - so that we can see what is actually happening?

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: Wed. Apr 19, 2017 - 06:31 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The stack file I got it from Atmel Light Weight Mesh.
 

The stack file contains about how to setup Wireless Sensor Node.
If I can import the folder file that make me easy for me to call every function inside Stack file.

 

Already tried add existing file "Add as link" and Tool chain.
I bit confuse about Tool chain how its work?

Last Edited: Wed. Jul 5, 2017 - 03:06 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Moved to General Wireless Discussions, note the sticky at the top it may be of some help.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I made it work now thanks guys.

Here the solution:

First if you copy the file from another project make sure the file is not has another copy to the other folder.
It will make compiler confuse to search your file. Please delete the other file first before use the file that you want include in your project.
 

Thank you.

 

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

In general, that should not be necessary - so there is probably still something not quite right with your project.

 

But you've got it working for now ...

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 everyone, I am new here and I've started working on an AVR using atmel Studio 7 and struggled for hours trying to solve the "recipe for target failed" error. After a lot of  search, I found a solution on a Japaneese website.

 

  1. I downloaded the latest update for my device on http://packs.download.atmel.com/ and installed it, you can also tools> device Pack Mananger and Check for latest updates.
  2. I'm running Atmel Studio on Windows (64), so I went and downloaded the "make.exe" from http://www.equation.com/servlet/equation.cmd?fa=make and replaced the one in your atmel default repository

C:\Program Files (x86)\Atmel\Studio\7.0\shellutils\ (I saved the older make.exe just in case)

  1. Went to AS7 : Tools > Options > Builder : Custom
  2. Then I restarted Atmel studio

 

Result : no more recipe for target failures

Freakish-ly,
Oula