Home arrow Support arrow Forums

Luminary Micro Forums

rocksoft

Expert Boarder

2008/08/11 16:12

Re:For sharing: Memory copy routine

Hi,

The ".global" at the top should make it visible to the linker, however if you're compiling as C++ you might need to check the name mangling.

The ".extern" assembler directive tells the assembler a symbol is elsewhere, ".global" says it's in the assembly file and should be exposed.

My project is pure 'C' so if you are using C++ this might be where the difference is. You could check the map file to see if it thinks it's called something else. Perhaps some underscores are required etc...

The other thing to check is that the linker can see that it is used, it's unlikely but it might be being optimised away! If you're into linker scripts you can force it to keep it using the KEEP directive.

I use an "old-ish" version of the CodeSourcery GCC too, supplied with the Rowley tool chain, and the file assembles and links OK with that so I guess you're not too far off getting it going.

Hope this helps.

Liam.

PS: this is the command line the Rowley build system produces for my file (path names removed for brevity!)...

"as" --traditional-format -mcpu=cortex-m3 -mthumb -mthumb-interwork -EL -mfpu=vfp -mfloat-abi=soft "<source file>" -o "<object_file>"

Post edited by: rocksoft, at: 2008/08/11 16:18

login or register to reply

      Topics Author Date
    thread link
For sharing: Memory copy routine
rocksoft 2008/07/24 10:19
    thread link
thread linkthread link Re:For sharing: Memory copy routine
jrmymllr 2008/08/11 13:36
    thread link
thread linkthread linkthread link Re:For sharing: Memory copy routine
rocksoft 2008/08/11 16:12
    thread link
thread linkthread linkthread linkthread link Re:For sharing: Memory copy routine
jrmymllr 2008/08/12 05:49
    thread link
thread linkthread linkthread linkthread linkthread link Re:For sharing: Memory copy routine
rocksoft 2008/08/12 06:03
    thread link
thread linkthread linkthread linkthread linkthread linkthread link Re:For sharing: Memory copy routine
jrmymllr 2008/08/12 16:05
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread link Re:For sharing: Memory copy routine
rocksoft 2008/08/12 16:43
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:For sharing: Memory copy routine
ravaz 2008/08/13 07:30
    thread link
thread linkthread link Re:For sharing: Memory copy routine
Riveywood 2008/08/28 04:09
    thread link
thread linkthread linkthread link Re:For sharing: Memory copy routine
rocksoft 2008/08/28 05:48