[PATCH] spec/cpukit: Omit Cortex-M from libdebugger build

Kinsey Moore kinsey.moore at oarcorp.com
Thu Aug 17 21:01:44 UTC 2023


On Thu, Aug 17, 2023 at 7:11 AM Kinsey Moore <kinsey.moore at oarcorp.com>
wrote:

> On Wed, Aug 16, 2023 at 9:42 PM Chris Johns <chrisj at rtems.org> wrote:
>
>> On 17/8/2023 6:30 am, Kinsey Moore wrote:
>> > The current ARM support in libdebugger does not cover Cortex-M series
>> > cores since it requires support for CP14 system register accessor
>> > instructions. Cortex-M series cores support debug monitor mode, but its
>> > configuration is accessed by memory mapped registers instead of using
>> > CP14. This omits building libdebugger from BSPs that use a cortex-m ABI
>> > flag.
>>
>> The ARM libdebugger has support to use memory mapped registers. It is
>> determined
>>  by the ROM and then rtems_debugger_arm_debug_registers. I think the code
>> currently assume CP14 instructions but I think that could be made
>> conditional
>> where needed?
>>
>> Are these builds of Cortex-M processors able to support libdebugger?
>>
>> I have been rejecting changes like this unless there is a reason it
>> cannot be
>> made to work. Are there reasons it cannot be made to work?
>>
>
> As to my current understanding, I believe that the Cortex-M3/4/7 cores can
> support libdebugger via their exclusive monitor mode. I'll see if I can
> work around the CP14 issues instead.
>

Reading into the relevant Architecture and Technical reference manuals, the
ROM tables in the Cortex-M cores do not expose information about the debug
and data watchpoint blocks. It looks like all the breakpoint (0xE0002000)
and watchpoint (0xE0001000) controls are the same IP at the same address
across the Cortex-M line, but are in no way compatible with the CP14-based
breakpoint and watchpoint blocks in the Cortex-A/R lines of cores. The
Cortex-M cores require a nearly unrelated libdebugger implementation.

Kinsey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20230817/4cc639b1/attachment-0001.htm>


More information about the devel mailing list