Quality RTOS & Embedded Software

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



Posted by OXO on November 19, 2012
I'm just starting a new project with freertos on LPC2387, Code Red tools. I've used their wizard to make a new shell freertos project.

It builds and loads fine, but vectors to program abort

LDR pc,_pabt // program abort



vPortISRStartFirstTask() is called.

It's using freertos v 7.0.1

RE: LPC23xx

Posted by Richard on November 19, 2012
As your project was created by somebody else's tool I can't support it directly, but suspect your problem will be that the MCU is in the wrong mode. Make sure the MCU is in Supervisor mode when main() is called.


RE: LPC23xx

Posted by OXO on November 19, 2012
Thanks for the fast reply Richard, but I've already tried that.

main is called:-

LDR r3, .def__main
CMP r3, #0
BEQ .newlib_main
LDR r10,=__main
B .call_app
LDR r10,=main

// Change to user mode (interrupts enabled) before calling main application

// change to Supervisor mode

MOV lr,pc
BX r10 // enter main() - could be ARM or Thumb

RE: LPC23xx

Posted by OXO on November 21, 2012
So, I am over that problem, but now I have that the ticks are not being incremented. Where are the interrupts re-enabled after the disable in vTaskStartScheduler?

Is it the portRESTORE_CONTEXT in vPortISRStartFirstTask?

RE: LPC23xx

Posted by Dave on November 21, 2012
All the ports disable interrupts before starting the scheduler, then automatically enable them as the context of the first task to run is restored.

RE: LPC23xx

Posted by OXO on November 21, 2012
This is frustrating. ;) .. as always in embedded ...

So the code is running, and I can break in and it's in the idle task. looks good.

But the xTickCount is not incrementing. So, check the timer setup. That's correct and the TCR is changing.

VICIrqStatus is 0x10, which means that the interrupt is triggered but not serviced.

cpsr is 0x6000001f, which I interpret to mean that the interrupts are enabled.

So what could be wrong??

RE: LPC23xx

Posted by Richard on November 21, 2012
If interrupts are not disabled, then it sounds like the tick interrupt is simply not executing for some reason. Put a break point in the vPreemptiveTick() function (portISR.c). If it never gets hit, but other interrupts are executing, then check the function vPreemptiveTick() (port.c) is correct for your derivative of the chip.


RE: LPC23xx

Posted by OXO on November 23, 2012
It's all working now. The interrupt issue turned out to be a problem with the Red Probe debug pod.

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

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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

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

Xilinx Microblaze and Zynq partner