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.

[参考译文] LAUNCHXL2-570LC43:示例项目0不工作

Guru**** 663810 points
Other Parts Discussed in Thread: LAUNCHXL2-570LC43, TMS570LC4357
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1159951/launchxl2-570lc43-example-project-0-is-not-working

器件型号:LAUNCHXL2-570LC43
主题中讨论的其他器件: TMS570LC4357

你好

我正在尝试从 https://git.ti.com/git/hercules_examples/hercules_examples.git 获取的源树运行 LaunchPad/570LS/570LC43/Project_0

它不起作用、我从复位开始进入一个 UNDEF 状态。 系统详细信息:在64位 PC 上运行的 Ubuntu 22.04LTS、CCS 11.1.0.00011、目标 LAUNCHXL2-570LC43

通过在地址0处/附近反汇编代码、我知道它为什么不起作用;二进制代码似乎是垃圾代码。

下面是反汇编窗口的输出(_c_int00符号位于0x21CC、其中包含有效代码)

另请注意、我没有修改源树中的任何内容。

我可能会出什么问题?

52               b  _c_int00
         $./source/HL_sys_intvecs.asm:52:66$()、resetEntry():
00000000:  710800EA           smlattvc  R8、R10、r0、r0
54               b  undefEntry
         解 defEntry:
00000004:  FEFFFFEA           cdp2      P15、#0xF、C15、C15、C10、 7号
56               b  svcEntry
         svcEntry:
00000008:  FEFFFFEA           cdp2      P15、#0xF、C15、C15、C10、 7号
58               b  预取指令
         PrefetchEntry:
0000000c:  FEFFFFEA           cdp2      P15、#0xF、C15、C15、C10、 7号
60b                 DataEntry
         数据尝试:
00000010:  FEFFFFEA           cdp2      P15、#0xF、C15、C15、C10、 7号
61b                 相位中断

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [引用 userid="64774" URL"~/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1159951/launchxl2-570lc43-example-project-0-is-not-working "]通过反汇编地址0处/附近的代码,我知道它不起作用的原因;二进制代码似乎是垃圾代码。

    执行重新编译后、是否可以粘贴 CCS 编译控制台的输出?

    我刚刚在 Ubuntu 18.04.6 LTS 下使用11.1.0.00011、使用 TI v18.12.5 ARM 编译 器尝试了该示例、该程序在 LAUNCHXL2-570LC43上运行。

    反汇编窗口的输出显示了与您的不同字节序的指令:

              $../source/HL_sys_intvecs.asm:52:66$(), resetEntry():
    00000000:   EA000EC7            b          _c_int00
    54                b   undefEntry
              undefEntry:
    00000004:   EAFFFFFE            b          undefEntry
    56                b   svcEntry
              svcEntry:
    00000008:   EAFFFFFE            b          svcEntry
    58                b   prefetchEntry
              prefetchEntry:
    0000000c:   EAFFFFFE            b          prefetchEntry
    60                b   dataEntry
              dataEntry:
    00000010:   EAFFFFFE            b          dataEntry
    61                b   phantomInterrupt
    00000014:   EA000F4A            b          phantomInterrupt

    该工程设置为"be32"的器件字节序、这对于 TMS570LC4357是正确的。

    如果将工程属性从 器件字节序"be32"更改为"be8"、则程序会中断、并且我会收到与您相同的错误反汇编报告:

              $../source/HL_sys_intvecs.asm:52:66$(), resetEntry():
    00000000:   C70E00EA            strgt      r0, [r14, -r10, ror #1]
    54                b   undefEntry
              undefEntry:
    00000004:   FEFFFFEA            cdp2       p15, #0xf, c15, c15, c10, #7
    56                b   svcEntry
              svcEntry:
    00000008:   FEFFFFEA            cdp2       p15, #0xf, c15, c15, c10, #7
    58                b   prefetchEntry
              prefetchEntry:
    0000000c:   FEFFFFEA            cdp2       p15, #0xf, c15, c15, c10, #7
    60                b   dataEntry
              dataEntry:
    00000010:   FEFFFFEA            cdp2       p15, #0xf, c15, c15, c10, #7
    61                b   phantomInterrupt

    过去确实出现了 CCS 未将--be32选项传递给链接器的问题、导致了相同的故障、尽管是 TI ARM Clang 编译器-请参阅 TMS570LC4357:使用 TI Arm Clang 编译器

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

    您好 Chester

    已附加干净重建的输出。 我记得在 CCS 中看到了"字节序设置"(它是 be32)、但我似乎不记得它在哪里。 请给我指出吗? 此外、如您所见、在构建输出中、没有明显的迹象表明使用了字节序。

    最棒的

    杜尔加

    ****针对项目 TMS570LC43x_LaunchPad_Project0的纯净配置编译****

    清洁
     
    RM -RF "TMS570LC43x_LaunchPad_Project0.hex""TMS570LC43x_LaunchPad_Project0.out"
    rm -rf "source/hl_evc.obj" source/hl_errats.obj "source/hl_errata_ssw021_45.obj" source/hl_esme.obj "source/hl_gio.obj s"s/source/hl_some.hl" s/source/hl_some.obj "hl" s/source/hl_some.hl_source/hl_some.hl"
    rm -rf "source/HL_EPC.d" source/HL_errata.d""source/HL_errata_SSWF021_45.d""SOURCE /HL_Gio.d" SOURCE /HL_nmpue.d" SOURCE /HL_SYS_SYS_notification.d""SOURCE /HL_HL.hl_mux.d" SOURCE "hl_SYS/HL.hl_SOURCE "hl_SYS/HL.d" SOURCE "hl_SYS/HL.d" SOURCE "hl_SYS/HL.d" SOURCE "hl_SYS_SYS/HL.d" SOURCE "hl_SYS/HL.d" SOURCE "hl_SYS_SYS/HL.d" SOURCE "hl_SYS_SYS/HL.d" SOURCE "hl_SYS/HL.d" SOUR
    rm -rf"source/hl_sys_core.d""source/hl_sys_intvecs.d""source/hl_sys_mpu.d" source/hl_sys_PMU.d"
    已完成清理
     

    ****构建完成****

    ****项目 TMS570LC43x_LaunchPad_Project0的配置调试构建****

    全部制作
     
    编译文件:"../source/HL_epc.c
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_evc.d_raw" /source/HL_epc.c -source"-"。
    已完成构建:"./source/HL_epc.c
     
    编译文件:"../source/HL_errata.c
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_errata.d_raw" --/source/HL_errata.c
    已完成构建:"./source/HL_errata.c
     
    编译文件:"../source/HL_errata_SSWF021_45.c
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_errata_sprue_sprue_directory="/source/HL_errata_SSWF021_45.c --"-raus_directory="raine.d"-".prue_directory="source_.pru.prue_.prue_directory"。
    已完成构建:"./source/HL_errata_SSWF021_45.c
     
    编译文件:"../source/HL_esm.c
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_esm.d_raw"-directory="source"-/source/HL_esm.c 。
    已完成构建:"./source/HL_esm.c
     
    编译文件:"../source/HL_gio.c
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_gio.d" -source_"/source/HL_gio.c。
    已完成构建:"./source/HL_gio.c
     
    编译文件:"../source/HL_nmpu.c
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_nmpu="source"-"/source/HL_nmpu.c  
    已完成构建:"./source/HL_nmpu.c
     
    编译文件:"../source/HL_notification.c
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependencion="source/hl_notification.d_raw" -"/source/HL_notification.c。
    已完成构建:"./source/HL_notification.c
     
    编译文件:"../source/HL_pinmux.c
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_pinmux.d" -source_directory="/source/HL_pinmux.c。
    已完成构建:"./source/HL_pinmux.c
     
    编译文件:"../source/HL_sys_core.asm
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_core_core.d"--/source/HL_sys_core.asm 。
    已完成构建:"./source/HL_sys_core.asm
     
    编译文件:"../source/HL_sys_dma.c
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_sys_dma_data.file" --/source/HL_sys_dma.c。
    已完成构建:"./source/HL_sys_dma.c
     
    编译文件:"../source/HL_sys_intvecs.asm
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_sys_intvecs" --/source/HL_sys_intvecs.asm
    已完成构建:"./source/HL_sys_intvecs.asm
     
    编译文件:"../source/HL_sys_main.c
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_sys_directory="source_/source/HL_sys_main.c --"。
    "../source/HL_sys_main.c,第83行:警告:语句不可达
    已完成构建:"./source/HL_sys_main.c
     
    编译文件:"../source/HL_sys_mpu.asm
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_sys_mpu_directory="source"--/source/HL_sys_mpu.asm  
    已完成构建:"./source/HL_sys_mpu.asm
     
    编译文件:"../source/HL_sys_pcr.c
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_cr_directory="/source/HL_sys_pcr.c --"
    已完成构建:"./source/HL_sys_pcr.c
     
    编译文件:"../source/HL_sys_phantom.c
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_phant_directory="/source/HL_sys_phantom.c --"。
    已完成构建:"./source/HL_sys_phantom.c
     
    编译文件:"../source/HL_sys_pmm.c
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_sys_pMM_filter" --/source/HL_sys_pmm.c
    已完成构建:"./source/HL_sys_pmm.c
     
    编译文件:"../source/HL_sys_pmu.asm
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_sys_pMM_file.d" --/source/HL_sys_pmu.asm。
    已完成构建:"./source/HL_sys_pmu.asm
     
    编译文件:"../source/HL_sys_startup.c
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_sys_startup_directory="/source/HL_sys_startup.c --source_""。
    已完成构建:"./source/HL_sys_startup.c
     
    编译文件:"../source/HL_sys_vim.c
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_sys_vim_directory="source"--/source/HL_sys_vim.c。  
    已完成构建:"./source/HL_sys_vim.c
     
    编译文件:"../source/HL_system.c
    调用:ARM 编译器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/hl_system.d_raw" --/source/HL_system.c。
    已完成构建:"./source/HL_system.c
     
    构建目标:"TMS570LC43x_LaunchPad_Project0.out"
    调用:ARM 链接器
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl /source/HL_errata.obj /source/HL_gio.obj /source/HL_pinmux.obj /source/HL_sys_intvecs.obj /source/HL_sys_pcr.obj /source/HL_sys_pmu.obj /source/HL_system.obj -mv7R5 -code_state=32 --float_support=VFPv3D16 --enum_type=packed --abi=eabi -z --heap_size=0x800 --stack_size=0x800 -i"--reread_libs --warn_sections --rom_model -/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib /source/HL_errata_SSWF021_45.obj /source/HL_nmpu.obj /source/HL_sys_core.obj /source/HL_sys_main.obj /source/HL_sys_phantom.obj /source/HL_sys_startup.obj /source/HL_sys_link.cmd "/source/HL_epc.obj ".prine"/source/HL_esm.obj "./source/HL_notification.obj ".prina.ino"/source/HL_sys_dma.obj ".prina.ina.ino"/source/HL_sys_mpu.obj ".trabs./source/HL_sys_pmm.obj /source/HL_sys_vim.obj  

    已完成构建目标:"TMS570LC43x_LaunchPad_Project0.out"
     

    ****构建完成****

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

    你好

    我在 CCS 中找到了字节序设置。 它设置为"大"。 将其设置为'be32'会使代码运行。 但是、我仍然看不到 LED 闪烁(正如我在重新成像闪存之前在原电路板上一样)。 在任何情况下、我现在有一个单独的问题:在 CCS 中的"字节序"设置上、有四个选项:

    "大"、"小"、"be32"和"be8"。 我的问题是、"big"、"be32"和"be8"之间有何区别? 为什么小端字节序器件没有等效项?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [引用 userid="64774" URL"~/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1159951/launchxl2-570lc43-example-project-0-is-not-working/4361529 #4361529"]我的问题是,'big'、'be32'和'be8'之间有何区别?

    Code Composure 器件字节序选项 之前在这些选项之间存在一些差异。

     来自 ARM 站点的 BE-32和 BE-8总线之间的差异有一些更多的信息、尽管它来自 《ARM1156T2F-S 技术参考手册》、而不是 Cortex-R5。

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

    感谢你的帮助。 让我进一步调试一下 LED 为什么仍然不闪烁(红色"ERR" LED 有时会亮起)、可能是我将打开另一个支持请求单。 但能够在目标上调试代码当然会有所帮助。