Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2100] Stack checking

2004-01-26 by Lewin A.R.W. Edwards

Michael Pont wrote:
> The option  -mapcs-stack-check is recognised.  However, I've found various messages on the WWW to suggest that this option (although recognised and documented) has not been implemented for ARM.

Just IMHO, it is not desirable to rely on runtime stack checking in an 
embedded application. What is the program supposed to do when a stack 
overrun is detected? Hand the user a box of candy? Explode?

It is preferable to analyze stack requirements beforehand, and monitor 
them during worst-case usage testing, if possible. Sometimes I add code 
to my watchdog-kicking code that checks for pre-RTL-init signature at 
the bottom of stack; if it's not there, I write a stack overflow 
diagnostic to the product log and stop kicking the dog to force a reset.

-- 
  -- Lewin A.R.W. Edwards (http://www.zws.com/)
Learn how to develop high-end embedded systems on a tight budget!
http://www.amazon.com/exec/obidos/ASIN/0750676094/zws-20

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.