Keil Logo

A251: Avoiding the Use of Register Bank 0


Information in this article applies to:

  • C251 Version 2.14

QUESTION

I am writing an assembly application and do not want register bank 0 to be used at all, because another project residing in my hardware uses it. Whatever I try, register bank 0 is always used. How do I keep register 0 from being used?

ANSWER

  1. Copy the file START251.A51 from the \LIB directory into your project directory.
  2. Add START251.A51 to your project.
  3. Insert the following at the start of all your source files, including START251.A51:
    $REGISTERBANK(1)
    

    This forces your project to use register bank 1 instead of 0. The start up code contained in START251.A51 is always included in your project. However, by creating a copy and adding it to your project, you may customize it as shown in this solution.

MORE INFORMATION

Last Reviewed: Wednesday, September 21, 2016


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.