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



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 ]    [ 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