UC3 flashc linker script problem

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

I am getting the error:

/usr/avr32/bin/ld: bug_test.elf: section `.ctors' can't be allocated in segment 0
/usr/avr32/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status

after trying to use the linker file that comes with AVR32749 (the flashc bug workaround for AT32UC3Ax512 Revision E, H and I) Has anyone run into this problem before?

The command I run is:

avr32-gcc -march=ucr2 -mpart=uc3a0512 -Wl,--gc sections -Wl,-e,_trampoline -T link_uc3a0512.lds -ffunction-sections -fdata-sections -fno-strict-aliasing  -o bug_test.elf  bug_test.o config.o  trampoline.o -L../../common/lib  -lfreertos -lintc -lnlao -lshell -lutil -lusart  -lm -lgpio -ltc -lbsp -lpm -lflashc -ltree
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have the same problem. I have updated the studio to version 2.1.0, framework version 1.4.0, toolchain version 2.1.4 (don't know what version it was before). Now i tried to compile my older projects with the new studio version (the workaround for flash update worked with the older studio). I had to change some sources (framework compatibility) until i ran into same problem as the threadstarter. Any ideas what the problem could be?

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

You need to update the linker file to the latest linkers from the software framework 1.4.0 (UTILS/LINKER_SCRIPT).
Changes have been made in avr32-ld so the old linker script gives this error.

-sma

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

Thank you sma,

i modified the linker script from the new toolchain. Now the linker links without a error. In the map file i can see that the 0 pages are reserved. I append the linker script file for the workaround.

Attachment(s):