ARM Technical Support Knowledge Articles

CONFIGURING FOR 2-BYTE INTERRUPTS

Applies to: C251 C Compiler

Answer


Information in this article applies to:


QUESTION

How can I configure my C251 application to use 2-byte interrupt stack frames instead of 4-byte ones?

ANSWER

There are three things you must do to configure the 251 chip and tools to use 2-byte interrupt stack frames.

  1. Add the switch I2 to the compiler command line. In uVision, go to Options | C251 Compiler | Object and check the switch that says Save PSW1 in C251 int code.
  2. Add the switch I2 to the assembler command line. In uVision, go to Options | A251 assembler | Misc and add I2 under "Additional Options."
  3. Copy the startup file (C251LIBSTART251.A51) to your project directory and add it to your project. Around line 57 there is a line that reads INTR EQU 1. Change this to read INTR EQU 0.

That's all there is to it!

Article last edited on: 2005-07-09 11:51:38

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential