Lw-Mesh, WSN Demo with Atmel Studio 7 fails when linking

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

Anyone suceeded to build plain / unmodified WSN Monitor with Atmel Studio 7. I get linker faults.

Last Edited: Fri. Oct 16, 2015 - 12:21 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

It would be wise to actually post the errors you get.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

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

Yes, sorry, here it is....

 

        "C:\Program Files\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe" -o WSNDemo.elf  stack/hal/atsamd21/src/hal.o stack/hal/atsamd21/src/halPhy.o stack/hal/atsamd21/src/halTimer.o stack/hal/atsamd21/src/halStartup.o stack/phy/at86rf233/src/phy.o stack/nwk/src/nwk.o stack/nwk/src/nwkDataReq.o stack/nwk/src/nwkSecurity.o stack/nwk/src/nwkFrame.o stack/nwk/src/nwkGroup.o stack/nwk/src/nwkRoute.o stack/nwk/src/nwkRouteDiscovery.o stack/nwk/src/nwkRx.o stack/nwk/src/nwkTx.o stack/sys/src/sys.o stack/sys/src/sysTimer.o stack/sys/src/sysEncrypt.o stack/hal/drivers/atsamd21/halUart.o stack/hal/drivers/atsamd21/halSleep.o commands.o WSNDemo.o Device_Startup/startup_samr21.o Device_Startup/system_samr21.o   -mthumb -Wl,--start-group  -Wl,--end-group -L"C:\LwMesh_1_2_1\apps\WSNDemo\astudio\Device_Startup"  -Wl,--gc-sections -mcpu=cortex-m0plus -Wl,--script=../../linker/atsamd21j18.ld  
        Device_Startup/startup_samr21.o: In function `Reset_Handler':
C:\LwMesh_1_2_1\apps\WSNDemo\astudio\Debug/../Device_Startup/startup_samr21.c(258,1): error: undefined reference to `_srelocate'
C:\LwMesh_1_2_1\apps\WSNDemo\astudio\Debug/../Device_Startup/startup_samr21.c(258,1): error: undefined reference to `_erelocate'
C:\LwMesh_1_2_1\apps\WSNDemo\astudio\Debug/../Device_Startup/startup_samr21.c(258,1): error: undefined reference to `_ezero'
C:\LwMesh_1_2_1\apps\WSNDemo\astudio\Debug/../Device_Startup/startup_samr21.c(258,1): error: undefined reference to `_szero'
C:\LwMesh_1_2_1\apps\WSNDemo\astudio\Debug/../Device_Startup/startup_samr21.c(258,1): error: undefined reference to `_srelocate'
C:\LwMesh_1_2_1\apps\WSNDemo\astudio\Debug/../Device_Startup/startup_samr21.c(258,1): error: undefined reference to `_szero'
C:\LwMesh_1_2_1\apps\WSNDemo\astudio\Debug/../Device_Startup/startup_samr21.c(258,1): error: undefined reference to `_sfixed'
C:\LwMesh_1_2_1\apps\WSNDemo\astudio\Debug\Device_Startup\startup_samr21.o(1,1): error: undefined reference to `_estack'
collect2.exe(0,0): error: ld returned 1 exit status
        make: *** [WSNDemo.elf] Error 1
        The command exited with code 2.

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

It appears that AS7 thinks it is smarter than anyone else. Delete all files under Device_Startup folder from the project. For some unknown reason AS7 insists on adding its own startup files.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

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

I confirm this resolves the issue, not sure why as I only removed the files from disk, as suggested. The project was not modified, so it appears as if AS7 "auto-adds" certain files in the folder structure.

 

I will hold off using AS7 for a while ;-)

 

Thanks!

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

The project was not modified, so it appears as if AS7 "auto-adds" certain files in the folder structure.

 

Apart from anything else, in particular ASF project setup and ASF wizard adds files. Tons of'em..

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

Hi nets,

 

I think if you open the projects form earlier version(6.+) you might have got ProjectUpgrader warning message. You need to uncheck option 'Migrate the current project to component infrastructure' to avoid Atmel studio adding the device start up files etc.

 

:-)