Society of Robots - Robot Forum
Software => Software => Topic started by: Neophite_404 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 (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:
# 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 (http://electrons.psychogenic.com/articles/Makefile.tpl)
I've tried editing the line so that it looks like this:
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.
-
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.
-
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.
-
your welcome!
make is very sensitive about spaces, tabs... You'll get used to it :)