Topic : problem with linker and startup file

Forum : ARM

Original Post
Post Information Post
January 2, 2012 - 3:23am
Guest

Hello,
I have problem with linking project. I have tried to make some changes in startup settings, and now I cannot link my program anymore (I changed setting back to previous state)

Here what linker shows:

Running: LD Linker

Replies
Post Information Post
+1
0
-1
January 2, 2012 - 9:28am
Raisonance Support Team

Hi,

Are you able to build the projects in the "examples\ARM" directory? If not, then you may have corrupted your installatin, so reinstallation of RKit-ARM is necessary.
If the examples build properly, you have to check your linker options in order to find the faulty option.

Best Regards,

+1
0
-1
January 2, 2012 - 10:50am
Guest

Sorry, my questions was corrupted. Here again:

Hello,
I have problem with linking project. I have tried to make some changes in startup settings, and now I cannot link my program anymore (I changed setting back to previous state)

Here what linker shows:

Running: LD Linker
"C:\Program Files (x86)\Raisonance\Ride\arm-gcc\bin\arm-none-eabi-gcc.exe" -mcpu=cortex-m3 -mthumb -Wl,-T -Xlinker "P:\Project_Ride7tmp\Ride_3210E.elf.ld" -u _start -Wl,-static -Wl,--gc-sections -nostartfiles -Wl,-Map -Xlinker "P:\Project_Ride7tmp\Ride_3210E.map"
P:\Project_Ride7tmp\startup_stm32f10x_cl.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'
P:\Project_Ride7tmp\startup_stm32f10x_cl.o:(.isr_vector+0x0): first defined here
P:\Project_Ride7tmp\startup_stm32f10x_cl.o: In function `OTG_FS_IRQHandler':
(.text.Default_Handler+0x0): multiple definition of `Default_Handler'
P:\Project_Ride7tmp\startup_stm32f10x_cl.o:(.text.Default_Handler+0x0): first defined here
collect2: ld returned 1 exit status

I use in project (it is manually included) ..\Cmsis\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_cl.s
And in project setting (linker tab) i use : no default startup file..

.s file is compiling ok, object file is created but errors appears.

I have also tried with default startup file to YES, but results are the same.

processor STM32F105, no source files was changed

I have no idea what I have changed... and what sould I try...

+1
0
-1
January 2, 2012 - 11:24am
Raisonance Support Team

Hi,

Indeed it looks like you have 2 startup object files.

Are you using the latest Ride7 and RKit-ARM versions (check from http://www.mcu-raisonance.com/mcu_downloads.html)?
There used to be a problem in older RKit-ARM versions if the "default startup" option was selected with the default linker script, resulting in a corrupted project file.

If the problem persists with the latest software versions, can you send us a zipped copy of your project including all files, even intermediate files such as .o, .lst, .ld and the like. This will help us reproduce the problem.

Best Regards,

+1
0
-1
January 2, 2012 - 11:32am
Raisonance Support Team

Hi,

It seems that you have two startups (possibly twice the same): the .s file that you included in your project, and another one from the options. Disable "default startup" option and also make sure that "startup file" option is empty. (I think your problem is the last part: do not make the option point to the .o file if the .s is in the project)

Two other hints, possibly not related but that could help:

When modifying the default startup, (or the one from the ST lib) you should make a copy of it (the .s source) in your project's directory, and then modify and use the copy, not the original. Otherwise your modifications will affect all projects on the PC, and they might be lost if you send the project to another PC/colleague.

There could be problems from installing the software in a directory with parentheses in the name. Prefer installing somewhere else.

Edit: Of course as Bruno says, first make sure you are using the latest version of the software.

Best Regards,

Vincent

+1
0
-1
January 2, 2012 - 1:48pm
Guest

Thanks, now it works.!
The problem was with option pointed to the .o file.
One again thanks.

+1
0
-1
January 2, 2012 - 3:30pm
Raisonance Support Team

Hi,

Indeed we reproduced the issue in our Labs. This will be fixed in the next RKit-ARM release. Sorry for the inconvenience.

Best Regards,