Quality RTOS & Embedded Software

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


LPC1778 hard fault

Posted by xujingyixing on May 31, 2012

I\'m trying to get FreeRTOS running on a LPC1778 but have not succeeded so far. I\'m using version 7.1.0 and the portable for the ARM_CM3.

The code seems to run fine until vPortStartFirstTask. Stepping through the assembler instructions I get to \"svc 0\" after which a hard fault occurs.

/* Use the NVIC offset register to locate the stack. */
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
I\'v added the following lines to FreeRTOSConfig.h

#define vPortSVCHandler SVC_Handler
#define xPortPendSVHandler PendSV_Handler
#define xPortSysTickHandler SysTick_Handler

There is still a Hard Fault. Is there anything I have to modify more to get it running?


RE: LPC1778 hard fault

Posted by xujingyixing on May 31, 2012
I'v sloved the problem.

RE: LPC1778 hard fault

Posted by Richard on May 31, 2012
For the sake of other people reading this forum - please also post what you did to fix the problem.


RE: LPC1778 hard fault

Posted by xujingyixing on June 4, 2012
I made a mistake. I set the bit 10 in SHCSR register. It lead to hard fault.

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

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

Latest News

Meet Richard Barry and learn what's new in the FreeRTOS project at Embedded World 2019

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

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