vPortStartFirstTask() for STM32L + FreeRTOS

Hello all, I have changed the FreeRTOS demo for STM32F103 in order to work with STM32L. This is my main.c.
int main()
{
  
  prvSetupHardware();
  
  xTaskCreate(vLEDTask,( signed char * )"LED1",configMINIMAL_STACK_SIZE, NULL,mainFLASH_TASK_PRIORITY,(xTaskHandle*) NULL );
  xTaskCreate(vLEDTask2,( signed char * )"LED2",configMINIMAL_STACK_SIZE, NULL,(mainFLASH_TASK_PRIORITY+1),(xTaskHandle*) NULL );
  
  /* Start the scheduler. */
  vTaskStartScheduler();
  
  
  return 0;
}
Hard Fault exception occurs within the vTaskStartScheduler(); function. As I noticed by the step running the exception occurs after the vPortStartFirstTask on portasm.s. Have anybody any idea on how to configure this function so that the scheduler will start the first task? Thank you.

vPortStartFirstTask() for STM32L + FreeRTOS

Hi,
have you checked the name of the exception handler used by FreeRTOS?
- SVC_Handler (vPortSVCHandler)
- PendSV_Handler (xPortPendSVHandler)
- SysTick_Handler (xPortSysTickHandler) Are the same defined in the vector table? Regards,
Stefano

vPortStartFirstTask() for STM32L + FreeRTOS

Hello, Further to previous post, I want to know how to change the “Constants required to manipulate the NVIC” defined in the port.c.
Should they be same for all ARM CM3 ports????

vPortStartFirstTask() for STM32L + FreeRTOS

Should they be same for all ARM CM3 ports????
I think that has been answered already, and the answer is Yes. Please keep your related posts in a single thread.

vPortStartFirstTask() for STM32L + FreeRTOS

Thanks STF12 it worked 😀

vPortStartFirstTask() for STM32L + FreeRTOS

Hello,
In the “CORTEX_STM32F103_IAR” FreeRTOS port the vector table is defined in stm32f10x_nvic.c.
Is there a special reason for using that file instead of using the provided startup files (startup_stm32f10x_cl.s etc) ? Thank you.