Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

vPortStartFirstTask() for STM32L + FreeRTOS

Posted by Anuradha on December 2, 2010
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.

RE: vPortStartFirstTask() for STM32L + FreeRTOS

Posted by STF12 on December 2, 2010
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

RE: vPortStartFirstTask() for STM32L + FreeRTOS

Posted by Anuradha on December 2, 2010
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????

RE: vPortStartFirstTask() for STM32L + FreeRTOS

Posted by Dave on December 2, 2010
“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.

RE: vPortStartFirstTask() for STM32L + FreeRTOS

Posted by Anuradha on December 2, 2010
Thanks STF12

it worked :D

RE: vPortStartFirstTask() for STM32L + FreeRTOS

Posted by Anuradha on December 7, 2010
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.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS