As for the problem:
-------------------
I know i’m not using the same hardware but the STM32 uController is likley the same (there are minor differences which are not relevant for that matter).
I created a new project which is based on the demo one.
Through debuging the code i noticed the following:
--------------------------------------------------
vPortStartFirstTask() calls SVC to start the first task, but there is no code inside
SVCHandler ISR function. from this point the the system got stucked. No task is being handeled. I no this since i added breakpoint inside each task (basically i have 2 tasks besides the idle tasks).
attached the main function of my project:
int main(void)
{
/* Initialize the JIG */
JIG_SetupHardware();
/* Create the queue used by the LCD task.
Messages for display on the LCD are received via this queue. */
psLCDQueue = xQueueCreate(LCD_QUEUE_SIZE, sizeof(LCD_MESSAGE));
/* Create the queue used by the Menu Managment task.
Messages for Menu Managment are received via this queue. */
psKeyQueue = xQueueCreate(KEY_QUEUE_SIZE, sizeof(u8));
/* Create a new task and add it to the list of tasks that are ready to run. */
xTaskCreate(LCD_Task,"LCD",configMINIMAL_STACK_SIZE,NULL,tskIDLE_PRIORITY,NULL);
xTaskCreate(MENU_MNG_Task,"MENU_MNG",configMINIMAL_STACK_SIZE,NULL,tskIDLE_PRIORITY,NULL);
/* Start the scheduler. */
vTaskStartScheduler();
/* Will only get here if there was not enough heap space to create the idle task. */
return 0;
}
You need to populate the SVC, PendSV and SysCall interrupt vectors. Use the demo application vector table as a guide, or better still just use the demo application as a starting point.
So this should have vPortSVCHandler() already installed. When SVC is called you should go directly to whatever is installed in the SVC handler location, which should be vPortSVCHandler(). Where do you go if not there?
Are you moving the vector table, or keeping it at its default location of 0?
I am encountering the same problem. I am using Rowley CrossWorks, but I do not expect that matters.
I have a call to vPortSVCHandler from with SVCHandler(), but after execution of the portable call I still land in the DebugMonitor() with the SVC interrupt bit set. I have not messed with the vector table at all. My expectation was that the portable call would clear the SVC interrupt. Is this an incorrect expectation? I am using the ST standard peripheral library v3.12 and FreeRTOS v5.3.1