studio2: set correct libc?

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

The problem:
I have retargeted the example ethernet project for the STK1100 (went into project properties, general, changed from 0512ES to 0512 in the combobox, then re-added the framework components). It works - except that the wrong libc is linked.

The version of libc that gets linked is one where __AVR32_HAS_UNALIGNED_WORD__ is defined in memcpy - that version attempts to do misaligned accesses:

as a result, I get an exception and get hung.

Where is the knob that makes avr32studio link the correct version of libc? Or is there another knob that makes it link a misaligned-access-fix-handler?

The target is a custom board with a 0810 date code UC3A0512-U. I'm still using the STK1100 board definition since my ethernet is attached the same way, and the other I/O don't do any damage. Fresh and updated install of the packages from atmel.com

/Kasper Pedersen

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

Why is it one usually finds a solution about an hour after having posted?

In the grayed-out fields it said -map7000 even though it on the general tab was correct. Recreated the whole project structure in a new project, this time choosing the correct cpu from the _start_, and lo and behold...

It works.

/Kasper Pedersen

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

This is exactly the same problem that I am having, the memcpy is implemented the same way in the assembly that is linked in. I have an older version of the project for the UES part and that project uses correct library code. I will try rebuilding the project from scratch and observing all the different tabs to be sure they are correct. Thanks for posting your problems :)

michael

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

Well, I spoke too soon. We used the EVK1100 as a reference platform, so our custom board is exactly the same, except it uses the UC3A0512 non-ES part. I'm trying to build and launch the EVK1100 Control panel demo on our custom board. I've recreated completely using the New->Project wizard several times, choosing from the 1.3.0 framework, however, it always builds using the incorrectly coded memcpy().

I am not a wizard with the GCC toolset. I suppose I will write a memcpy replacement and see about overriding the library version. :(

michael