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

0 Members and 1 Guest are viewing this topic.

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 9495
  • 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.
if something can select, how cant it be intelligent? if something is intelligent, how cant it exist?
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 6339
  • 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 Mechatrommer

  • Super Contributor
  • ***
  • Posts: 9495
  • 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...
if something can select, how cant it be intelligent? if something is intelligent, how cant it exist?
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1119
  • 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

Online ataradov

  • Super Contributor
  • ***
  • Posts: 6339
  • 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