Quality RTOS & Embedded Software

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




Loading

VPortStartFirstTask() Issue

Posted by sriku03 on October 28, 2013

Hello, Every one In my project application, am executing FreeRtos from External ddr3 memory(arm cortex-M3). Code executed Upto VportstartFirstTask(), after this function code is not running. below is the VportstartFirsttask which we used in our application.

Can anyone know what could be the reason??

void vPortStartFirstTask(void)

{ /* Use the NVIC offset register to locate the stack. / __asm volatile(ldr r0, =0xE000ED08 ldr r0, [r0] ldr r0, [r0] / Set the msp back to the start of the stack. / msr msp, r0 / Call SVC to start the first task. */ cpsie i svc 0 nop ) }


VPortStartFirstTask() Issue

Posted by richardbarry on October 28, 2013

Do you have the FreeRTOS SVC handler installed?

See the red text "special note for ARM Cortex-M users" in the first FAQ item on this page:

http://www.freertos.org/FAQHelp.html

Regards.


VPortStartFirstTask() Issue

Posted by sriku03 on October 29, 2013

Hi Richard,

I have SVC handler installed. but its getting stuck inside the void vPortStartFirstTask(void) function as i mentioned.

If i run the same project using some other linker file it works fine. which runs from Onchip memory it works fine.

When i am running from external memory i am facing an issue.

regards, Srikanth


VPortStartFirstTask() Issue

Posted by richardbarry on October 29, 2013

Which instruction within the vPortStartFirstTask() function does it fail on and what executes after the failure occurs? (hard fault?)

Regards.


VPortStartFirstTask() Issue

Posted by sriku03 on October 29, 2013

Hi Richard,

we cant see where its going once code is stuck. What i feel is svc 0 line is causing the issue. i am not sure why. I think this is problem with interrupt vector table.

I have 2 projects as,

Main project (which is kind of boot loader, it does not have FreeRTOS) is running from the on-chip eNVM, which loads the binary file of second project (which has freeRTOS) into the DDR.

Then jump to the loaded binary image, which has FreeRTOS. When i am running it i am facing this issue.

If i run this project from on-chip eNVM, it works fine.

Could you please let me know what could be the reason.

regards, Srikanth


VPortStartFirstTask() Issue

Posted by richardbarry on October 29, 2013

When you run out of eNVM are you still using the bootloader? There have been lots of threads about using bootloaders, most of which are normally concluded by the user remapping interrupts before jumping to FreeRTOS.

On boot up the Cortex-M will read its interrupt from address 0 (or whatever memory is mapped to address zero on boot up). If you call SVC 0 before the vector table base address register has been updated to point to the vector table from the FreeRTOS image then the SVC 0 instruction will jump to the SVC handler of your bootloader instead of the SVC handler of FreeRTOS.

Regards.


VPortStartFirstTask() Issue

Posted by sriku03 on October 31, 2013


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists