Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

schedule problem

Altera_Forum
Honored Contributor II
1,152 Views

hi all, 

i write a kernel module, when i insmod it,  

the following is output: 

 

bad: scheduling while atomic! 

Stack from 081dff8c:<0> 

<0> ffffe000<0> 08189464<0> 081b0e94<0> 02625a00<0> 00000000<0> 00000000<0> 00000000<0> 00000000<0> 

<0> 00000000<0> 00000000<0> 00000000<0> 00000000<0> 08fc0428<0> 00000000<0> 00000001<0> 00000002<0> 

<0> 08fc04d8<0> ffffe000<0> 00000000<0> 0800305c<0> 0800307c<0> 080001a0<0> 081fc4e0<0> 081e0790<0> 

<0> 081e0298<0> 081f45bc<0> 08800000<0> 08006860<0> 08000100<0> 

Call Trace:<0> 

 

where it may be wrong? and how can i trace the kernel routine? 

in x86 platform, i can use kgdb to debug it, now in nios2, how should i do? 

 

thanks for your help.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
425 Views

It may be out of memory,or corrupted. 

How do you build the module? What is your build enviroment ? Did you strip out unnecessary? 

You may use printk() to debug.
0 Kudos
Altera_Forum
Honored Contributor II
425 Views

thanks for your care, 

 

my build enviroment is correct, in nios2 sdk enviroment. but i don&#39;t know where i put the printk(), these messages is out of schedule(), i don&#39;t know which task cause this happen, so i need trace the routine, like kgdb does. 

can you help me?
0 Kudos
Altera_Forum
Honored Contributor II
425 Views

You may try a simple hello module first to verify your build enviroment. 

But I would perfer Linux enviroment to build uClinux.
0 Kudos
Reply