I am getting this error:
[C64XP] 00000.000 FATAL: NDK_hookCreate() must be set in DSP/BIOS HOOK config
When trying to run my program on the TCI6482DSK.
I am using CCV5.2 (also tried 5.1) and dsp/bios 5.41.11.38 and ndk 1.92
Any idea?
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.
I am getting this error:
[C64XP] 00000.000 FATAL: NDK_hookCreate() must be set in DSP/BIOS HOOK config
When trying to run my program on the TCI6482DSK.
I am using CCV5.2 (also tried 5.1) and dsp/bios 5.41.11.38 and ndk 1.92
Any idea?
Hi Bryan,
Can you give a few more details? When does it occur (e.g. within a Task that is trying to use networking APIs)? Did you plug in any hook functions?
Did you call fdOpenSession as required (this is the one I always forgot to do)?
Todd
It happens just after I hit run. I'm not sure where it occurs but it is after some network related functions. As far as I know there are no hook functions. This is a legacy project so I am not sure. How can I tell if hook functions are plugged in? I do see fdOpenSession throughout the code.
Here is more of the console output.
[C64XP] Using MAC Address: 00-0e-99-02-7b-26
[C64XP] System local IP address: 192.168.0.3
[C64XP] 00000.000 FATAL: NDK_hookCreate() must be set in DSP/BIOS HOOK config
[C64XP] 00000.000 FATAL: NDK_hookCreate() must be set in DSP/BIOS HOOK config
[C64XP] Service Status: Telnet : Enabled : : 000
[C64XP] 00000.000 FATAL: NDK_hookCreate() must be set in DSP/BIOS HOOK config
[C64XP] 00000.000 FATAL: NDK_hookCreate() must be set in DSP/BIOS HOOK config
[C64XP] 00000.000 FATAL: NDK_hookCreate() must be set in DSP/BIOS HOOK config
[C64XP] 00000.000 FATAL: NDK_hookCreate() must be set in DSP/BIOS HOOK config
[C64XP] 00000.000 FATAL: NDK_hookCreate() must be set in DSP/BIOS HOOK config
[C64XP] 00000.000 FATAL: NDK_hookCreate() must be set in DSP/BIOS HOOK config
[C64XP] 00000.000 FATAL: NDK_hookCreate() must be set in DSP/BIOS HOOK config
[C64XP] 00000.000 FATAL: NDK_hookCreate() must be set in DSP/BIOS HOOK config
It looks like the error may occur in NC_NetStart(). I put a printf before and after and only got the one before.
Bryan,
You need the hooks functions. Can you confirm that NDK_hookCreate and NDK_hookInit are being executed (e.g. put a breakpoint on both and make sure they are being called)?
Todd
Todd,
They are not being called in my ccv5.2 project. They are being called in my ccv3.2 project.
How do I get them to be called?
Bryan,
Can you confirm that you are using the same version of DSP/BIOS and NDK in both projects? Can you attach your .tcf files for both projects?
Todd
They are both using the same ndk and it looks like they were using different bios. I recompiled both with the same bios 5.31.09 (although ccv3.2 calls it 5,2,3,22 (cuda-r22). CCv5 was using bios 5.41.11.38.
So I guess the question is why the difference?
Here is the tcf file. They both use the same one and includeNDK=1.
/* Specify the L1 and L2 memory settings */
var device_regs = {
l1PMode: "32k",
l1DMode: "32k",
l2Mode: "0k"
};
// Note: l2Mode cache is turned off here, but gets enabled in SystemEventMgr.cpp
if( environment["IncludeNDK"] == 1)
{// we really mean if we are running on the DSK here
var params =
{
clockRate: 1000,
catalogName: "ti.catalog.c6000",
deviceName: "6455",
regs: device_regs,
};
print("DSK: setting clock to 1000MHz");
}
else
{// we are running on the target platform
var params =
{
clockRate: 1000,
catalogName: "ti.catalog.c6000",
deviceName: "6455",
regs: device_regs,
};
print("Crossbow: setting clock to 1000");
}
utils.loadPlatform("ti.platforms.generic", params);
if( environment["IncludeNDK"] == 1)
{
utils.importFile('..\\Src\\Ti\\ndk\\inc\\tci\\ndk.tci');
print("importing ndk.tci");
}
else
{
print("NOT importing ndk.tci");
}
/* The following DSP/BIOS Features are enabled. */
bios.enableMemoryHeaps(prog);
bios.enableRealTimeAnalysis(prog);
bios.enableRtdx(prog);
bios.enableTskManager(prog);
bios.IRAM.createHeap = true;
// Board Specifics
// - Move all sections to IRAM
bios.setMemCodeSections(prog, prog.get("IRAM"));
bios.setMemDataHeapSections(prog, prog.get("IRAM"));
bios.setMemDataNoHeapSections(prog, prog.get("IRAM"));
bios.MEM.STACKSIZE = 0x2000;
bios.MEM.NOMEMORYHEAPS = 0;
bios.MEM.create("HWI_VEC");
bios.MEM.instance("HWI_VEC").base = 0x00800000;
bios.MEM.instance("HWI_VEC").len = 0x000000200;
bios.MEM.instance("HWI_VEC").createHeap = 0;
bios.MEM.instance("HWI_VEC").space = "code";
bios.MEM.create("HPI_HOSTTODSP");
bios.MEM.instance("HPI_HOSTTODSP").createHeap = 0;
bios.MEM.instance("HPI_HOSTTODSP").base = 0x00800200;
bios.MEM.instance("HPI_HOSTTODSP").len = 0x00000408;
bios.MEM.create("HPI_DSPTOHOST");
bios.MEM.instance("HPI_DSPTOHOST").createHeap = 0;
bios.MEM.instance("HPI_DSPTOHOST").base = 0x00800608;
bios.MEM.instance("HPI_DSPTOHOST").len = 0x00000408;
bios.MEM.instance("IRAM").createHeap = 1;
bios.MEM.instance("IRAM").heapSize = 0x00060000;
bios.MEM.instance("IRAM").base = 0x00800A10;
bios.MEM.instance("IRAM").len = 0x001F75F0;
bios.MEM.create("RESERVED_FOR_L2_CACHE");
bios.MEM.instance("RESERVED_FOR_L2_CACHE").createHeap = 0;
bios.MEM.instance("RESERVED_FOR_L2_CACHE").base = 0x009F8000;
bios.MEM.instance("RESERVED_FOR_L2_CACHE").len = 0x00008000;
bios.MEM.BIOSOBJSEG = prog.get("IRAM");
bios.MEM.MALLOCSEG = prog.get("IRAM");
bios.MEM.HWIVECSEG = prog.get("HWI_VEC");
bios.MEM.create("FPGA_DOWNLOAD");
bios.MEM.instance("FPGA_DOWNLOAD").createHeap = 0;
bios.MEM.instance("FPGA_DOWNLOAD").base = 0xE0000000;
bios.MEM.instance("FPGA_DOWNLOAD").len = 0x00800000;
bios.MEM.create("RF_CALIBRATION_DATA");
bios.MEM.instance("RF_CALIBRATION_DATA").createHeap = 0;
bios.MEM.instance("RF_CALIBRATION_DATA").base = 0xE0800000;
bios.MEM.instance("RF_CALIBRATION_DATA").len = 0x00040000;
bios.MEM.create("CALIBRATION_DATA");
bios.MEM.instance("CALIBRATION_DATA").createHeap = 0;
bios.MEM.instance("CALIBRATION_DATA").base = 0xE0840000;
bios.MEM.instance("CALIBRATION_DATA").len = 0x00040000;
bios.MEM.create("DDR2_CACHE_DISABLED");
bios.MEM.instance("DDR2_CACHE_DISABLED").createHeap = 0;
bios.MEM.instance("DDR2_CACHE_DISABLED").base = 0xE0880000;
bios.MEM.instance("DDR2_CACHE_DISABLED").len = 0x00780000;
bios.MEM.create("DDR2");
bios.MEM.instance("DDR2").base = 0xE1000000;
bios.MEM.instance("DDR2").len = 0x02000000;
bios.MEM.instance("DDR2").createHeap = 1;
bios.MEM.instance("DDR2").heapSize = 0x02000000;
bios.MEM.instance("DDR2").enableHeapLabel = 1;
bios.MEM.instance("DDR2").space = "data";
bios.MEM.instance("DDR2").heapLabel = prog.extern("exram");
bios.MEM.create("HPI_LOG_DATA");
bios.MEM.instance("HPI_LOG_DATA").createHeap = 0;
bios.MEM.instance("HPI_LOG_DATA").base = 0xE3000000;
bios.MEM.instance("HPI_LOG_DATA").len = 0x01000000;
bios.LOG.create("trace");
if( environment["IncludeNDK"] == 1)
{
bios.PRD.instance("prdNdk").order = 1;
print("Added NDK period");
}
else
{
print("NDK period NOT ADDED");
}
bios.SWI.instance("PRD_swi").order = 1;
bios.SWI.instance("KNL_swi").order = 2;
if( environment["IncludeNDK"] == 1)
{
bios.TSK.create("TSK_ethernet");
bios.TSK.instance("TSK_ethernet").stackSize = 4096;
bios.TSK.instance("TSK_ethernet").priority = 2;
bios.TSK.instance("TSK_ethernet").comment = "Priority must be less than 9 since uses ndk stack";
bios.TSK.instance("TSK_ethernet").fxn = prog.extern("startNetwork");
bios.TSK.instance("TSK_ethernet").order = 4;
print("Added NDK ethernet task");
bios.TSK.create("TSK_commandPort");
bios.TSK.instance("TSK_commandPort").stackSize = 4096;
bios.TSK.instance("TSK_commandPort").comment = "Priority must be less than 9 since uses ndk stack";
bios.TSK.instance("TSK_commandPort").fxn = prog.extern("tsk_CmdCtrlPort");
bios.TSK.instance("TSK_commandPort").order = 1;
bios.TSK.instance("TSK_commandPort").priority = 2;
print("Added commandPort task");
}
else
{
print("NDK ethernet task NOT ADDED");
}
bios.MBX.create("MBX_networkOpen");
// !GRAPHICAL_CONFIG_TOOL_SCRIPT_INSERT_POINT!
// Added as per TI E2E topic
// http://e2e.ti.com/support/embedded/bios/f/355/t/182069.aspx
bios.ECM.ENABLE = 1;
prog.gen();
Hi Bryan,
The configuration looks correct. Can you please set a break-point in the tasks that use the NDK (i.e.TSK_ethernet and TSK_commandPort). Please confirm both of these have done fdOpenSession. Also note that NDK_hookInit will be called before main(). NDK_hookCreate will be called multiple times (once per task). NDK_hookCreate will be called before main() also since you create some tasks statically in the .tcf file.
Can you look at the __HOOK_initFxnTable variable in a memory browser and send a snapshot. Also check what address are in the __HOOK_createFxnTable array. Here is an example. The two addresses in __HOOK_createFxnTable are FXN_F_nop and foo (the function I hooked in).
Sorry - I left out a very important bit of information in my last post. Recompiling with the same bios version as ccv3.2 fixed the problem. So, the problem is with the different version of bios. The version that failed was 5.41.11.38. The version that works is 5.31.9.
Bryan,
Did you get a chance to try the additional breakpoints that I noted in my last post?
Todd
I have been trying to get some work done now that the project runs with the older bios. I will rebuild with the newer bios and post what I see within the next week.
I do recall that when I used the newer bios I never stopped at the hookCreate breakpoint.
Well it looks like I can not reproduce the problem now. I guess some of things I did in the meantime fixed the problem.
I guess you can close this out.
Thanks,
Bryan