<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>On 20/03/2020 05:15, Chris Johns wrote:<br>
    </p>
    <blockquote type="cite"
      cite="mid:48acdd0e-2fb8-d178-c02e-8e14c10d89fc@rtems.org">
      <pre class="moz-quote-pre" wrap="">On 19/3/20 7:52 pm, Sebastian Huber wrote:
</pre>
      <blockquote type="cite" style="color: #000000;">
        <pre class="moz-quote-pre" wrap="">The ARMv7-M architecture has no CP-15.  The inline assembly for the
CP-15 access leads to assembler errors if compiled with -O0.
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">I would like to understand this one in detail to see why there is cp15 in the build.</pre>
    </blockquote>
    In ARMv7-M the system registers are memory mapped.<br>
    <p>If I compile a Cortex-M based BSP with -O0, then I get:</p>
    <p> [1417/1512] Compiling cpukit/libdebugger/rtems-debugger-arm.c<br>
      /tmp/ccyYY491.s: Assembler messages:<br>
      /tmp/ccyYY491.s:3997: Error: selected processor does not support
      requested special purpose register -- `mrs r1,spsr'<br>
      /tmp/ccyYY491.s:4001: Error: selected processor does not support
      requested special purpose register -- `mrs r2,cpsr'<br>
      /tmp/ccyYY491.s:4003: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r1'<br>
      /tmp/ccyYY491.s:4006: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r2'<br>
      /tmp/ccyYY491.s:4020: Error: selected processor does not support
      requested special purpose register -- `mrs r1,spsr'<br>
      /tmp/ccyYY491.s:4022: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r2'<br>
      /tmp/ccyYY491.s:4044: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r1'<br>
      /tmp/ccyYY491.s:4068: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r2'<br>
      /tmp/ccyYY491.s:4082: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r1'<br>
      /tmp/ccyYY491.s:4085: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r2'<br>
      /tmp/ccyYY491.s:4086: Error: selected processor does not support
      requested special purpose register -- `msr spsr,r6'<br>
      /tmp/ccyYY491.s:4150: Error: selected processor does not support
      requested special purpose register -- `mrs r1,spsr'<br>
      /tmp/ccyYY491.s:4154: Error: selected processor does not support
      requested special purpose register -- `mrs r2,cpsr'<br>
      /tmp/ccyYY491.s:4156: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r1'<br>
      /tmp/ccyYY491.s:4159: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r2'<br>
      /tmp/ccyYY491.s:4173: Error: selected processor does not support
      requested special purpose register -- `mrs r1,spsr'<br>
      /tmp/ccyYY491.s:4175: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r2'<br>
      /tmp/ccyYY491.s:4197: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r1'<br>
      /tmp/ccyYY491.s:4221: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r2'<br>
      /tmp/ccyYY491.s:4235: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r1'<br>
      /tmp/ccyYY491.s:4238: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r2'<br>
      /tmp/ccyYY491.s:4239: Error: selected processor does not support
      requested special purpose register -- `msr spsr,r6'<br>
      /tmp/ccyYY491.s:4303: Error: selected processor does not support
      requested special purpose register -- `mrs r1,spsr'<br>
      /tmp/ccyYY491.s:4307: Error: selected processor does not support
      requested special purpose register -- `mrs r2,cpsr'<br>
      /tmp/ccyYY491.s:4309: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r1'<br>
      /tmp/ccyYY491.s:4312: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r2'<br>
      /tmp/ccyYY491.s:4326: Error: selected processor does not support
      requested special purpose register -- `mrs r1,spsr'<br>
      /tmp/ccyYY491.s:4328: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r2'<br>
      /tmp/ccyYY491.s:4350: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r1'<br>
      /tmp/ccyYY491.s:4374: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r2'<br>
      /tmp/ccyYY491.s:4388: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r1'<br>
      /tmp/ccyYY491.s:4391: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r2'<br>
      /tmp/ccyYY491.s:4392: Error: selected processor does not support
      requested special purpose register -- `msr spsr,r6'<br>
      /tmp/ccyYY491.s:4456: Error: selected processor does not support
      requested special purpose register -- `mrs r1,spsr'<br>
      /tmp/ccyYY491.s:4460: Error: selected processor does not support
      requested special purpose register -- `mrs r2,cpsr'<br>
      /tmp/ccyYY491.s:4462: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r1'<br>
      /tmp/ccyYY491.s:4465: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r2'<br>
      /tmp/ccyYY491.s:4479: Error: selected processor does not support
      requested special purpose register -- `mrs r1,spsr'<br>
      /tmp/ccyYY491.s:4481: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r2'<br>
      /tmp/ccyYY491.s:4503: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r1'<br>
      /tmp/ccyYY491.s:4527: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r2'<br>
      /tmp/ccyYY491.s:4541: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r1'<br>
      /tmp/ccyYY491.s:4544: Error: selected processor does not support
      requested special purpose register -- `msr cpsr,r2'<br>
      /tmp/ccyYY491.s:4545: Error: selected processor does not support
      requested special purpose register -- `msr spsr,r6'</p>
  </body>
</html>