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.

[参考译文] CC1310:在不同工程中运行相同代码时出现问题

Guru**** 2644665 points

Other Parts Discussed in Thread: CC1310

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

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/1582258/cc1310-problem-running-the-same-code-in-different-projects

器件型号: CC1310

void Task01_init(void) {
    Task_Params Despachador_TaskParams;
    Task_Params_init(&Despachador_TaskParams);
    Despachador_TaskParams.stackSize = DESPACHADOR_TASK_STACK_SIZE;
    Despachador_TaskParams.priority = 2; 
    Despachador_TaskParams.stack = &Despachador_TaskStack;
    Despachador_TaskParams.arg0 = (UInt)1000000;
    Task_construct(&Despachador_TaskStruct, Task_Control_DespachadorFxn, &Despachador_TaskParams, NULL);
}

void UART_Task02_Init(void){
    //////// UART Task ///////////////////////
    Task_Params taskParams;
    Task_Params_init(&taskParams);
    taskParams.stack = uartTaskStack;
    taskParams.stackSize = UART_STACK_SIZE;
    taskParams.priority = 2;
    Task_construct(&uartTaskStruct, uartTaskFxn, &taskParams, NULL);//*/
}

void RF_Task03_Init(){

    Task_Params rf_taskParams;
    Task_Params_init(&rf_taskParams);
    rf_taskParams.stack = rf_TaskStack;
    rf_taskParams.stackSize = RF_TASK_STACK_SIZE;
    rf_taskParams.priority = 2;
    Task_construct(&rf_TaskStruct, rfTaskFxn, &rf_taskParams, NULL);
}

void Task04_Init(){

    Task_Params taskParams;
    Task_Params_init(&taskParams);
    taskParams.stack = taskGTStack;
    taskParams.stackSize = TASK_G_T_STACK_SIZE;
    taskParams.priority = 2;

    Task_construct(&taskGiroTagStruct, taskGT, &taskParams, NULL);
}


int main(void)
{

    /* Call driver init functions. */
    Board_initGeneral();
    GPIO_init();
    SPI_init();
    I2C_init();

    Task01_init();
    UART_Task02_Init(void){
    RF_Task03_Init();
    Task04_Init()

    /* Start BIOS */
    BIOS_start();

    return (0);
}


Hello Engineers.

I have a serious problem. A couple of months ago, I wrote some code to manage UART, SPI, I2C, and RF based on the Simplelink mutex sample project. It worked well, but unfortunately, I lost access to the PC that contained my work. The good news is that I have a backup of the project on Drive.

I decided to start rebuilding my project, but this time based on the rfEasyLinkTx_CC1310_LAUNCHXL_tirtos_ccs example.

I made some edits to the files

CC1310_LAUNCHXL.c and CC1310_LAUNCHXL.h to configure some output and input pins for my custom board. In rfEasyLinkTx.c, I copied and pasted my original code.

I assumed it would work fine.

After compiling, I was very disappointed because the program starts up, but I noticed that it does not configure my tasks (there are 4) correctly.

I have identified some differences.

In the mutex example, there is a mutex.cfg file, but in rfEasyLinkTx_CC1310_LAUNCHXL_tirtos_ccs, this configuration file does not exist.

Does this affect the execution of TIRTOS-based code in any way?

Why doesn't the same code I wrote in mutex.c work the same in rfEasyLinkTx.c?

I also tried to regenerate my code directly in the mutex example. I copied and pasted it, but I was disappointed because I got the following error.

undefined first referenced

symbol in file

--------- ----------------

usleep ./mutex.obj

error #10234-D: unresolved symbols remain

error #10010: errors encountered during linking; “mutex_CC1310_LAUNCHXL_tirtos_ccs.out” not built

This is very strange to me since I used usleep() without any problems in my original code.

Could you guide me to understand what might be happening here and how to fix these strange errors?

Thanks in advance.

 

 

 

 

 

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

    您好、

    很遗憾听到你失去了这么多的工作!

    听起来在互斥量示例中的 TI RTOS 配置方式可能与默认情况下的 rfEasyLinkTx 示例有所不同。

    1.导入 rfEasyLinkTx 工程时、您将在 CCS 中获得两个工程。 .cfg 文件位于 tirtos_bules 工程中、该工程由 rfEasyLinkTx 工程链接。

    .cfg 文件:这是 TI RTOS 配置文件。 您是否对此文件或此文件中的定义进行了任何更改? 请尝试在您的两个项目中进行比较。

    2. usleep:为了使用此 API ,您需要包含标准库。 我假设 mutex.c 已在执行此操作。 或者、您也可以使用 TI RTOS API Task_sleep ()。

    谢谢、

    Marie H

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

    您好、Marie H.

    感谢您的及时答复和指导。

    我正在比较.cfg 文件、发现了一些差异。 可以先确定这些差异并将它们修改为我的原始工程配置、这是一个很好的起点。 我将在稍后报告结果。

    非常感谢!

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

    您好、Marie H.

    我将 mutex.cfg 文件中的值替换为 tirtos_Builds_CC1310_LAUNCHXL_RELEASE_CCS 中 release.cfg 文件中的值、并收到此错误消息。

    发生构建文件生成错误。
    无法构建工程。 引用的 RTSC 配置工程“tirtos_Builds_CC1310_LAUNCHXL_RELEASE_CCS"包含“包含构建错误。
    构建已停止...

    我认为应该手动将.cfg 文件添加到 rfEasyLinkTx_CC1310_LAUNCHXL_tirtos_ccs 工程中。

    您是否知道有关如何执行此操作的任何分步指南?

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

    我尝试手动添加.cfg 文件、但遇到此错误。

    你有什么想法这意味着什么?

    gmake.exe:***[package.mak:202:packages/cfg/rfEasyLinkTx_CC1310_LAUNCHXL_tirtos_ccs_pem3.xdl]错误 1.
    js:“c:/ti/ccs1200/xdctools_3_62_01_16_core/packages/xdc/tools/Cmdr.xs “、第 52 行:错误:xdc.tools.configuro:由于先前的错误(状态= 2)、配置失败;“linker.cmd"已“已删除。
    gmake[1]:***[build-705048207-InProc]错误 1
    gmake:***[BUILD-705048207]错误 2.
    subdir_rules.mk:16:目标'build-705048207'的配方失败
    gmake:由于错误、目标“全部“未重制。

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