This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] MSP-EXP430G2ET:符号格式&'ELF32-MSP430'在 MSP430-elf-gdb 中未知

Guru**** 2524550 points
Other Parts Discussed in Thread: MSP430-GCC-OPENSOURCE, MSP-EXP430G2ET

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1559551/msp-exp430g2et-symbol-format-elf32-msp430-unknown-in-msp430-elf-gdb

部件号:MSP-EXP430G2ET
主题中讨论的其他器件:MSP430-GCC-OPENSOURCE

工具/软件:

您好、  

我尝试使用 msp430-gcc-opensource 工具链中的 msp430-elf-gdb 调试文件。 我已经使用 msp430-elf-as 汇编了一个汇编源文件、当我尝试使用“file build/program.elf“将其加载到 msp430-elf-gdb 时、我得到了一条消息“抱歉、Dave、我无法做到这一点。 符号格式`ELF32-MSP430'未知。“ 我可以做些什么来纠正这种情况?  

如果需要任何其他信息、请告诉我。 我使用 MSP-EXP430G2ET 开发板、与器件的通信功能正常。

谢谢、  

David

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我没有收到这个错误、所以肯定是您在做的事情。

    $ /usr/ti/gcc/bin/msp430-elf-gdb eforth.elf
    GNU gdb (Mitto Systems Limited - msp430-gcc 9.3.1.11) 9.1
    Copyright (C) 2020 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <gnu.org/.../gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    Type "show copying" and "show warranty" for details.
    This GDB was configured as "--host=x86_64-pc-linux-gnu --target=msp430-elf".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <www.gnu.org/.../>.
    Find the GDB manual and other documentation resources online at:
        <www.gnu.org/.../>.
    
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
    Reading symbols from eforth.elf...
    (No debugging symbols found in eforth.elf)
    (gdb) 
    

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您的程序“efort.elf"的“的格式是什么? 是 ELF32 吗?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    $ /usr/ti/gcc/bin/msp430-elf-readelf -h eforth.elf
    ELF Header:
      Magic:   7f 45 4c 46 01 01 01 ff 00 00 00 00 00 00 00 00 
      Class:                             ELF32
      Data:                              2's complement, little endian
      Version:                           1 (current)
      OS/ABI:                            Standalone App
      ABI Version:                       0
      Type:                              EXEC (Executable file)
      Machine:                           Texas Instruments msp430 microcontroller
      Version:                           0x1
      Entry point address:               0x4402
      Start of program headers:          52 (bytes into file)
      Start of section headers:          33836 (bytes into file)
      Flags:                             0x2d: architecture variant: MSP430X
      Size of this header:               52 (bytes)
      Size of program headers:           32 (bytes)
      Number of program headers:         29
      Size of section headers:           40 (bytes)
      Number of section headers:         45
      Section header string table index: 44
    

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Hmm、我的 MSP430-elf-readelf 输出显示了 MSP430x14 与 MSP430X 的架构变体

    msp430-elf-readelf -h build/program.elf
    ELF Header:
      Magic:   7f 45 4c 46 01 01 01 ff 00 00 00 00 00 00 00 00 
      Class:                             ELF32
      Data:                              2's complement, little endian
      Version:                           1 (current)
      OS/ABI:                            Standalone App
      ABI Version:                       0
      Type:                              EXEC (Executable file)
      Machine:                           Texas Instruments msp430 microcontroller
      Version:                           0x1
      Entry point address:               0xc000
      Start of program headers:          52 (bytes into file)
      Start of section headers:          700 (bytes into file)
      Flags:                             0xe: architecture variant: MSP430x14
      Size of this header:               52 (bytes)
      Size of program headers:           32 (bytes)
      Number of program headers:         2
      Size of section headers:           40 (bytes)
      Number of section headers:         9
      Section header string table index: 8

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    这是因为我刚刚抓到了第一个文件。 和 FR5969 的时钟。 进一步挖掘我发现 g2553 的一些东西和 readelf 输出是一样的。 大部分。 它更大了一点。

    readelf 可以展示更多、包括符号:

    $ /usr/ti/gcc/bin/msp430-elf-readelf --symbols ammeter.elf
    
    Symbol table '.symtab' contains 1084 entries:
       Num:    Value  Size Type    Bind   Vis      Ndx Name
         0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND 
         1: 0000ffea     0 SECTION LOCAL  DEFAULT    1 
         2: 0000fff2     0 SECTION LOCAL  DEFAULT    2 
         3: 0000fffe     0 SECTION LOCAL  DEFAULT    3 
         4: 0000c000     0 SECTION LOCAL  DEFAULT    4 
         5: 0000c0c1     0 SECTION LOCAL  DEFAULT    5 
         6: 0000c0c2     0 SECTION LOCAL  DEFAULT    6 
         7: 00000200     0 SECTION LOCAL  DEFAULT    7 
    
    etc.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我的程序通过该命令获得了类似的结果。 我发现我在使用 TI 网站上的 MSP430 gcc 而不是我的发行版 (Fedora 42) 上的软件包时没有问题。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    这是我第一个听说过的 MSP430 版本通过 Linux 发行版提供。 我不能得到 dnf 承认,一个存在。 似乎是谁建造了这个软件包把它弄得乱七八糟。 (即使是我原生的 fc41 版本的 gdb 也会从 MSP430 .elf 文件中加载符号。)  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    有意思。 以下是运行 dnf install MSP430-elf*时系统上安装的软件包列表、供参考:  

    msp430flasher-1.3.16-3.fc42.x86_64
    msp430-elf-toolchain-debuginfo-9.3.1.2-4.fc42.x86_64
    msp430-elf-binutils-9.3.1.2-4.fc42.x86_64
    msp430-elf-gcc-9.3.1.2-4.fc42.x86_64
    msp430-elf-gcc-c++-9.3.1.2-4.fc42.x86_64
    msp430-elf-binutils-debuginfo-9.3.1.2-4.fc42.x86_64
    msp430-elf-gcc-c++-debuginfo-9.3.1.2-4.fc42.x86_64
    msp430-elf-gcc-debuginfo-9.3.1.2-4.fc42.x86_64
    msp430-elf-gdb-debuginfo-9.3.1.2-4.fc42.x86_64
    msp430-elf-toolchain-debugsource-9.3.1.2-4.fc42.x86_64
    msp430-elf-gdb-9.3.1.2-4.fc42.x86_64
    

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    DNF 搜索 MSP430
    更新和加载存储库:
    已加载存储库。
    匹配字段:摘要
    用于 MSP430 MCU 的 mspdebug.x86_64 调试器和 gdb 代理