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.

NDK, NSP and SYS/BIOS

Other Parts Discussed in Thread: OMAPL138, SYSBIOS

hello,

We are using a custom C6748 board and i am trying to marry together SYS/BIOS 6.33.5.46  NDK 2.21.0.32  and NSP 1.10.0.03

I am currently replacing DSP/BIOS 5 and i have a code base that had NDK 2.20 working just fine before i started this.  that means i had the pinmux set up correctly and the EMAC, MDIO powered up and there is nothing wrong with our board.

So i was able to effortlessly bring in the NDK and NSP and add the check boxes that i think i want.  the thing compiles and it will not lock up when i run it. the NDK even calls the netstart routine i linked into the network open hook.  

the problem is that it does nothing after that.  i have DHCP client turned on and there is NO network activity going on on my network (i wiresharked it, nothing is coming out).

i would love to know what i am doing wrong.  I am not even sure where to start debugging as this is my first attempt at SYS/BIOS and this version of the NDK.

is there a special heap that i need to create or is the system heap good enough (i made it 0x20000 bytes)? is there some disconnect between my EMAC (NSP module) and the NDK? i am using the NSP for the OMAP138, is that the wrong NSP for the 6748 (i understand they are different but a lot of the tools seem to be written for both)? is there a basic setting i have off/on that would default the NDK to not work right away? do i need to post my .cfg file for anybody to help me?

-Mike

  • Hi Mike,

    Your components are correct; the NSP for OMAPL138 is also for the evm6748.

    Have you tried running the standard examples that ship with the NSP (e.g. helloWorld or client)?  Are you able to get those examples to work?

    Are you using CCSv4 or CCSv5?  If so, there is a nice SYS/BIOS tool called ROV (tools -> ROV).  It will give you lots of information about your app.  Note that the processor must be halted in order to use it.  If you bring up ROV, you can things such as your heap usage and Task stack usage.  You can also see which Tasks are currently in the system and their execution state (and a whole lot more).

    Steve

  • Hi Steve,

    I am using CCS5.1 and i have looked at the ROV tool.  it appears that the NDK thread is running. it also appears that the system heap is being used for something (but since this my first time with SYS/BIOS i don't know if SYS/BIOS uses the system heap for something).  i remember when looking at the ROV for the DSP/BIOS NDK project i would see a DHCP task running but i didn't see that with this version. i am wondering if i messed something up that would prevent that task from running. is there some API i have to call that starts DHCP or should i just be able to leave it alone connected to a router (with DHCP enabled) and it should just do it?

  • Mike,

    Were you able to try one of the standard NSP 1.10 examples like Client?

    NDK 2.21 works a bit differently than 2.01 and previous versions.  There is now a system in place that will generated the main stack thread C code for you based on the settings specified in your configuration file (*.cfg file).  But, this depends on what you put in your configuration file (please see this post for details on this: http://e2e.ti.com/support/embedded/bios/f/355/p/194285/699778.aspx#699778).

    So, it is possible that you still have the StackThread() task defined and that your configuration is generated ti_ndk_config_Global_stackThread() and there is a conflict between them.  Do you see these two tasks running in your ROV view?  Maybe you could post a screen shot of the tasks running in your ROV view.

    Steve

  • i did not try one of the examples because they are mostly geared toward the EVM board and we are using our own custom board.

    i do understand that the 2.21 version works differently than other versions. we did have a task that performed the "NC_SystemOpen" but i put a "while(1)" loop before any of that code runs and does nothing but pend forever on a semaphore.  

    I have DHCP client enabled with the default settings, i have TCP and IP enabled with the default settings, i have Global enabled with the netstart, netstop, and ip address hooks defined and the NDK at high priority. i changed the "Priority level for low priority NDK tasks" from 3 to 4 because we have a task at level 3 that prevents idle from running so i wanted NDK stuff to override that. other than that everything else is default.  does this sound like i missed something in my configuration? i am very lost.

    i did notice something in the demos that there is a timer register that is set during EMAC init that i was not setting. i tried setting it and it did no good. i could not find anywhere in these projects were a timer was used. not a dynamically created timer or one in the .cfg file.  is there a timer component i am missing here?

    -Mike

  • i looked at the post you refered to in your last post and that is closer to what i really wanted to do.  i was able to get SYS/BIOS and NDK 2.21 to work using the method of turning off code generation.

    regarding this post: while i don't plan to use the NDK in this fashion it would still be nice to know what went wrong using the method in this post (SYS/BIOS only, no API calls) in case i run into again with another module i might try to add in the future.

  • Mike,

    Glad you were able to get it working.

    Can you please attach your *.cfg file for the non-working case (that had code generation turned on)?  I'd like to have a look at it for possible reasons for it not working for you.

    Steve

  • no problem.

    i am running into a new problem now and i was wondering if i should start a new thread for it.

    when DHCP is running and fails i perform an NC_Netstop.  this will call my netstop routine i had set up for shutting down the NDK.  however after it leaves my netstop function and it goes to free up the NDK (but before it returns from NC_NetStart) i get this error:

    [C674X_0] ti.sysbios.heaps.HeapMem: line 309: assertion failure: A_invalidFree: Invalid free
    xdc.runtime.Error.raise: terminating execution

    i have no idea what the NDK is trying to free because this happens before the main stack task returns from NC_NetStart

    any ideas or should i start a new thread for this?

    app.cfg
  • it also sometimes gives me this error:

    [C674X_0] ti.sysbios.family.c64p.Hwi: line 234: E_handleNotFound: Hwi handle not found: 0xc1db64b8
    xdc.runtime.Error.raise: terminating execution

    am i blowing the stack? where in the ROV do i find the system stack?