Hi. We are a couple of guys, working on a school project. We are trying to get the Xilkernel up and running, on the Spartan 3E starter kit. We are getting these streams from the debugger: XMK: Starting kernel. XMK: Initializing Hardware. XMK: System initialization. From these streams we can tell that the function xilkernel_init (); is running. But we expect that after xilkernel_init (); has finished, the function xilkernel_start (); should be called next. (see function "void xilkernel_main()" below) So our guess is that we somehow is stuck in the xilkernel_init (); function. Because the first thing xilkernel_start (); should do is to stream out "XMK: Process scheduling starts.",but nothing happens. (see function "void xilkernel_start ()" below). This code is taken from the xilkernel:void xilkernel_main() { DBG_PRINT("XMK: Starting kernel.\r\n");
xilkernel_init (); xilkernel_start (); } void xilkernel_start () { DBG_PRINT("XMK: Process scheduling starts.\r\n"); #if defined (MB_XILKERNEL) microblaze_enable_interrupts(); #elif defined (PPC_XILKERNEL) XExc_mEnableExceptions (XEXC_NON_CRITICAL); #endif idle_task (); // Does not return } So we think the question we should be asking is:How do we get the scheduler running ?
This is our mss file:
BEGIN OS PARAMETER OS_NAME = xilkernel PARAMETER OS_VER = 4.00.a PARAMETER PROC_INSTANCE = microblaze_0 PARAMETER sysintc_spec = xps_intc_0 PARAMETER stdout = RS232_DCE PARAMETER stdin = RS232_DCE PARAMETER config_pthread_mutex = true PARAMETER systmr_freq = 50000000 PARAMETER systmr_dev = delay PARAMETER config_debug_support = true PARAMETER debug_mon = true PARAMETER verbose = true PARAMETER systmr_interval = 5 PARAMETER max_readyq = 10 PARAMETER n_prio = 32 PARAMETER sched_type = SCHED_RR PARAMETER config_sched = true PARAMETER config_pthread_support = true PARAMETER max_pthread_mutex_waitq = 10 PARAMETER max_pthread_mutex = 10 PARAMETER pthread_stack_size = 1000 PARAMETER max_pthreads = 10 PARAMETER systmr_spec = true PARAMETER static_pthread_table = ((shell_main,1)) END
Source file:
#include "xmk.h" #include #include #include #include #include #include
void* shell_main(void *dummy) { return 0 ; }
int main() { xilkernel_main(); }