EmbDev.net

Forum: ARM programming with GCC/GNU tools LPC1768 + FreeRTOS not working


von nissan (Guest)


Attached files:

Rate this post
useful
not useful
Hey,

since weeks I am trying to get freeRTOS to work on a NXP LPC1768 Cortex 
M3 with CodeSourcery G++ Lite Compiler (using Eclipse IDE).

I have tried an altered CMSIS startupfile (with interrupt vector table 
adapted to freeRTOS handlers) and the included startup-file of the 
codeRed demo-project. Neither of them is working.
The university I am attending gave me the evaluation board where the 
cortex m3 is placed onto, so it is not a commercial version. However 
nobody at university can tell me what the problem is, or why it is not 
working.

Within the main() function I just create one simple Task which is 
supposed to toggle a LED, but already the creation of the task fails and 
the programm does not even come to start the scheduler.

I have added the eclipse project in the hope that somebody can help me.
Maybe somebody has a working hardware of the lpc1768 and can test the 
project, or somebody can tell me just by looking at the code where the 
problem is.
Would really appreciate any kind of help.

Best regards,
peter

von Gerd Bauer (Guest)


Rate this post
useful
not useful
Try instead of
1
xTaskCreate(vTask1,  (const signed char * const)("Task 1"),configMINIMAL_STACK_SIZE,NULL,tskIDLE_PRIORITY,NULL );
1
  int main( void )
2
{
3
  init_System();
4
  /* Create one task. */
5
  xTaskCreate(vTask1,  "Task1",configMINIMAL_STACK_SIZE*10,NULL,tskIDLE_PRIORITY+1,NULL );
6
  
7
  GPIO_SetValue(1, 0x02);    /* Turn on P1.1 */
8
  
9
  /* Start the scheduler so our tasks start executing. */
10
  vTaskStartScheduler();
11
  
12
  /* If all is well we will never reach here as the scheduler will now be
13
  running.  If we do reach here then it is likely that there was insufficient
14
  heap available for the idle task to be created. */
15
  for( ;; );
16
  return 0;
17
}
18
/*-----------------------------------------------------------*/
19
20
void vTask1( void *pvParameters )
21
{
22
  //for( ;; )
23
  //{
24
    GPIO_SetValue(1, 0x02);    /* Turn on P1.1 */
25
    vTaskDelay(2000/portTICK_RATE_MS);    /* Insert delay */
26
    GPIO_ClearValue(1, 0x03);    /* Turn off P1.1 */
27
    vTaskDelay(2000/portTICK_RATE_MS);     /*Insert delay */
28
    GPIO_SetValue(1, 0x02);    /* Turn on P1.1 */
29
    vTaskDelay(2000/portTICK_RATE_MS);    /* Insert delay */    
30
  //}
31
}


Does it turn on? -> Init OK Port OK

Does it turn on, off, on, off -> Task has been executed

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.