LPCXpresso and Hard Fault

Comments

3 comments

  • Avatar
    Michael Farnet

    I have a similar issue with the LPC1114 part.  It works in release configuration, but not in debug. Can you post your hardfault interrupt code to print the above?

     

    Thanks,

     

    Mike.

    0
    Comment actions Permalink
  • Avatar
    Michael Farnet

    I found the code, but it didn't help.  I knew - like you which line of code generated the fault.  Like you, commenting things out or adding a nop didn't change the location.

    What I found was the optimization level.  It was set to "none" in debug mode.  I set it to level 1 and the problem cleared up.  I hope this helps.

    0
    Comment actions Permalink
  • Avatar
    Jon Elliott

    Michael,

    See https://rowley.zendesk.com/entries/46195-changing-optimisation-levels-causes-different-application-behaviour for a description of why a program may behave differently when changing the optimization level.

    Regards,

    Jon

    0
    Comment actions Permalink

Please sign in to leave a comment.