I use msp430-objcopy to duplicate the vectors table in order to avoid the ti
bug CPU5 (see SLAZ020 www.ti.com) concerning MSP430F2131 rev C.

It works with old mspgcc version (20060119), but it doesn't work with the
last version (20060502) with *exactly* the same project.

Make:
    msp430-objcopy --only-section=.vectors --output-target=binary
                   main.elf copy.bin
    msp430-objcopy --add-section .vectors_copy=copy.bin
                   --change-section-address .vectors_copy=0xFFC0
                   --set-section-flags
.vectors_copy=alloc,load,readonly,code
                   main.elf

Result of old version (20060119):
    BFD: ...: warning: allocated section '.vectors_copy' not in segment

Result of new version (20060502):
    BFD: ...: warning: allocated section '.vectors_copy' not in segment
    msp430-objcopy: ...: No space left on device
    msp430-objcopy: ...: No space left on device
    msp430-objcopy: ...: No space left on device
    make: *** [main.hex] Error 1

But I think there is sufficient place from 0xFFC0 to 0xFFDF to put the
vectors table from 0xFFE0 to 0xFFFF.
When I disable the duplication of the vectors table, the hex file is:
    ...
    :08FFB800EE4D450201000000BE
    :10FFE00000E000E0A8F900E000E000E000E000E050
    :10FFF0000CFB38E2B2FA00E000E000E000E088F933
    :00000001FF
    ...
    It is free from 0xFFC0 to 0xFFDF.

Is something wrong in my approach ?

Is an other method to duplicate a section ?

Thanks.
Jean-Marc Michel





Reply via email to