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

2023-08-17 Thread Chris Johns
On 18/8/2023 7:01 am, Kinsey Moore wrote:
> On Thu, Aug 17, 2023 at 7:11 AM Kinsey Moore  > wrote:
> 
> On Wed, Aug 16, 2023 at 9:42 PM Chris Johns  > 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.

Thanks for this and looking into it. I am fine with the change now we understand
it is not compatible. It sounds like a new back end would be cleaner for both
types of devices.

The patch is approved.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

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

2023-08-17 Thread Kinsey Moore
On Thu, Aug 17, 2023 at 7:11 AM Kinsey Moore 
wrote:

> On Wed, Aug 16, 2023 at 9:42 PM Chris Johns  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
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

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

2023-08-17 Thread Kinsey Moore
On Wed, Aug 16, 2023 at 9:42 PM Chris Johns  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.

Kinsey
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

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

2023-08-16 Thread Chris Johns
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?

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


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

2023-08-16 Thread Kinsey Moore
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.
---
 spec/build/cpukit/optlibdebugger.yml | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/spec/build/cpukit/optlibdebugger.yml 
b/spec/build/cpukit/optlibdebugger.yml
index 4cee9809f6..5ff67d6bd8 100644
--- a/spec/build/cpukit/optlibdebugger.yml
+++ b/spec/build/cpukit/optlibdebugger.yml
@@ -9,7 +9,15 @@ default: []
 description: ''
 enabled-by:
 - aarch64
-- arm
+- and:
+  - arm
+  - not: bsps/arm/atsam
+  - not: bsps/arm/imxrt
+  - not: bsps/arm/lm3s69xx
+  - not: bsps/arm/lpc176x
+  - not: bsps/arm/lpc24xx
+  - not: bsps/arm/stm32h7
+  - not: bsps/arm/stm32f4
 - i386
 - microblaze
 links: []
-- 
2.39.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel