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.

[参考译文] ARM-CGT:链接器内部错误报告

Guru**** 2535450 points
Other Parts Discussed in Thread: SYSCONFIG

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1566485/arm-cgt-linker-internal-error-report

器件型号:ARM-CGT
主题:SysConfig 中讨论的其他器件

工具/软件:

您好的团队、

我报告了在 CC2745-Q1 演示中添加 ADCBuf 驱动程序时出现的问题。

SDK 版本为 SDK 9.11.1.19。

编译器版本为 ti-cgt-armllvm_4.0。

我在 SysConfig 中添加 ADCBuf、然后将 app_driver.c 添加到工程中:

#include <string.h>
#include <stdarg.h>

#include "ti_drivers_config.h" // sysconfig
#include <ti/drivers/ADCBuf.h> // driver

#include "ti/ble/app_util/framework/bleapputil_api.h"
#include <app_main.h>

// Define name for ADCBuf channel index
#define PIEZOMETER_OUT    0

// Create buffer for samples
#define ADCBUFFERSIZE     10
uint16_t buffer[ADCBUFFERSIZE];
uint32_t microvoltBuffer[ADCBUFFERSIZE];

bStatus_t Driver_start(void)
{
    bStatus_t status = SUCCESS;

    // One time init of ADCBuf driver
    ADCBuf_init();
    // Initialize optional ADCBuf parameters
    ADCBuf_Handle adcBufHandle;
    ADCBuf_Params params;

    ADCBuf_Params_init(&params);
    params.returnMode = ADCBuf_RETURN_MODE_BLOCKING;
    params.recurrenceMode = ADCBuf_RECURRENCE_MODE_ONE_SHOT;

    // Open ADCBuf driver
    adcBufHandle = ADCBuf_open(CONFIG_ADCBUF_0, &params);
    if (adcBufHandle == NULL)
    {
        //ADCBuf_open() failed.
        while (1) {}
    }
    return status;
}

编译日志是

[264]Building target: "basic_ble_LP_EM_CC2745R10_Q1_freertos_ticlang.out"
[265]Invoking: Arm Linker
[266]"C:/ti/ti-cgt-armllvm_4.0.4.LTS/bin/tiarmclang.exe" @"C:/ti/simplelink_lowpower_f3_sdk_9_11_01_19/source/ti/ble/stack_util/config/build_components.opt" @"C:/ti/simplelink_lowpower_f3_sdk_9_11_01_19/source/ti/ble/stack_util/config/factory_config.opt"  -mcpu=cortex-m33 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -mlittle-endian -mthumb -Oz -DICALL_NO_APP_EVENTS -DCC23X0 -DUSE_HSM -DNVOCMP_NWSAMEITEM=1 -DNVOCMP_NVPAGES=6 -DFREERTOS -DNVOCMP_POSIX_MUTEX -gdwarf-3 -Wunused-function -ffunction-sections -Wl,-m"basic_ble_LP_EM_CC2745R10_Q1_freertos_ticlang.map" -Wl,-i"C:/ti/simplelink_lowpower_f3_sdk_9_11_01_19/source" -Wl,-i"C:/Users/A0503807/Valeo-CC2745/basic_ble_LP_EM_CC2745R10_Q1_freertos_ticlang/Release/syscfg" -Wl,-i"C:/ti/ti-cgt-armllvm_4.0.4.LTS/lib" -Wl,--reread_libs -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--xml_link_info="basic_ble_LP_EM_CC2745R10_Q1_freertos_ticlang_linkInfo.xml" -Wl,--rom_model -o "basic_ble_LP_EM_CC2745R10_Q1_freertos_ticlang.out" "./syscfg/ti_ble_config.o" "./syscfg/ti_devices_config.o" "./syscfg/ti_radio_config.o" "./syscfg/ti_drivers_config.o" "./syscfg/ti_freertos_config.o" "./syscfg/ti_freertos_portable_config.o" "./main_freertos.o" "./HealthToolkit/debugInfo.o" "./app/Profiles/app_dev_info.o" "./app/Profiles/app_simple_gatt.o" "./app/app_broadcaster.o" "./app/app_central.o" "./app/app_connection.o" "./app/app_data.o" "./app/app_driver.o" "./app/app_l2cap_coc.o" "./app/app_main.o" "./app/app_menu.o" "./app/app_observer.o" "./app/app_pairing.o" "./app/app_peripheral.o" "./common/BLEAppUtil/bleapputil_init.o" "./common/BLEAppUtil/bleapputil_process.o" "./common/BLEAppUtil/bleapputil_stack_callbacks.o" "./common/BLEAppUtil/bleapputil_task.o" "./common/BLEAppUtil/bleapputil_timers.o" "./common/Drivers/NV/crc.o" "./common/Drivers/NV/nvocmp.o" "./common/MenuModule/menu_module.o" "./common/Profiles/simple_gatt/simple_gatt_profile.o" "./common/Services/dev_info/dev_info_service.o" "./common/Startup/osal_icall_ble.o" "./common/Startup/rom_init.o" "./common/config/ble_user_config.o" "./common/config/hci_supported_cmd.o" "./common/iCall/icall_POSIX.o" "./common/iCall/icall_cc23x0.o" "./common/iCall/icall_user_config.o" "./common/lib_opt/ctrl_opt_adaptivity.o" "./common/lib_opt/ctrl_opt_adv_conn.o" "./common/lib_opt/ctrl_opt_adv_nconn.o" "./common/lib_opt/ctrl_opt_ae.o" "./common/lib_opt/ctrl_opt_ble_health.o" "./common/lib_opt/ctrl_opt_cm.o" "./common/lib_opt/ctrl_opt_connectable.o" "./common/lib_opt/ctrl_opt_connection_handover.o" "./common/lib_opt/ctrl_opt_cs.o" "./common/lib_opt/ctrl_opt_cs_test.o" "./common/lib_opt/ctrl_opt_health_check.o" "./common/lib_opt/ctrl_opt_initiator.o" "./common/lib_opt/ctrl_opt_legacy_cmd.o" "./common/lib_opt/ctrl_opt_padv.o" "./common/lib_opt/ctrl_opt_power_control.o" "./common/lib_opt/ctrl_opt_pscan.o" "./common/lib_opt/ctrl_opt_rssi_monitor.o" "./common/lib_opt/ctrl_opt_scanner.o" "./common/lib_opt/host_opt_gap_bond_mgr.o" "../cc27xx_freertos.cmd"  -Wl,-lti_utils_build_linker.cmd.genlibs -Wl,-llibc.a 
[267]../../master/ELFLNK/collect.c:795:internal fatal error #10478: (.TI.bound:dmaChannel5ControlTableEntry)
 
[268]INTERNAL ERROR: C:\ti\ti-cgt-armllvm_4.0.4.LTS\bin\tiarmlnk had an internal inconsistency and aborted
 
[269]This is caused by a defect in the TI Linker.
[270]TI Customer Support may be able to suggest a workaround to avoid this.
 
[271]Upgrading to the newest version of the compiler may fix this problem.
 
[272]Contact TI on the E2E support forums at http://e2e.ti.com
 
[273]We need to see this ENTIRE error message and a complete, reproducible
[274]test case including ALL of the command-line options.
[275]Include all of the object files, libraries, and linker command files
[276]used to link the program.
 
[277]tiarmclang: error: tiarmlnk command failed with exit code 2 (use -v to see invocation)
[278]gmake[1]: *** [makefile:218: basic_ble_LP_EM_CC2745R10_Q1_freertos_ticlang.out] Error 2
[279]gmake: *** [makefile:212: all] Error 2
[280]**** Build Finished ****

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

    这是编译后的演示。

    tidrive.itg.ti.com/.../985fe204-d2c2-4360-ae18-78c26ea519a6   

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

    我想答案是: e2e.ti.com/.../cc2745r10-q1-adding-adcbuf-to-basic-ble

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

    已修复、方法是禁用 SysConfig 并更改为 DMA 通道 8。

    /*
        *  =============================== ADCBuf ===============================
        */
    
    #include <ti/drivers/GPIO.h>
    #include <ti/drivers/ADCBuf.h>
    #include <ti/drivers/adcbuf/ADCBufLPF3.h>
    #include <ti/drivers/dma/UDMALPF3.h>
    
    #include <ti/devices/DeviceFamily.h>
    #include DeviceFamily_constructPath(driverlib/evtsvt.h)
    
    #define CONFIG_ADCBUF_COUNT 1
    
    
    ALLOCATE_CONTROL_TABLE_ENTRY(dmaChannel8ControlTableEntry, 8 + UDMA_PRI_SELECT);
    ALLOCATE_CONTROL_TABLE_ENTRY(dmaChannel8AltControlTableEntry, 8 + UDMA_ALT_SELECT);
    
    ALLOCATE_CONTROL_TABLE_ENTRY(dmaChannel11ControlTableEntry, 11 + UDMA_PRI_SELECT);
    
    /*
     *  ======== ADCBufLPF3_objects ========
     */
    ADCBufLPF3_Object ADCBufLPF3_objects[CONFIG_ADCBUF_COUNT];
    
    /*
     *  ======== ADCBuf Channel Lut ========
     */
    const ADCBufLPF3_AdcChannelLutEntry ADCBufLPF3_channelLutCONFIG_ADCBUF_0[1] = {
    
        /* CONFIG_ADC_CHANNEL_0 */
        {
            .refVoltage      = 3300000,
            .adcInputDIO     = CONFIG_GPIO_ADC_CHANNEL_0,
            .internalChannel = 0,
            .refSource       = ADCLPF3_VDDS_REFERENCE,
        },
    };
    
    
    /*
     *  ======== ADCBufLPF3_hwAttrs ========
     */
    const ADCBufLPF3_HWAttrs ADCBufLPF3_hwAttrs[CONFIG_ADCBUF_COUNT] = {
        /* CONFIG_ADCBUF_0 */
        {
            .dataDmaTableEntryPri = &dmaChannel8ControlTableEntry,
            .dataDmaTableEntryAlt = &dmaChannel8AltControlTableEntry,
            .auxDmaTableEntryPri  = &dmaChannel11ControlTableEntry,
            .adcChannelLut        = ADCBufLPF3_channelLutCONFIG_ADCBUF_0,
            .resolutionBits       = ADCLPF3_RESOLUTION_12_BIT,
            .dataDmaChannelMask   = UDMA_CHANNEL_8_M,
            .auxDmaChannelMask    = UDMA_CHANNEL_11_M,
            .dataDmaSubscriberId  = EVTSVT_DMA_CH8,
            .auxDmaSubscriberId   = EVTSVT_DMA_CH11,
            .intPriority          = (~0),
            .adcRefPosDIO         = GPIO_INVALID_INDEX,
            .adcRefNegDIO         = GPIO_INVALID_INDEX,
        },
    };
    
    /*
     *  ======== ADCBuf_config ========
     */
    const ADCBuf_Config ADCBuf_config[CONFIG_ADCBUF_COUNT] = {
        /* CONFIG_ADCBUF_0 */
        {
            .fxnTablePtr    = &ADCBufLPF3_fxnTable,
            .object         = &ADCBufLPF3_objects[CONFIG_ADCBUF_0],
            .hwAttrs        = &ADCBufLPF3_hwAttrs[CONFIG_ADCBUF_0]
        },
    };
    
    const uint_least8_t CONFIG_ADCBUF_0_CONST = CONFIG_ADCBUF_0;
    const uint_least8_t ADCBuf_count = CONFIG_ADCBUF_COUNT;