• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » BIOS » BIOS forum » Getting: [C64XP] 00000.000 FATAL: NDK_hookCreate() must be set in DSP/BIOS HOOK config
Share
BIOS
  • Forum
  • Announcements
Options
  • Subscribe via RSS

Getting: [C64XP] 00000.000 FATAL: NDK_hookCreate() must be set in DSP/BIOS HOOK config

Getting: [C64XP] 00000.000 FATAL: NDK_hookCreate() must be set in DSP/BIOS HOOK config

This question is answered
Bryan Hehn
Posted by Bryan Hehn
on Aug 09 2012 13:42 PM
Intellectual410 points

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?

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • ToddMullanix
    Posted by ToddMullanix
    on Aug 09 2012 17:40 PM
    Genius15630 points

    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

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bryan Hehn
    Posted by Bryan Hehn
    on Aug 13 2012 07:52 AM
    Intellectual410 points

    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
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bryan Hehn
    Posted by Bryan Hehn
    on Aug 13 2012 12:06 PM
    Intellectual410 points

    I tried removing the hookNdk from the tcf Config tool.   I get a similar error but instead of hookCreate it complains about hookInit.

    This is the config tool before I removed hookNdk:

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bryan Hehn
    Posted by Bryan Hehn
    on Aug 14 2012 13:39 PM
    Intellectual410 points

    It looks like the error may occur in NC_NetStart().  I put a printf before and after and only got the one before.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • ToddMullanix
    Posted by ToddMullanix
    on Aug 14 2012 14:10 PM
    Genius15630 points

    Bryan,

    Thanks. I'll get back to you later today.

    Todd

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bryan Hehn
    Posted by Bryan Hehn
    on Aug 15 2012 07:55 AM
    Intellectual410 points

    Another piece of information is that this code works with CCSv3.2.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • ToddMullanix
    Posted by ToddMullanix
    on Aug 15 2012 13:39 PM
    Genius15630 points

    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

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bryan Hehn
    Posted by Bryan Hehn
    on Aug 15 2012 14:19 PM
    Intellectual410 points

    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?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • ToddMullanix
    Posted by ToddMullanix
    on Aug 15 2012 14:39 PM
    Genius15630 points

    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

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bryan Hehn
    Posted by Bryan Hehn
    on Aug 16 2012 09:10 AM
    Intellectual410 points

    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();
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • ToddMullanix
    Posted by ToddMullanix
    on Aug 16 2012 13:45 PM
    Verified Answer
    Verified by David Friedland
    Genius15630 points

    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).

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bryan Hehn
    Posted by Bryan Hehn
    on Aug 16 2012 13:57 PM
    Intellectual410 points

    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.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • ToddMullanix
    Posted by ToddMullanix
    on Aug 20 2012 16:34 PM
    Genius15630 points

    Bryan,

    Did you get a chance to try the additional breakpoints that I noted in my last post?

    Todd

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bryan Hehn
    Posted by Bryan Hehn
    on Aug 22 2012 09:49 AM
    Intellectual410 points

    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.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bryan Hehn
    Posted by Bryan Hehn
    on Aug 29 2012 11:18 AM
    Intellectual410 points

    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

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use