cancel
Showing results for 
Search instead for 
Did you mean: 

(SOLVED )Some problems with linking under linux

pandoraems
Associate II
Posted on October 11, 2008 at 18:54

(SOLVED )Some problems with linking under linux

1 REPLY 1
pandoraems
Associate II
Posted on May 17, 2011 at 12:47

EDIT: this was just a fluke: forgot to include stm32f10x_vector.c into the makefile, which resulted in silent but deadly mess-up of binary sections in elf

Original post:

Hi all

I used codesourcery q1 build under windows (cygwin) and all built and worked fine. Now i migrated to linux, using same ver. codesourcery for linux (binaries, i couldn't quite figure out how to build it) and having problems.

The problem manifests itself as follows: when i try to load main.bin using openocd (using same exact .cfg, bar serial port setting, and same sequence of commands as i use to in windows) in linux, it either complains that ''section 0 is empty'' or looks like it should have loaded it, but doesn't work, depending on different .ld files i try to use.

i tried lanchon's vcom example, and it looks like openocd loads the binary, but it doesn't seem to work after reset.

When i specifically take main.bin of the same source built in windows, it loads into flash fine and all works as expected. So i am convinced it has something to do with .ld files and the way linker fills up the sections of the binary.

I am not that up to speed when it comes to how linker organizes teh binaries so if anyone has some good links, i'd appreciate that.

I've also compared the main.elf.map files on windows and linux and they are quite different.

If someone has links to examples that work under linux, please send them this way

Thanks

[ This message was edited by: pandoraems on 12-10-2008 01:56 ]