Hard fault Issue with LPC1850

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Noufal on Fri Oct 30 07:13:50 MST 2015
I'm facing  Hard fault issue during boot process

Controller used is LPC1850 , application using following interface NOR flash, SPIFI, and SDRAM and LCD(3.2 inch and 7 inch variant).
We are using Keil development environment, application using RTX, emwin, File  system etc. Currently we are booting from NOR flash (because 1850 is  flash less part), As we added more code we started getting memory conflict issue 's(Hard Fault). The recent code addition was using emwin menu, but i also found that if i add static/global variables then also i'm getting the  issue. The issue happening before it even reaching main, look like stack is getting corrupted. I have placed   startup_LPC18xx.o,system_LPC18xx.o  under internal SRAM, but i do see some time the memory is going to beyond it's range or SDRAM location while stepping through this file in debugger, Not sure what is happening

Attaching the scatter file

Tried the following so far

1.Increased the Heap(0x8000) and Stack (0x5000)  in system init
2. Increased RTX Task memory
3. Increased GUI memory in GUI config

Original Attachment has been moved to: Scatter_0.txt.zip