Float support & ASF6

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

After switching to ASF6 since the ATMEL road show earlier this month, I hit a brick wall when my sprintf's showed nothing but ? ? ? ?
Now I had been there before with AS4, but with ASF6 I am as nervous as a groom on the honeymoon! (In addition I am no compiler expert.)
A well known freak was contacted & he sorted me out. As it turns out, it is exactly the same as in AS4 but just a little different to implement using the ASF6 tools & jargon.

To activate floating-point support printf, sprintf, scanf, etc. in the ASF6
the following two steps in
Project>"project name" Properties (shortcut: ALT + F7)

Toolchain > AVR/GNU linker > General
Select
Use vprint library (-Wl,-u,vprintf)

Toolchain > AVR/GNU linker > Libraries
Add the following libraries
m
printf_flt
scanf_flt

The same information on how to do this in AS4 has of course been asked for and given many times before and repeating in it in ASF6 context will no doubt be useful in the future.

Credit(translated from German)

Attachment(s): 

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

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

I'll just mention the USER MANUAL in passing where this is explained ;-)

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

I have put the wise words of Lee into a small PDF document. If there is something I missed, please let me know. I have not had time to actually see if these where the only changes needed for enabling float calculations. I have checked the document however with Lee and he also was convinced that this was all needed. Hope it helps other out.

Attachment(s):