Keil Logo

A251: Avoiding the Use of Register Bank 0


Information in this article applies to:

  • C251

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 bank 0 from being used?

ANSWER

  1. If not already done, copy the file START251.A51 from the \LIB directory into your project directory and add it to the project.
  2. 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 startup 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: Thursday, February 25, 2021


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.