配置 FreeRTOS 报错
-
build] C:\WINDOWS\system32\cmd.exe /C "cd . && C:\Users\luxiaowei\AppData\Roaming\yt_config_tool\gcc-arm-none-eabi-10.3-2021.10\bin\arm-none-eabi-g++.exe -mcpu=cortex-m33 -Wl,--start-group -mcpu=cortex-m33 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -specs=nosys.specs -o YTM32B1ME05G0MLLT.elf CMakeFiles/YTM32B1ME05G0MLLT.elf.dir/app/main.c.o CMakeFiles/YTM32B1ME05G0MLLT.elf.dir/app/app.c.o -Wl,--whole-archive libGENERATED_CONFIG_TARGET.a libGENERATED_SDK_TARGET.a libFREERTOS.a -Wl,--no-whole-archive -Xlinker --gc-sections -nostartfiles --entry=Reset_Handler -TF:/5_Git/1_CompanyProject/LDD01A1/board/yt_linker.ld -Wl,-Map=YTM32B1ME05G0MLLT.map -Wl,--end-group libGENERATED_CONFIG_TARGET.a libGENERATED_SDK_TARGET.a libFREERTOS.a && C:\WINDOWS\system32\cmd.exe /C "cd /D F:\5_Git\1_CompanyProject\LDD01A1\build && arm-none-eabi-size --format=berkeley YTM32B1ME05G0MLLT.elf && cd /D F:\5_Git\1_CompanyProject\LDD01A1\build && C:\Users\luxiaowei\AppData\Roaming\yt_config_tool\gcc-arm-none-eabi-10.3-2021.10\bin\arm-none-eabi-objcopy.exe -F elf32-littlearm -O ihex F:/5_Git/1_CompanyProject/LDD01A1/build/YTM32B1ME05G0MLLT.elf F:/5_Git/1_CompanyProject/LDD01A1/build/YTM32B1ME05G0MLLT.hex""
[build] c:/users/luxiaowei/appdata/roaming/yt_config_tool/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: libFREERTOS.a(timers.c.o): in functionxTimerCreateTimerTask': [build] F:/5_Git/1_CompanyProject/LDD01A1/rtos/freertos/timers.c:294: undefined reference to
vApplicationGetTimerTaskMemory'
[build] c:/users/luxiaowei/appdata/roaming/yt_config_tool/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: libFREERTOS.a(tasks.c.o): in functionprvCreateIdleTasks': [build] F:/5_Git/1_CompanyProject/LDD01A1/rtos/freertos/tasks.c:3596: undefined reference to
vApplicationGetIdleTaskMemory'
[build] collect2.exe: error: ld returned 1 exit status
[build] ninja: build stopped: subcommand failed.
[proc] 命令“"E:\Program Files\CMake\bin\cmake.EXE" --build f:/5_Git/1_CompanyProject/LDD01A1/build --config Debug --target all --”已退出,代码为 1
[driver] 生成完毕: 00:00:00.983
[build] 生成已完成,退出代码为 1在 FreeRTOS.h 中手动将 configKERNEL_PROVIDED_STATIC_MEMORY 置 1,编译正常通过无错误,在 YT Config Tool 工具中 FreeRTOS 界面未发现将此宏定义置 1 的地方,该如何解决?
-
这里可以定义宏。
加上即可-DYOUR_MACRO_DEFINE
-
我的目的不是通过编译,而是想将源码文件中这个宏定义置 1,方便我后期阅读代码。如果我手动将宏定义置 1,但是下次生成配置时会将源码中的宏定义置 0。
-
在YCT的指定位置设置:
-DconfigKERNEL_PROVIDED_STATIC_MEMORY=1
之后会在生成的CMake中加上
target_compile_options(${PROJECTNAME} PUBLIC -DconfigKERNEL_PROVIDED_STATIC_MEMORY=1 )
这时候不管编译什么文件,都会默认指定了这个宏
configKERNEL_PROVIDED_STATIC_MEMORY
并且值为1。在vscode中的话,使用C/Cpp扩展,设定了compilecommands.json的路径后,会给扩展对应的设定,所以再vscode里面也会显示成灰色:
快速上手云途开发生态
发帖前请查看
帮助改进和优化YT CONFIG TOOL,有机会抽取YTM32B1ME0 EVB哦...