[PATCH] libdebugger: Fix ARMv7-M with -O0

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Mar 20 05:49:42 UTC 2020


On 20/03/2020 05:15, Chris Johns wrote:

> On 19/3/20 7:52 pm, Sebastian Huber wrote:
>> The ARMv7-M architecture has no CP-15.  The inline assembly for the
>> CP-15 access leads to assembler errors if compiled with -O0.
> I would like to understand this one in detail to see why there is cp15 in the build.
In ARMv7-M the system registers are memory mapped.

If I compile a Cortex-M based BSP with -O0, then I get:

  [1417/1512] Compiling cpukit/libdebugger/rtems-debugger-arm.c
/tmp/ccyYY491.s: Assembler messages:
/tmp/ccyYY491.s:3997: Error: selected processor does not support 
requested special purpose register -- `mrs r1,spsr'
/tmp/ccyYY491.s:4001: Error: selected processor does not support 
requested special purpose register -- `mrs r2,cpsr'
/tmp/ccyYY491.s:4003: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r1'
/tmp/ccyYY491.s:4006: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r2'
/tmp/ccyYY491.s:4020: Error: selected processor does not support 
requested special purpose register -- `mrs r1,spsr'
/tmp/ccyYY491.s:4022: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r2'
/tmp/ccyYY491.s:4044: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r1'
/tmp/ccyYY491.s:4068: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r2'
/tmp/ccyYY491.s:4082: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r1'
/tmp/ccyYY491.s:4085: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r2'
/tmp/ccyYY491.s:4086: Error: selected processor does not support 
requested special purpose register -- `msr spsr,r6'
/tmp/ccyYY491.s:4150: Error: selected processor does not support 
requested special purpose register -- `mrs r1,spsr'
/tmp/ccyYY491.s:4154: Error: selected processor does not support 
requested special purpose register -- `mrs r2,cpsr'
/tmp/ccyYY491.s:4156: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r1'
/tmp/ccyYY491.s:4159: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r2'
/tmp/ccyYY491.s:4173: Error: selected processor does not support 
requested special purpose register -- `mrs r1,spsr'
/tmp/ccyYY491.s:4175: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r2'
/tmp/ccyYY491.s:4197: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r1'
/tmp/ccyYY491.s:4221: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r2'
/tmp/ccyYY491.s:4235: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r1'
/tmp/ccyYY491.s:4238: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r2'
/tmp/ccyYY491.s:4239: Error: selected processor does not support 
requested special purpose register -- `msr spsr,r6'
/tmp/ccyYY491.s:4303: Error: selected processor does not support 
requested special purpose register -- `mrs r1,spsr'
/tmp/ccyYY491.s:4307: Error: selected processor does not support 
requested special purpose register -- `mrs r2,cpsr'
/tmp/ccyYY491.s:4309: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r1'
/tmp/ccyYY491.s:4312: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r2'
/tmp/ccyYY491.s:4326: Error: selected processor does not support 
requested special purpose register -- `mrs r1,spsr'
/tmp/ccyYY491.s:4328: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r2'
/tmp/ccyYY491.s:4350: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r1'
/tmp/ccyYY491.s:4374: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r2'
/tmp/ccyYY491.s:4388: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r1'
/tmp/ccyYY491.s:4391: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r2'
/tmp/ccyYY491.s:4392: Error: selected processor does not support 
requested special purpose register -- `msr spsr,r6'
/tmp/ccyYY491.s:4456: Error: selected processor does not support 
requested special purpose register -- `mrs r1,spsr'
/tmp/ccyYY491.s:4460: Error: selected processor does not support 
requested special purpose register -- `mrs r2,cpsr'
/tmp/ccyYY491.s:4462: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r1'
/tmp/ccyYY491.s:4465: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r2'
/tmp/ccyYY491.s:4479: Error: selected processor does not support 
requested special purpose register -- `mrs r1,spsr'
/tmp/ccyYY491.s:4481: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r2'
/tmp/ccyYY491.s:4503: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r1'
/tmp/ccyYY491.s:4527: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r2'
/tmp/ccyYY491.s:4541: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r1'
/tmp/ccyYY491.s:4544: Error: selected processor does not support 
requested special purpose register -- `msr cpsr,r2'
/tmp/ccyYY491.s:4545: Error: selected processor does not support 
requested special purpose register -- `msr spsr,r6'

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200320/74c98fb6/attachment.html>


More information about the devel mailing list