C++ - LWIP+FreeRTOS - Unable to create more threads

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

C++ - LWIP+FreeRTOS - Unable to create more threads

ソリューションへジャンプ
705件の閲覧回数
GanesanGuru
Contributor IV

Hi fellas,

I've created a sample c++ project - with lwip+freeRTOS - for two threads. It works fine as shown below:

image.png

 

When I tried to add 3rd thread - the build was successful - yet the none of the threads are being scheduled.image.png

 

 

To be very specific, the 3rd task creation itself failed. Hence, I think scheduler is not even called. Why it happens so?

 

The threads are as follows,

void delay(){
    volatile static int i,j;
    for (i=0;i<10000;i++)
        for (j=0;j<10000;j++);
}

void ledOn(void){
	GPIO_WritePinOutput(GPIO1,9,0);
    PRINTF("LED turned on\r\n");
}

void ledOFF(void){
	GPIO_WritePinOutput(GPIO1,9,1);
    PRINTF("LED turned off\r\n");
}

static void BLINKY(void * arg){
while(1){
	ledOn();
	delay();
	ledOFF();
	delay();
	taskYIELD();
}
}

static void SERIALL(void * arg){
   while(1){
	PRINTF("inside Serial loop");
	delay();
    PRINTF(".");
	delay();
    PRINTF(".\r\n");
	taskYIELD();
   }
}

static void testIoT(void * arg){
   while(1){
	PRINTF("inside iot loop");
	delay();
    PRINTF(".");
	delay();
    PRINTF(".\r\n");
	taskYIELD();
   }
}

 

ラベル(1)
タグ(4)
0 件の賞賛
返信
1 解決策
660件の閲覧回数
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello
I hope you are well.

Is the same issue present if you increase the stack size for the task? Which status is returning sys_thread_new()?

Best regards,
Omar

元の投稿で解決策を見る

1 返信
661件の閲覧回数
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello
I hope you are well.

Is the same issue present if you increase the stack size for the task? Which status is returning sys_thread_new()?

Best regards,
Omar