添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Part Number: TMS320C6657

Tool/software: TI-RTOS

Hello, Dear Friends. I have a problem with including NDK to my project.

I am using next components:

-> bios_6_73_01_01

-> ndk_3_40_01_01

-> pdk_c665x_2_0_12

-> xdctools_3_51_01_18_core

var boardName = "evmC6657";
var deviceType = "c6657";
var socType = "c6657";
var osType = "tirtos";
var boardSettings = xdc.useModule("ti.board.Settings");
boardSettings.boardName = boardName;
var cslSettings = xdc.useModule("ti.csl.Settings");
cslSettings.deviceType = deviceType;
cslSettings.useCSLIntcLib = true;
var osalSettings = xdc.useModule("ti.osal.Settings");
osalSettings.osType = osType;
osalSettings.socType = socType;
var ndkSettings = xdc.useModule("ti.transport.ndk.nimu.Settings");
ndkSettings.socType = socType;
var emacSettings = xdc.useModule("ti.drv.emac.Settings");
emacSettings.socType = socType;
var Global = xdc.useModule("ti.ndk.config.Global");
Global.IPv6 = false;
var Udp = xdc.useModule("ti.ndk.config.Udp");
var Ip = xdc.useModule("ti.ndk.config.Ip");
var emacSettings = xdc.useModule("ti.drv.emac.Settings");
emacSettings.socType = socType;
var BIOS = xdc.useModule("ti.sysbios.BIOS");
var Startup = xdc.useModule("xdc.runtime.Startup");
Startup.firstFxns[Startup.firstFxns.length++] = "&knEvmInit";
var Task = xdc.useModule("ti.sysbios.knl.Task");
var taskParams = new Task.Params();
taskParams.stackSize = 32768;
Program.global.myTask = Task.create("&knUdpStart", taskParams);

Problem:

Starting build of library sources ...
making C:/workspace_8_3_0/test_udp/src/sysbios/sysbios.ae66 ...
Build of libraries done.
cle66 package/cfg/test_udp_pe66.c ...
>> Compilation failure
subdir_rules.mk:19: recipe for target 'build-286147953-inproc' failed
"C:\ti_8_3_0\ndk_3_40_01_01\packages\ti\ndk\inc\socketndk.h", line 48: fatal error: cannot open source file "sys/time.h"
1 catastrophic error detected in the compilation of "package/cfg/test_udp_pe66.c".
Compilation terminated.

What am I doing wrong?

You will need to update your include paths in the project to include the full path to sys/time.h. See this discussion:
e2e.ti.com/.../166601
Best Regards,
Yordan

I really appreciate your help.

I followed your advice, but this didn't solve the problem. I didn't include this file ("sys/time.h") in my project (and didn't include files, which contain this line).

This problem occurs when I connect one of the NDK modules (but I am not including header files).

May be I should include this path in cfg file? I tried to include the path using this code:

var build = xdc.useModule("ti.sysbios.Build");
var posixUtil = xdc.useModule("ti.posix.Util");
var incs = posixUtil.incPath("ti.targets.C66");
build.includePaths.$add(incs.pop());
bulid.includePaths.$add("-IC:/sys/time/h/folder/");
bulid.includePaths.$add("C:/sys/time/h/folder/");

But I could not decide this problem. There is no such problem with another NDK version (2_26_00_08).

Ok, this header file is included in ndk_3_40_01_01\packages\ti\ndk\inc\socketndk.h, which you use in your project.
Can you try including the whole path ~/ti/bios_6_73_01_01/packages/ti/posix/ccs/sys instead of just sys/time.h:
include "<path_to_ti>/bios_6_73_01_01/packages/ti/posix/ccs/sys"
If not you should verify that ~/ti/bios_6_73_01_01/packages/ti/posix/ccs/ is added in your include directories in your project properties.
Best Regards,
Yordan

Hello, Yordan Kovachev!

I tried your advices:

1) Your advice: Can you try including the whole path ~/ti/bios_6_73_01_01/packages/ti/posix/ccs/sys instead of just sys/time.h: include "<path_to_ti>/bios_6_73_01_01/packages/ti/posix/ccs/sys"

This works as expected.

2) Your advice: If not you should verify that ~/ti/bios_6_73_01_01/packages/ti/posix/ccs/ is added in your include directories in your project properties.

This doesn't work. I am sending my project with added in my include directories in my project properties.

test_udp.zip

Best Regards,
George

As I understand you are using a custom board which I don't have, so I cannot test your project.
If 1) works as expected is it a problem to use this solution?
Best Regards,
Yordan

Hi, Yordan!

No, I'm not using a custom board. I installed "processor_sdk_rtos_c665x_5_02_00_10" and tried build my test project.

If you got the same error: <socketndk.h: Cannot open file "sys/time.h">, help me solve it.

This solution required edit source code in NDK, it's fine?

Best Regards,

George

Ok, open a NIMU example project (i.e. the NIMU_emacExample_EVMC6678C66BiosExampleProject) and check the Includes in the project. You should see the following two include directories:
<your_home_path>/ti/bios_6_73_01_01/packages/ti/posix/ccs (if you expand this you will see folder sys, in which there is time.h).
<your_home_path>/ti/ti-cgt-c6000_8.2.2/include (here you also have time.h)
If you don't have these you need to edit your include paths (right-click on the project and select properties -> in the popup under C6000 Compiler you should have Include Options).
Or you can add the full path to ~/ti/bios_6_73_01_01/packages/ti/posix/ccs/sys/time.h in your source code (\ti_8_3_0\ndk_3_40_01_01\packages\ti\ndk\inc\socketndk.h", line 48), but this is a fix to that particular error message. It is better to update your include paths in the project properties.
Best Regards,
Yordan

Hi, Yordan!

I could find a solution for my problem: I included this path <${BIOS_CG_ROOT}/packages/ti/posix/ccs> in following place: General -> tab "Products" -> "Products and Repositories" -> button "Add" -> checkbox "Select repository from file-system". This solution is normal? I could not find a solution anywhere. Maybe it is worth adding this solution to the technical documentation?

Your advice doesn't work for "socketndk.h", only for my files.

Best Regards,
Yordan