Hello Shiva ,
You are limited to the number of breakpoints with PLS
i recommend to switch in assembler mode and reduce the number of breakpoints.
if you want to use FreeRTOS you should have a main.c like that :
SPC582Bxx_RLA FreeRTOS SERIAL Test Application for Discovery (cf example)
FreeRTOS is using the tick too
uint8_t message_task1[]= "Task1...\r\n";
uint8_t message_task2[]= "Task2...\r\n";
/* Demo tasks */
portTASK_FUNCTION( vTaskOne, pvParameters )
{
( void ) pvParameters;
TickType_t xLastWakeTime = xTaskGetTickCount();
for ( ;; ) {
vTaskSuspendAll();
sd_lld_write(&SD2,message_task1,(uint16_t)(sizeof(message_task1)/sizeof(message_task1[0])));
xTaskResumeAll();
pal_lld_togglepad(PORT_E, LED_4);
vTaskDelayUntil( &xLastWakeTime, 200 );
}
}
/* Demo tasks */
portTASK_FUNCTION( vTaskTwo, pvParameters )
{
( void ) pvParameters;
TickType_t xLastWakeTime = xTaskGetTickCount();
for ( ;; ) {
vTaskSuspendAll();
sd_lld_write(&SD2,message_task2,(uint16_t)(sizeof(message_task2)/sizeof(message_task2[0])));
xTaskResumeAll();
vTaskDelayUntil( &xLastWakeTime, 200 );
pal_lld_togglepad(PORT_D, LED_5);
}
}
/*
* Application entry point.
*/
int main(void) {
/* Initialization of all the imported components in the order specified in
the application wizard. The function is generated automatically.*/
componentsInit();
/* Enable Interrupts */
irqIsrEnable();
/*
* Activates the serial driver 1 using the driver default configuration.
*/
sd_lld_start(&SD2, NULL);
/* Creating first task to blink LED0 */
xTaskCreate( vTaskOne,
(const char * const)"task #1",
configMINIMAL_STACK_SIZE,
NULL,
tskIDLE_PRIORITY + 1,
NULL );
/* Creating second task to blink LED1 */
xTaskCreate( vTaskTwo,
(const char * const)"task #2",
configMINIMAL_STACK_SIZE,
NULL,
tskIDLE_PRIORITY + 1,
NULL );
/* Start the FreeRTOS scheduler */
vTaskStartScheduler();
Best regards
Erwan