FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [July 2009 Threads] dabort irq on 1st call to portSAVE_CONTEXTPosted 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_CONTEXPosted 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_CONTEXTPosted 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_CONTEXTPosted 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_CONTEXTPosted 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_CONTEXTPosted 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|