Other Parts Discussed in Thread: TMS570LS3137, HALCOGEN
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:TMS570LS3137 主题中讨论的其他部件:HALCOGEN, DP83640
使用 HalCoGen 4.06.00为 TMS570LS3137生成了一个 FreeRTOS 项目。
当我尝试编译此工程时、我会遇到以下链接器错误:
Invoking: Arm Linker "C:/ti/ccs1030/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/bin/armcl" -mv7R4 --code_state=32 --float_support=VFPv3D16 -g --diag_warning=225 --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi -z -m"freertos-test.map" --heap_size=0x800 --stack_size=0x800 -i"C:/ti/ccs1030/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/lib" -i"C:/ti/ccs1030/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="freertos-test_linkInfo.xml" --rom_model --be32 -o "freertos-test.out" "./source/adc.obj" "./source/can.obj" "./source/crc.obj" "./source/dabort.obj" "./source/dcc.obj" "./source/dmm.obj" "./source/emac.obj" "./source/emif.obj" "./source/esm.obj" "./source/gio.obj" "./source/het.obj" "./source/i2c.obj" "./source/lin.obj" "./source/mdio.obj" "./source/mibspi.obj" "./source/notification.obj" "./source/os_croutine.obj" "./source/os_event_groups.obj" "./source/os_heap.obj" "./source/os_list.obj" "./source/os_mpu_wrappers.obj" "./source/os_port.obj" "./source/os_portasm.obj" "./source/os_queue.obj" "./source/os_tasks.obj" "./source/os_timer.obj" "./source/phy_dp83640.obj" "./source/pinmux.obj" "./source/pom.obj" "./source/rtp.obj" "./source/sci.obj" "./source/spi.obj" "./source/sys_core.obj" "./source/sys_dma.obj" "./source/sys_intvecs.obj" "./source/sys_main.obj" "./source/sys_mpu.obj" "./source/sys_pcr.obj" "./source/sys_phantom.obj" "./source/sys_pmm.obj" "./source/sys_pmu.obj" "./source/sys_selftest.obj" "./source/sys_startup.obj" "./source/sys_vim.obj" "./source/system.obj" "../source/sys_link.cmd" -lrtsv7R4_T_be_v3D16_eabi.lib <Linking> undefined first referenced symbol in file --------- ---------------- xQueueCreateCountingSemaphoreStatic ./source/os_mpu_wrappers.obj xQueueCreateMutexStatic ./source/os_mpu_wrappers.obj xTimerPendFunctionCall ./source/os_mpu_wrappers.obj error #10234-D: unresolved symbols remain error #10010: errors encountered during linking; "freertos-test.out" not built
我认为 HalCoGen 创建 FreeRTOS 项目的方式可能存在错误、
下面是我的 sys_main.c、其他文件按原样包含在 HalCoGen 中。
/* Include Files */
#include "sys_common.h"
/* USER CODE BEGIN (1) */
//#include "adc.h"
#include "gio.h"
//#include "het.h"
#include "FreeRTOS.h"
#include "os_task.h"
/* USER CODE END */
/** @fn void main(void)
* @brief Application main function
* @note This function is empty by default.
*
* This function is called after startup.
* The user can use this function to implement the application.
*/
/* USER CODE BEGIN (2) */
void task_entry_fn(void *task_params)
{
const TickType_t delay = 500 / portTICK_PERIOD_MS;
for (;;)
{
gioToggleBit(gioPORTA, 0);
vTaskDelay(delay);
}
}
static const uint16_t TASK_STACK_SIZE = 100;
static const UBaseType_t TASK_PRIORITY = 1;
static const uint8_t TASK_PARAM = 0;
/* USER CODE END */
uint8 emacAddress[6U] = {0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU};
uint32 emacPhyAddress = 0U;
int main(void)
{
/* USER CODE BEGIN (3) */
//hetInit();
//pwmStart(hetRAM1, pwm0);
//adcInit();
gioInit();
TaskHandle_t created_task = NULL;
BaseType_t call_success;
call_success = xTaskCreate(task_entry_fn, /* pxTaskCode */
"main_sm", /* pcName */
TASK_STACK_SIZE, /* usStackDepth */
&TASK_PARAM, /* pvParameters */
TASK_PRIORITY, /* uxPriority */
&created_task); /* pxCreatedTask */
configASSERT(created_task);
/* USER CODE END */
return 0;
}
/* USER CODE BEGIN (4) */
/* USER CODE END */