atmel demo cdc proj. makefile (a.n. AVR272)- how to get fp ?

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

trying to get sin() and cos()to work in a custom veriosn of this project.
In the makefile I've added this line to the section for linker flags : LDFLAGS += -lm
however, i'm still getting linker "relocation truncated" errors - any ideas?
Everything compiles ok, and linker script is unchanged.

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

So, is $(LDFLAGS) actually /used/ anywhere when linking?

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

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

Apparently. Here are two pieces from my make file...

## Linker flags
LDFLAGS = $(COMMON)
LDFLAGS += -Wl,-Map=$(PROJECT).map,--cref
LDFLAGS += -lm
LDFLAGS += -Tat90usbxxx.x

##Link
$(TARGET): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET)

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

OK never mind. I have dumped the Atmel makefile and linker script of app not AVR272 in favor of a makefile derived from "makefile_template" and no explicit linker script. Now my trig functions link OK.