LPC1768 + FreeRTOS not working

Guest #2490615
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
Attached files:
Guest
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

Reply

A question of your own? This thread is over 14 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.