User`s manual

Copyright © Quantum Leaps, LLC. All Rights Reserved.
QDK™
Renesas RX with HEW
state-machine.com/rx
5.4.2 Saving and Restoring the Accumulator in the ISRs
The interrupt functions generated by the RX compiler with
#pragma vector
do not preserve the RX
accumulator register, unless the compiler option
-save_acc
is activated. This can be achieved in the
HEW IDE by selecting the menu Build | RX Standard Toolchain, the CPU tab, Details... button (see
Figure 11).
NOTE: When using the preemptive QK kernel, you always need to activate the
-save_acc
compiler
option, even if your ISRs do not perform any MAC or floating-point instructions. This is because, in
QK interrupts can lead to a task preemptions, and the task-level code could be using these
instructions.
Figure 11: Activating the option -save_acc in HEW
26 of 32