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.
Generated a FreeRTOS project for TMS570LS3137 using HalCoGen 4.06.00.
When I try to build this project, I get the following linker error:
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
I believe there may be a bug in the way that HalCoGen creates FreeRTOS projects,
Below is my sys_main.c, other files are included as-is from 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 */
Hi Ross,
Just compiled a freeRTOS example project generated by HALCoGen 4.07.01, I didn't see nay error. Please update your HALCoGen to the latest version: 4.07.01.
Thank you QJ, updating to 4.07.01 resolved the linker error.
Note that I attempted to update HalCoGen from 4.07.00 on using Help->Check For Update, but it said 4.07.00 was latest. I had to go onto the TI website to update manually to 4.07.01.