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

dabort irq on 1st call to portSAVE_CONTEXT

Posted by Nick Ward on July 3, 2009
Hello All,

I'm using the V4.2.0 ARM7_LPC2000 port of the FreeRTOS and am now getting the dabort irq on the first call to portSAVE_CONTEXT. Previously I did not have this problem but I think I have changed something. I am using source code control but reverting to a previous commit doesn't seem to help. I have been trying to work this out for a while now and have been browsing the forums for similar problems but have had no luck. Does anyone have any ideas to what I have done? Thanks in advance.

Nick

RE: dabort irq on 1st call to portSAVE_CONTEX

Posted by Richard on July 3, 2009
I presume to get that far the kernel was started correctly. Which mode is the CPU in when portSAVE_CONTEXT is called.

Regards.

RE: dabort irq on 1st call to portSAVE_CONTEXT

Posted by Nick Ward on July 5, 2009
Yes the kernel seems to have started correctly. The tick interrupt is working, memory seems to be successfully allocated to the tasks and the program runs into the last defined task. I'll check the CPU mode asap.

RE: dabort irq on 1st call to portSAVE_CONTEXT

Posted by Nick Ward on July 6, 2009
In the current task the CPSR register shows that it is in System mode and just before portSAVE_CONTEXT is called it is in Supervisor mode. I have to break it on the line 'asm volatile ( "ADD LR, LR, #4");' else it will not break and the board needs to be disconnected from the PC to get it to work again.

Cheers

RE: dabort irq on 1st call to portSAVE_CONTEXT

Posted by Nick Ward on July 6, 2009
In the current task the CPSR register shows that it is in System mode and just before portSAVE_CONTEXT is called it is in Supervisor mode. I have to break it on the line 'asm volatile ( "ADD LR, LR, #4");' else it will not break and the board needs to be disconnected from the PC to get it to work again.

Cheers

RE: dabort irq on 1st call to portSAVE_CONTEXT

Posted by Nick Ward on July 6, 2009
I discovered that for some reason the CPU mode had changed to FIQ after power up and before vTaskStartScheduler was being called. This made me look at the start up files 'Philips_LPC230X_Startup.s' and 'crt0.s' and discovered that crt0.s had been changed (particularly the supervisor set up for some unknown reason) from the original project (unfortunately not currently under revision control). Using the old version of the file from a backup fixed this problem. Thanks heaps for your help Richard. I wasn't very familiar with the CPU modes and their use in OS design till you prompted me to look into it. Cheers.


[ 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