msp430-elf-as

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

msp430-elf-as

Kees Schoenmakers
Hi All,

I noticed that _after linking_ the jump offsets are correctly
calculated and placed...........

I have build binutils, gcc and newlib successfuly, I last problem
remains while building gdb

config.status: executing depfiles commands
config.status: executing default commands
checking whether NLS is requested... yes
checking for catalogs to be installed...
checking whether makeinfo --split-size=5000000 supports @click... yes
checking for default auto-load directory... $debugdir:$datadir/auto-load
checking for default auto-load safe-path... $debugdir:$datadir/auto-load
configure: error: configuration msp430-unknown-elf is unsupported.
make[1]: *** [configure-gdb] Error 1
make[1]: Leaving directory
`/home/kees/embedded/msp430/buildgcc4_9/builddir/msp430-gdb'
make: *** [all] Error 2

Any clue?

Thanks all, Kees

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Mspgcc-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Reply | Threaded
Open this post in threaded view
|

Re: msp430-elf-as

nick clifton
Hi Kees,

> I noticed that _after linking_ the jump offsets are correctly
> calculated and placed...........
>
> Any clue?

In a word: relocations.

Try disassembling your object file with "-dr" specified.  You should see
something like this:

00000000 <intern1>:
    0:   1f 43           mov     #1,     r15     ;r3 As==01
    2:   1e 83           dec     r14             ;
    4:   00 24           jz      $+2             ;abs 0x6
                         4: R_MSP430X_10_PCREL   lab1
    6:   03 43           nop
    8:   00 3c           jmp     $+2             ;abs 0xa
                         8: R_MSP430X_10_PCREL   lab2

What this means is that the JZ instruction at offset 4 and the JMP
instruction at offset 8 both have unresolved relocations against them.
At link time the linker will resolve the relocations and store the
correct values into the instructions.

The reason why the assembler generates these relocations, rather than
just resolving the jumps directly is because the linker also performs
"relaxations" where it can replace some instructions with shorter
versions.  So it is possible that the distance between a jump
instruction and its destination label will change at link time.  Hence
the assembler cannot know for sure exactly what value to put into the
offset field, and hence it must use a relocation instead.

Cheers
   Nick


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Mspgcc-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users