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.

Stack Overflow in task ConfigBoot

I´ve been troubled with stack overflow from time to time, and decided it was time to look into it.

I've implemented the "Testing for Stack Overflow" in section 3.4.5 in the SYS/BIOS User's Guide, which shows that I get the Stack Overflow from a task called "ConfigBoot", which I don't know what it is.

So, the question is, who creates this task and what is it for? How do I set it's stack size?

After some more testing, and printing out task names at creation, I see that this task is created around when I'm doing my NDK initializations. Is this NDK threads. Have I configured it to exist (without my knowledge)?

/OH

  • Hi OH,

    What version of BIOS (and NDK) are you using ?

    Best,

    Ashish

  • OH,

    I had one more question. What is the stack size you are seeing for the "ConfigBoot" task and by how many bytes is the stack overflowing ?

    Best,

    Ashish

  • Hi Ashish, and thank you for your response.

    I'm using NDK 2.21.01.31 and SYS/BIOS 6.34.04.22.

    Regarding the stack size it's 0x800 and Task_Stat.used is also 0x800. Can I see the amount of overflow somewhere?

    I searched for the ConfigBoot string in NDK, and found that there in fact is a task named that in netctrl.c, and it's started with a stacksize of 2048 (0x800).

    So, again, what is this task for? Is this a task that should need bigger stack due to the way I initialize/use NDK?

    /OH

  • Hi OH,

    The ConfigBoot task is used to boot the NDK's configuration.  When this task runs, it applies all of the settings made from the calls CfgAddEntry() in the application.

    ROV won't show you the amount overflowed.  To find the amount of overflow for a given task, what you would typically need to do is increase the task's stack size to a value that is "more than enough" and then build/run the application again.  After running, look at ROV and see the stack peak value to get an idea of how much stack the task really uses.

    Unfortunately, the bad news is that the boot task is created in the NDK library code itself.  In order to increase its stack size, you must do so in the NDK (netctrl.c) and then rebuild the NDK.

    Lastly, I'm curious what you're configuration is like.  Do you have a lot of calls to CfgAddEntry()?

    Steve

  • Yes, I found that out when I looked into the code in more detail. I also got rid of the problem by recompiling NDK with a bigger stack for that task. I would very much prefer to be able to use the libs released by TI without modification, but we´ll see how we will handle that.

    Regarding the configuration, there are two CfgAddEntry-calls for adding hostname and adding the address to the interface, then there's three calls to configure the debug-levels, and finally five calls to set som e buffersizes.

    Anyway, since my question most of all was a question regarding which task that causes the stack overflow, I accept your suggested answer in the previous post, and might start a new thread if I need more help in the future.

    /OH