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.

[参考译文] CC2642R-Q1:TI-CGT-armllvm_2.1.2.LTS/bin/tiarmhex.exe 编译 bin、刷写后未正确启动。

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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1221192/cc2642r-q1-ti-cgt-armllvm_2-1-2-lts-bin-tiarmhex-exe-compiled-bin-that-does-not-start-properly-after-flashing

器件型号:CC2642R-Q1
Thread 中讨论的其他器件:SYSBIOSCC2650

大家好、

客户使用 ti-cgt-armllvm_2.1.2.sts/bin/tiarmhex.exe 编译的 bin 在刷写后无法正确启动、编程的十六进制文件正常。 日志如下:

Building target: "arryve_CC26X2R1_tirtos7_ticlang.out"
Invoking: Arm Linker
"C:/ti/ccs1220/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/bin/tiarmclang.exe" @"E:/djt/arryve_CC26X2R1_tirtos7_ticlang_2023/Release/syscfg/ti_ble_app_config.opt" @"E:/djt/arryve_CC26X2R1_tirtos7_ticlang_2023/Release/syscfg/ti_build_config.opt" @"C:/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/ble5stack/config/build_components.opt" @"C:/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/ble5stack/config/factory_config.opt" -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mlittle-endian -mthumb -Oz -DDeviceFamily_CC26X2 -DFLASH_ROM_BUILD -DNVOCMP_NWSAMEITEM=1 -DHEAPMGR_CONFIG=0x80 -DHEAPMGR_SIZE=0x0 -gdwarf-3 -march=armv7e-m -Wl,-m"arryve_CC26X2R1_tirtos7_ticlang.map" -Wl,-i"C:/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source" -Wl,-i"C:/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/kernel/tirtos7/packages" -Wl,-i"E:/djt/arryve_CC26X2R1_tirtos7_ticlang_2023/Release/syscfg" -Wl,-i"C:/ti/ccs1220/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/lib" -Wl,--reread_libs -Wl,--define=FLASH_ROM_BUILD=2 -Wl,--diag_suppress=16002-D -Wl,--diag_suppress=10247-D -Wl,--diag_suppress=10325-D -Wl,--diag_suppress=10229-D -Wl,--diag_suppress=16032-D -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--xml_link_info="arryve_CC26X2R1_tirtos7_ticlang_linkInfo.xml" -Wl,--rom_model -o "arryve_CC26X2R1_tirtos7_ticlang.out" "./syscfg/ti_ble_config.o" "./syscfg/ti_devices_config.o" "./syscfg/ti_radio_config.o" "./syscfg/ti_drivers_config.o" "./syscfg/ti_sysbios_config.o" "./Application/board_key.o" "./Application/multi_role.o" "./Application/multi_role_menu.o" "./Application/two_btn_menu.o" "./Application/util.o" "./Application/yk_gatt_server_app.o" "./Communication/yk_comm_queue_task.o" "./Communication/yk_comm_task.o" "./Communication/yk_uart.o" "./Drivers/NV/crc.o" "./Drivers/NV/nvocmp.o" "./ICCE/Crc16/crc16_ccit.o" "./ICCE/yk_command_hadler.o" "./Profiles/arryve_profile/cc26xx/yk_ble_gatt_service.o" "./Profiles/dev_info/cc26xx/devinfoservice.o" "./SDK/ti/ble5stack/icall/app/ble_user_config.o" "./SDK/ti/ble5stack/icall/app/icall_api_lite.o" "./SDK/ti/ble5stack/icall/src/icall.o" "./SDK/ti/ble5stack/icall/src/icall_cc2650.o" "./SDK/ti/ble5stack/icall/src/icall_user_config.o" "./SDK/ti/ble5stack/icall/stack/ble_user_config_stack.o" "./SDK/ti/ble5stack/rom/agama_r1/common_rom_init.o" "./SDK/ti/ble5stack/rom/agama_r1/rom_init.o" "./Startup/main.o" "./Startup/osal_icall_ble.o" "./custom/arryve_cc2642_golble.o" "./custom/yk_sleep.o" "./custom/uartlog/CustomUartLog.o" "../cc13x2_cc26x2_app_tirtos7.cmd" -Wl,-lti_utils_build_linker.cmd.genlibs -Wl,-l"ti/devices/cc13x2_cc26x2/driverlib/bin/ticlang/driverlib.lib" -Wl,-llibc.a
Finished building target: "arryve_CC26X2R1_tirtos7_ticlang.out"

Building secondary target: "arryve_CC26X2R1_tirtos7_ticlang.bin"
Building secondary target: "arryve_CC26X2R1_tirtos7_ticlang.hex"
Invoking: Arm Hex Utility
"C:/ti/ccs1220/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/bin/tiarmhex.exe" --diag_wrap=off --binary -o "arryve_CC26X2R1_tirtos7_ticlang.bin" "arryve_CC26X2R1_tirtos7_ticlang.out"
Invoking: Arm Objcopy Utility
"C:/ti/ccs1220/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/bin/tiarmobjcopy.exe" "arryve_CC26X2R1_tirtos7_ticlang.out" "arryve_CC26X2R1_tirtos7_ticlang.hex"
Translating to Binary format...
"arryve_CC26X2R1_tirtos7_ticlang.out" .resetVecs ==> .resetVecs
"arryve_CC26X2R1_tirtos7_ticlang.out" .rodata.1 ==> .rodata.1
"arryve_CC26X2R1_tirtos7_ticlang.out" .text ==> .text
"arryve_CC26X2R1_tirtos7_ticlang.out" .rodata.2 ==> .rodata.2
"arryve_CC26X2R1_tirtos7_ticlang.out" .cinit ==> .cinit
"arryve_CC26X2R1_tirtos7_ticlang.out" .ccfg ==> .ccfg
Finished building secondary target: "arryve_CC26X2R1_tirtos7_ticlang.bin"
Finished building secondary target: "arryve_CC26X2R1_tirtos7_ticlang.hex"

以下两个命令生成的 bin 文件之间有何区别? 为什么命令1生成的 bin 文件不能正确刻录?  

:1 μ s  

"C:/ti/ccs1220/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/bin/tiarmhex.exe "--diag_wow=off -二进制-o simple_peripheral_CC26X2R1_LAUNCHXL_tirtos7_ticlang.bin" simple_peripheral_CC26X2R1_LAUNCHXL_tirtos7_ticlang.out"

//在同一代码中,此命令生成的二进制大小为137KB,芯片在烧录后无法正确启动。  

命令2:

C:/ti/ccs1220/ccs/utils/tiobj2bin/tiobj2bin array_CC26X2r1_tirtos7_ticlang.out arryve_CC26X2R1_tirtos7_ticlang.bin C:/ti/ccs1220/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/bin/tiarmofd C:/ti/ccs1220/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/bin/tiarmhex C:/ti/ccs1220/ccs/utils/tiobj2bin/mkhex4bin

//在同一个代码中,此命令生成大于十六进制文件大小352KB 的 bin 文件,此文件在文件烧录后正常开始。  

谢谢。

此致、

樱桃

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

    请阅读文章 二进制文件简介。  专注于了解孔洞是如何产生的。  命令1完全忽略孔洞。  空洞任一侧的字节在由命令1生成的二进制文件中相邻。  如您所见、这不起作用。  命令2使用0来填充这些空洞。

    谢谢。此致、

    -George.

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

    您好、George、

    感谢您的支持。

    其 bin 文件的实际大小为138KB。 使用命令2、在孔洞填充0后、文件大小变为352KB。 如何控制孔的填充大小?  

    谢谢。此致、

    樱桃

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [报价 userid="496057" url="~/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1221192/cc2642r-q1-ti-cgt-armllvm_2-1-2-lts-bin-tiarmhex-exe-compiled-bin-that-does-not-start-properly-after-flashing/4624715 #4624715"]孔的填充大小如何控制?  [/报价]

     二进制文件简介一文对此进行了讨论。  它是内存中已初始化段末尾与下一个已初始化段开始之间的间隙。  该间隙可能是由未初始化的段使用的存储器。  或者、它可能是系统中不存在的存储器。  可能存在多个间隙。

    谢谢。此致、

    -George.

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

    您好、 George、

    请问为什么这些缺口会影响芯片的启动?

    谢谢。此致、

    樱桃

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

    如果没有间隙、二进制文件不会表示系统启动时的存储器状态。  如果直接将其复制到存储器中、并且完全加载正常、那么指令和数据最后会加载到错误的地址。

    谢谢。此致、

    -George.