主题中讨论的其他器件:TDA4VH
工具与软件:
您好、TI 支持团队:
我正在使用 TI TDA4VH J784S4架构、并且想使用我自己的 CPP 文件为所有可用内核(R5F 和 C7x DSP)构建标准 IPC 示例应用程序(IPC_ECHO_TEST_FreeRTOS)。
发布。 我添加了示例 c 代码、但出现了错误。
#include <iostream>
class Date
{
private:
int m_year{};
int m_month{};
int m_day{};
public:
Date(int year, int month, int day)
: m_year { year }
, m_month { month }
, m_day { day}
{
}
void print() const { std::cout << "Date(" << m_year << ", " << m_month << ", " << m_day << ")\n"; };
int getYear() const { return m_year; }
int getMonth() const { return m_month; }
int getDay() const { return m_day; }
};
TI 提供的参考链接: [常见问题解答] TDA4VM:如何从 j721e PDK 构建 C++应用程序? 是否有演示示例? -处理器论坛-处理器- TI E2E 支持论坛
我已经执行了以下文件中提到的步骤。
我在 pdk_j784s4_10_00_00_27/packages/ti/drv/ipc/examples/common/makefile.mk 中添加了"main_rtos_cpp.cpp"

生成命令: make ipc_echo_test_freertos board=j784s4_evm build_profile=release core=mcu2_0 cplusplusplus_build=yes
构建日志:
make ipc_echo_test_freertos BOARD=j784s4_evm BUILD_PROFILE=release CORE=mcu2_0 CPLUSPLUS_BUILD=yes
make -C /home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/drv/ipc/examples/linux -f makefile BUILD_OS_TYPE=freertos
make[1]: Entering directory '/home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/drv/ipc/examples/linux'
make -f makefile BUILD_OS_TYPE=freertos csl uart board udma i2c gpio pm_lib sciclient osal_freertos freertos csl_init ipc
make[2]: Entering directory '/home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/drv/ipc/examples/linux'
make[2]: Nothing to be done for 'csl'.
make[2]: Nothing to be done for 'uart'.
make[2]: Nothing to be done for 'board'.
make[2]: Nothing to be done for 'udma'.
make[2]: Nothing to be done for 'i2c'.
make[2]: Nothing to be done for 'gpio'.
make[2]: Nothing to be done for 'pm_lib'.
make[2]: Nothing to be done for 'sciclient'.
make[2]: Nothing to be done for 'osal_freertos'.
make[2]: Nothing to be done for 'freertos'.
make[2]: Nothing to be done for 'csl_init'.
make[2]: Nothing to be done for 'ipc'.
make[2]: Leaving directory '/home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/drv/ipc/examples/linux'
make -f makefile BUILD_OS_TYPE=freertos /home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/binary/ipc_echo_test_freertos/bin/j784s4_evm/ipc_echo_test_freertos_mcu2_0_release.xer5f
make[2]: Entering directory '/home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/drv/ipc/examples/linux'
# Compiling j784s4_evm:j784s4:mcu2_0:release:ipc_echo_test_freertos:../common/src/main_rtos_cpp.cpp
/bin/mkdir -p /home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/binary/ipc_echo_test_freertos/obj/j784s4_evm/mcu2_0/release/
/home/vm_user/ti/ti-cgt-armllvm_3.2.2.LTS/bin/tiarmclang -MMD -g -DMAKEFILE_BUILD -c -Wall -Wno-extra -Wno-exceptions -ferror-limit=100 -Wno-unused-command-line-argument -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -Wno-extern-initializer -Wno-excess-initializers -Wno-bitfield-constant-conversion -Wno-address-of-packed-member -Wno-c99-designator -Wno-extern-c-compat -Wno-c++11-narrowing -Wno-reorder-init-list -Wno-deprecated-register -Wno-writable-strings -Wno-enum-compare -Wno-reserved-user-defined-literal -Wno-unused-const-variable -Wno-missing-braces -fno-strict-aliasing -EL -eo.oer5f -ea.ser5f -g -mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -mthumb -march=thumbv7r -Werror -nostdlibinc -Os -DA72_LINUX_OS -DFREERTOS -DBUILD_MCU2_0 -DBUILD_MCU -DSOC_J784S4 -Dj784s4_evm=j784s4_evm -I/home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages -I/home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/kernel -I/home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/kernel/freertos/FreeRTOS-LTS/FreeRTOS-Kernel/include -I/home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/kernel/freertos/portable/TI_CGT/r5f -I/home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/kernel/freertos/config/j784s4/r5f -I/home/vm_user/ti/ti-cgt-armllvm_3.2.2.LTS/include/c -c -x c++ ../common/src/main_rtos_cpp.cpp -o /home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/binary/ipc_echo_test_freertos/obj/j784s4_evm/mcu2_0/release/main_rtos_cpp.oer5f -MF /home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/binary/ipc_echo_test_freertos/obj/j784s4_evm/mcu2_0/release/little/.deps/main_rtos_cpp.d
../common/src/main_rtos_cpp.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
^~~~~~~~~~
1 error generated.
make[2]: *** [/home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/build/makerules/rules_ti_cgt_arm.mk:205: /home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/binary/ipc_echo_test_freertos/obj/j784s4_evm/mcu2_0/release/main_rtos_cpp.oer5f] Error 1
make[2]: Leaving directory '/home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/drv/ipc/examples/linux'
make[1]: *** [/home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/build/makerules/common.mk:348: mcu2_0] Error 2
make[1]: Leaving directory '/home/vm_user/TASK/CPU_LOAD/RTOS_SDK_V10_R5F_DSP/R5F_DSP_C7x_BUILD_DEFAULT_MAKEFILE/pdk_j784s4_10_00_00_27/packages/ti/drv/ipc/examples/linux'
make: *** [makefile:328: ipc_echo_test_freertos] Error 2
如何修复此错误?