sim/2181: powerpcsim crt0 could not initialize register "sp" for MPC555

muhavid@xko.cz muhavid@xko.cz
Thu Oct 5 21:38:00 GMT 2006


>Number:         2181
>Category:       sim
>Synopsis:       powerpcsim crt0 could not initialize register "sp" for MPC555
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 05 21:38:01 UTC 2006
>Closed-Date:
>Last-Modified:
>Originator:     darkanry
>Release:        gdb 6.3.50.20051117
>Organization:
>Environment:
SuSE
>Description:
I hav a problem with setting register "sp". This always happens:

Cannot access memory at address 0x3fb814

I've looked on the internet to find some hint but still without sucess. Can
somebody tell me what's wrong with my code.

Here is a link file:

<code>
MEMORY
{
    vector  :   org = 0x0000000,    len = 0x001EFF
    rom     :   org = 0x0002000,    len = 0x06FFFF
    ram     :   org = 0x03f9800,    len = 0x0067FF
}

__ram_start     =       0x03F9800;
__ram_size      =   0x00067FF;
__ram_end       =       __ram_start + 0x0067FF;

SECTIONS
{
/* the interrupt table */
..vector : {
__vector_start = .;
*(.vector)
__vector_end = .;
} > vector

_ROM_TEXT_START = 0x02000;

..text : {
        __text_start = .;
        *(.text)
        *(.rodata)
        *(.rodata1)
        *(.got1)
        *(.strings)
        *(.comment)
        __text_end = .;
} > rom

_ROM_TEXT_SIZE = SIZEOF(.text);
_ROM_TEXT_END = _ROM_TEXT_START + _ROM_TEXT_SIZE;

_ROM_DATA_START = _ROM_TEXT_END;

..data : AT(_ROM_DATA_START) {
        _RAM_DATA_START = .;
        __DATA_START = . ;
        *(.data)
        __DATA_END = . ;

        /* read write small data */
        _SDA_BASE_ = .;
        *(.sdata)
        _SDA_END_ = .;

        /* read only small data */
        _SDA2_BASE_ = .;
        *(.sdata2)
        _SDA2_END_ = .;

        _RAM_DATA_END = .;
} > ram

_ROM_DATA_SIZE = SIZEOF(.data);
_ROM_DATA_END  = _ROM_DATA_START + _ROM_DATA_SIZE;

_ROM_BSS_START = _ROM_DATA_END;

..bss _RAM_DATA_END : AT(_ROM_BSS_START) {
        __BSS_START = .;
        *(.sbss)
        *(.scommon)
        *(.dynbss)
        *(.bss)
        *(COMMON)
        __BSS_END = .;
        __stack_end = .;
        . += 0x2000 + 0x10;
        PROVIDE (__stack_base = .);
} > ram
        /*.debug_info     0 : { *(.debug_info) } > rom
        .debug_abbrev   0 : { *(.debug_abbrev) } > rom
        .debug_line     0 : { *(.debug_line) } > rom
        .debug_frame    0 : { *(.debug_frame) } > rom

*/
}
</code>

in crt0 crashed always on the line:

mr  sp, r0

thank you for help 
>How-To-Repeat:
running gdb with target sim , setting barkepoint on __start and run
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="crt0.S"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="crt0.S"

LyoKICogY3J0MC5TIC0tIHN0YXJ0dXAgZmlsZSBmb3IgUG93ZXJQQyBzeXN0ZW1zLgogKgogKi8K
CiNpbmNsdWRlICJwcGNfYXNtLmgiCgojZGVmaW5lIFRhc2tfUjAgICAgIDEKCiAgICAuZXh0ZXJu
IGN1cnJUYXNrCgoJLmZpbGUJImNydDAuUyIKLkxwdHI6Ci8qIE9uIHRoZSBNUEM1NTUgZm9sbG93
aW5nIHJlZ2lzdGVycyBhcmUgdXBkYXRlZCBieSBodzoKICAgU1JSMCAtIG5leHQgaW5zdHJ1Y3Rp
b24gdG8gYmUgZXhlY3V0ZWQKICAgU1JSMSAtIFswLi4xNV0gZGVwZW5kcyBvbiBleGNlcHRpb24s
IFsxNi4uMzFdIGNvcHkgb2YgTVNSWzE2Li4zMV0KICAgTVNSICAtIFJJID0gUFIgPSBMRSA9IEVF
ID0gRlAgPSBGUDAgPSBGUDEgPSBTRSA9IEJFID0gMCAqLwoJLnNlY3Rpb24gLnZlY3RvcgoJLyog
cmVzZXQgdmVjdG9yICovCgkuID0gMHgwMTAwCglibCBfc3RhcnQKCgogICAgLiA9IDB4MEMwMAph
c21fdGFza19zd2l0Y2g6CiAgICAgICAgOyAvKiBTZXQgZmxhZyB0byBkZXNjaGVkdWxlICovCiAg
ICAgICAgbGkgICAgIHIyMCwgMSAgICAgICAgICAgICAgICAgICAgOy8vIGxvYWQgdG9wIDE2IGJp
dHMgb2YgJl9jb25zaWRlcl90cwoKCnJldHVybl9mcm9tX2V4Y2VwdGlvbjoKICAgICAgICA7IC8q
IENoZWNrIHVzZXIvcHJpdmlsZWcgbW9kZSAqLwogICAgICAgIGFuZGlzLiAgcjAsIHNycjEsIDB4
MyAgICAgICAgICAgIDsgLy9jb21wYXJlIHByZXZpb3VzIG1hY2hpbmUKICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICA7IC8vc3RhdHVzIHJlZ2lzdGVyIGlmIHN1cGVydmlz
b3IKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA7IC8vbW9kZSBvciBp
cnEgZGlzYWJsZWQKICAgICAgICBiZG56LSAgIExfdGFza19zd2l0Y2hfZG9uZSAgICAgICA7Cgog
ICAgICAgIDsgLyogQ2hlY2sgdGFzayBzd2l0Y2hpbmcgcmVxdWVzdCAqLwoJICAgIGFkZGkgICAg
cjIwLCByMjAsIDAgICAgICAgICAgICAgIDsKICAgICAgICBiZHogICAgIExfdGFza19zd2l0Y2hf
ZG9uZSAgICAgICA7CgogICAgICAgIDsgLyogU2F2ZSBjdXJyZW50IHRhc2sgKi8KICAgICAgICBs
aSAgICAgIHIyMCwgMCAgICAgICAgICAgICAgICAgICA7Ly9jbGVhciBfY29uc2lkZXJfdHMgZmxh
ZwoKCiAgICAgICAgbGlzICAgICByMywgcGN1cnJUYXNrQGhhICAgICAgICAgOwogICAgICAgIGFk
ZGkgICAgcjMsIHIzLCBwY3VyclRhc2tAbCAgICAgIDsKICAgICAgICBzdHcgICAgIHNwLCBUYXNr
X1IwKHIzKSAgICAgICAgICA7CgogICAgICAgIDsgLyogRmluaXNoIHRhc2sgc3dpdG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8vIEdldCBTUlIwCiAgICAgICAgc3R3ICAgIHIzLCAgMTIgKHNwKSAgOyAvLyBhbmQgc2F2
ZSBTUlIwCiAgICAgICAgbWZzcnIxIHIzICAgICAgICAgICAgOyAvLyBHZXQgU1JSMQogICAgICAg
IHN0dyAgICByMywgIDE2IChzcCkgIDsgLy8gYW5kIHNhdmUgU1JSMQogICAgICAgICAgICAgICAg
ICAgICAgICAgICAgIDsgLy8gU1RFUCAyOiBNQUtFIE1TUltSSV0gUkVDT1ZFUkFCTEUKICAgICAg
ICBtdHNwciAgZWlkLCByMyAgICAgICA7IC8vIFNldCByZWNvdmVyYWJsZSBiaXQKICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICA7IC8vIE5vdyBkZWJ1Z2dlciBicmVha3BvaW50cyBjYW4gYmUg
c2V0CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOyAvLyBTVEVQIDM6IFNBVkUgT1RIRVIg
QVBQUk9QUklBVEUgQ09OVEVYVAogICAgICAgIG1mbHIgICByMyAgICAgICAgICAgIDsgLy8gR2V0
IExSCiAgICAgICAgc3R3ICAgIHIzLCAgOCAoc3ApICAgOyAvLyBhbmQgc2F2ZSBMUgogICAgICAg
IG1meGVyICByMyAgICAgICAgICAgIDsgLy8gR2V0IFhFUgogICAgICAgIHN0dyAgICByMywgIDIw
IChzcCkgIDsgLy8gYW5kIHNhdmUgWEVSCiAgICAgICAgbWZzcHIgIHIzLCAgY3RyICAgICAgOyAv
LyBHZXQgQ1RSCiAgICAgICAgc3R3ICAgIHIzLCAgMjQgKHNwKSAgOyAvLyBhbmQgc2F2ZSBDVFIK
ICAgICAgICBtZmNyICAgcjMgICAgICAgICAgICA7IC8vIEdldCBDUgogICAgICAgIHN0dyAgICBy
MywgIDI4IChzcCkgIDsgLy8gYW5kIHNhdmUgQ1IKICAgICAgICBzdHcgICAgcjAsICAzMiAoc3Ap
ICA7IC8vIFNhdmUgUjAKICAgICAgICBzdHcgICAgcjQsICA0MCAoc3ApICA7IC8vIFNhdmUgUjQg
dG8gUjEyCiAgICAgICAgYmxyCgpFcGlsb2c6ICAgICAgICAgICAgICAgICAgICAgIDsgLy9TdGFy
dCBlcGlsb2c6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOyAvL1NURVAgNjogUkVTVE9S
RSBDT05URVhUCiAgICAgICAgbHd6ICAgIHIwLCAzMiAoc3ApICAgOyAvLyBSZXN0b3JlIGdwcnMg
ZXhjZXB0IFIzCiAgICAgICAgbHd6ICAgIHI0LCA0MCAoc3ApCiAgICAgICAgbHd6ICAgIHIzLCAy
MCAoc3ApICAgOyAvLyBHZXQgWEVSCiAgICAgICAgbXR4ZXIgIHIzICAgICAgICAgICAgOyAvLyBh
bmQgcmVzdG9yZSBYRVIKICAgICAgICBsd3ogICAgcjMsIDI0IChzcCkgICA7IC8vIEdldCBDVFIK
ICAgICAgICBtdGN0ciAgcjMgICAgICAgICAgICA7IC8vIGFuZCByZXN0b3JlIENUUgogICAgICAg
IGx3eiAgICByMywgMjggKHNwKSAgIDsgLy8gR2V0IENSCiAgICAgICAgbXRjcmYgIDB4ZmYsIHIz
ICAgICAgOyAvLyBhbmQgcmVzdG9yZSBDUgogICAgICAgIGx3eiAgICByMywgOCAoc3ApICAgIDsg
Ly8gR2V0IExSCiAgICAgICAgbXRsciAgIHIzICAgICAgICAgICAgOyAvLyBhbmQgcmVzdG9yZSBM
UgogICAgICAgIG10c3ByICBucmksIHIzICAgICAgIDsgLy8gQ2xlYXIgcmVjb3ZlcmFibGUgYml0
LCBNU1JbUkldCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOyAvLyBOb3cgYnJlYWtwb2lu
dHMgQ0FOTk9UIGJlIHNldCB0aHJ1IHJmaQogICAgICAgIGx3eiAgICByMywgMTIgKHNwKSAgIDsg
Ly8gR2V0IFNSUjAgZnJvbSBzdGFjawogICAgICAgIG10c3JyMCByMyAgICAgICAgICAgIDsgLy8g
YW5kIHJlc3RvcmUgU1JSMAogICAgICAgIGx3eiAgICByMywgMTYgKHNwKSAgIDsgLy8gR2V0IFNS
UjEgZnJvbSBzdGFjawogICAgICAgIG10c3JyMSByMyAgICAgICAgICAgIDsgLy8gYW5kIHJlc3Rv
cmUgU1JSMQogICAgICAgIGx3eiAgICByMywgMzYgKHNwKSAgIDsgLy8gUmVzdG9yZSBSMwogICAg
ICAgIGFkZGkgICBzcCwgc3AsIDgwICAgIDsgLy8gQ2xlYW4gdXAgc3RhY2sKICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICA7IC8vIFNURVAgNzogUmV0dXJuIHRvIFByb2dyYW0KICAgICAgICBy
ZmkgICAgICAgICAgICAgICAgICA7IC8vIEVuZCBvZiBJbnRlcnJ1cHQKCgoKCgo=



More information about the Gdb-prs mailing list