Hi,
Can anybody shed some light onto a problem that I am having getting the xilkernel to behave! Essentially, I compile my simple program and the kernel keeps creating new instances of itself at run time. The prog_main() is set up as a static thread instance PARAMETER static_pthread_table = ((prog_main,1)) in the MSS file. See the ouput below (with verbose debug to true)
source
------
#include "xmk.h"
#include
void *prog_main(void *arg);
int main () { xilkernel_main (); }
void *prog_main(void *arg) { static Index = 0; printf("prog_main(%d) called\n\r", Index++);
while(1) { printf("In main - Data%d Index:%d\n\r", Data++, Index); sleep(500); } }
output
------
In main - Data18 Index:6
In main - Data19 Index:6 Idle Task XMK: Start XMK: Initializing Hardware... XMK: Initializing interrupt controller XMK: Connecting timer interrupt XMK: Starting the interrupt controller XMK: Initializing PIT device. XMK: System initialization... XMK: Enabling interrupts and starting system...
prog_main(6) called
In main - Data20 Index:7 Idle Task XMK: Start XMK: Initializing Hardware... XMK: Initializing interrupt controller XMK: Connecting timer interrupt XMK: Starting the interrupt controller XMK: Initializing PIT device. XMK: System initialization... XMK: Enabling interrupts and starting system...
prog_main(7) called
In main - Data21 Index:8 Idle Task
In main - Data22 Index:8
In main - Data23 Index:8
In main - Data24 Index:8
In main - Data25 Index: In main - Data1099 Index:407
In main - Data1100 Index:407 XMK: Start XMK: Initializing Hardware... XMK: Initializing interrupt controller XMK: Connecting timer interrupt XMK: Starting the interrupt controller XMK: Initializing PIT device. XMK: System initialization... XMK: Enabling interrupts and starting system...
prog_main(407) called
In main - Data1101 Index:408 Idle Task
In main - Data1102 Index:408 XMK: Start XMK: Initializing Hardware... XMK: Initializing interrupt controller XMK: Connecting timer interrupt XMK: Starting the interrupt controller XMK: Initializing PIT device. XMK: System initialization... XMK: Enabling interrupts and starting system...
prog_main(408) called
In main - Data1103 Index:409 Idle Task
etc!!!!