Release Build Rarely Boots

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Release Build Rarely Boots

275 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Randy Nuss on Thu Jun 20 21:37:06 MST 2013

I have a LPC4337-based project.  Debug builds always run from a power-on-reset.  However, a release build may only boot about 30% of the time, i.e. there is no evidence the code begins to run.  Something else, that may be telling, is I have run release builds in the debugger and I get a hard-fault exception when a read of an address within the EEPROM area is attempted -this never occurs when debugging a debug version.


I believe all project properties are the same for both builds.

Labels (1)
0 Kudos
1 Reply

263 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by suckfish on Thu Jun 20 23:39:21 MST 2013

The first two things I'd check:


<ul>
<li>Make sure you wait as appropriate for any config to take effect. There aren't many things that need that. An non-debug build will be faster and more likely to trip over any problems here.</li>
<li>Make sure you use volatile accesses (or memory barriers) for all config registers. A debug build has less optimisation meaning that you're more likely to get away with a missing volatile.</li>
</ul>

Since you mention to fault access the EEPROM that's the obvious code to look at first.

0 Kudos