Author Topic: How to Configure WinAVR make.exe in PN2?  (Read 1368 times)

0 Members and 1 Guest are viewing this topic.

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11612
  • Country: my
  • reassessing directives...
How to Configure WinAVR make.exe in PN2?
« on: October 14, 2018, 12:07:22 pm »
after exhaustive attempt, to some extend, i managed to compile a Makefile in Programmer's Notepad 2. the problem is, i still dont know how to output *.o *.hex in separate folder. *.o and *.hex now generated in the same folder as Makefile and source codes *.c *.h now this is a mess, i need them to be on separate folder ie <project file>\default like how AVR Studio did it, whats the setting? attached is my current setting i dont know what keyword %d\default failed to compile. help.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11234
  • Country: us
    • Personal site
Re: How to Configure WinAVR make.exe in PN2?
« Reply #1 on: October 14, 2018, 05:45:26 pm »
You need to run from the destination folder and run the make as this "make -f ../Makefile". This will execute the Makefile located one level up from the destination folder, but all the output will go into the build folder.
Alex
 
The following users thanked this post: Mechatrommer

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11612
  • Country: my
  • reassessing directives...
Re: How to Configure WinAVR make.exe in PN2?
« Reply #2 on: October 15, 2018, 07:14:07 pm »
thanks alex but it didnt work, see attached...
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: How to Configure WinAVR make.exe in PN2?
« Reply #3 on: October 15, 2018, 07:29:27 pm »
The Makefile must be written with this scenario in mind, or it won't work. In your case, make expects that the source file is found in the same place you're building, and when it can't find it tries to see if it can generate it, which is why it fails with a missing rule error.
 
The following users thanked this post: Mechatrommer

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11234
  • Country: us
    • Personal site
Re: How to Configure WinAVR make.exe in PN2?
« Reply #4 on: October 15, 2018, 07:32:06 pm »
Have a look at any of the Makefiles here https://github.com/ataradov/mcu-starter-projects

They all produce the output in a separate directory.

But yes, you will have to rewrite the makefiles.
Alex
 
The following users thanked this post: Mechatrommer


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf