Content originally posted in LPCWare by toddatm on Thu Jan 05 12:25:58 MST 2012
The way I acquired LPCXpresso and my NXP board was through the FreeRTOS website as a demo environment for FreeRTOS. So I've compiled the first example, 2 simple tasks, and the code executes fine. They just print out alternating messages.
However, in LPCXpresso I set a break point in both tasks, and would expect to alternately hit the breakpoints. The breakpoints are ignored! My original post seemed to perhaps not be clear.
Has anyone on this forum seen a problem setting breakpoints in tasks in FreeRTOS? Is there some setting for the debugger that I don't have set right?
Here's the code, just to be a bit more clear:
void vTask1( void *pvParameters )
{
const char *pcTaskName = "Task 1 is running\n";
volatile unsigned long ul;
/* As per most tasks, this task is implemented in an infinite loop. */
for( ;; )
{
/* Print out the name of this task. */
vPrintString( pcTaskName );
/* Delay for a period. */
for( ul = 0; ul < mainDELAY_LOOP_COUNT; ul++ )
{
/* This loop is just a very crude delay implementation. There is
nothing to do in here. Later exercises will replace this crude
loop with a proper delay/sleep function. */
}
}
}
/*-----------------------------------------------------------*/
void vTask2( void *pvParameters )
{
const char *pcTaskName = "Task 2 is running\n";
volatile unsigned long ul;
/* As per most tasks, this task is implemented in an infinite loop. */
for( ;; )
{
/* Print out the name of this task. */
vPrintString( pcTaskName );
/* Delay for a period. */
for( ul = 0; ul < mainDELAY_LOOP_COUNT; ul++ )
{
/* This loop is just a very crude delay implementation. There is
nothing to do in here. Later exercises will replace this crude
loop with a proper delay/sleep function. */
}
}
}
If I set breakpoints at the vPrintStrings or the for loops, doesn't matter where as long as it's inside the outer for loop, I'd expect to alternately hit my breakpoints. The breakpoints show up in the debugger, and when I run the code, the printouts happen in the console window, but the debugger does not stop at the break points.
I'm not really sure where to start debugging this. I'm somewhat new to this arm cortex m3. I would expect the debugger would setup hardware breakpoints (since the code is flashed) for the two breakpoints when I insert them.
Any help would be appreciated!