go_away

Author Topic: Makefile Help  (Read 1365 times)

0 Members and 1 Guest are viewing this topic.

Offline Neophite_404Topic starter

  • Jr. Member
  • **
  • Posts: 12
  • Helpful? 0
Makefile Help
« on: October 12, 2009, 07:07:20 AM »
Hey All,

I'm just starting out with MCU programming and trying to get my workflow/file and folder structure set up. Im in the last stages of this process but I'm running into a problem with the linker portion. (I think :-) ).

This is a screen capture of the output @ command line:

http://viewmorepics.myspace.com/index.cfm?fuseaction=viewImage&friendID=43977478&albumID=447318&imageID=58183509

And this is the bit in the makefile that I'm using where I think the issue is:

Quote
# linker
LDFLAGS=-Wl,-Map,$(TRG).map -mmcu=$(MCU) -lm $(LIBS)

The whole makefile template can be seen here: http://electrons.psychogenic.com/articles/Makefile.tpl

I've tried editing the line so that it looks like this:
Quote
LDFLAGS=-Wl -Map $(TRG).map -mmcu=$(MCU) -lm $(LIBS)

That just outputted that it didn't recognize the -Map option. I've also tried looking up the -map option for the ld command and didn't come up with anything. I just simply do not understand what is going on here. :)

Any help would be greatly appreciated.

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
    • Current projects
Re: Makefile Help
« Reply #1 on: October 12, 2009, 11:09:37 AM »
The variable TRG seems invalid (workftest                           .out). Since it is created by adding .out to your project name, check the definition of PROJECTNAME for trailing spaces.

Offline Neophite_404Topic starter

  • Jr. Member
  • **
  • Posts: 12
  • Helpful? 0
Re: Makefile Help
« Reply #2 on: October 12, 2009, 04:04:50 PM »
Brilliant. I had a comment off to the side (a bunch of spaces then "## Change this for every project.") After deleting that comment and then making sure that there were no trailing spaces everything seems to work perfectly.

Thank you very much chelmi.

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
    • Current projects
Re: Makefile Help
« Reply #3 on: October 12, 2009, 04:20:59 PM »
your welcome!

make is very sensitive about spaces, tabs... You'll get used to it :)

 


Get Your Ad Here

data_list