Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

Spontaneous ASSERTs

Hi!

I have a program with 10 tasks (8 + idle + main) and 2 interrupt sources.

The fact is that sometimes I get ASSERTs from eCos differents functions of the SO. Sometimes is from dlmalloc.cxx, when I tree to free, sometimes (don't remember exactly) is from smp.hxx (I only have one CPU, so it shouldn't be any problem), and other stange things...

The fact is that sometimes, when I run it in debug mode, it works OK. And many times, if I add a printf or another instruction, the problem disappears.

I've tried to disable all interrupt sources (except INTERNAL TIMER) in order to prevent any interrupt to corrupt the stack or else, but it does the same.

If anyone has any idea about what can be happening, or how to find the REAL problem...

Thanx

Alex

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    What NIOS II core uses?

    May be this behaviour can be connected with the DCache memory?

    Try to increase a size of DCache, for localization of the given problem.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I use the Nios II standard core. That is, without DCache. I used fast core a month ago, and I was having problems with DCache, so I decided to use standard core until I am "ready" to use DCache.

    So I suppose DCache is not the problem.

    From what I've seen until now, it seems that sometimes, when a task calls a function, the parameters passed to it seem to be corrupted. As the parameters are passed through the registers, I'm trying to find if any interrupt or task can corrupt the stack data, or something. How can I debug it? :-?

    Thank you

    aLeX
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi!

    Call me paranoid, but I have disabled the "Scheduler timeslicing" option in the "eCos kernel" -> "Kernel Schedulers" configuration tool, and now it seems to work fine ("it seems").

    Anyone is using Multi-level queue scheduler with timeslicing enabled?

    aLeX

    P.D: I had timeslicing every 50 ticks, one tick per milisecond.