mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
cpukit/libdebugger: Add MicroBlaze support
Add MicroBlaze support for libdebugger. This uses only software break type instructions to provide self-hosted GDB debugging support for applications since internal control of debug hardware is not possible. Also of note, this implementation for MicroBlaze would typically use the brki instruction for software break, but instead uses an illegal opcode to manage software breaks as exceptions. This is due to poor interaction with the debug hardware where the debug hardware will intercept software breaks instead of allowing the software break vector to execute.
This commit is contained in:
committed by
Joel Sherrill
parent
16d40ce7ff
commit
3317d1e8f0
1393
cpukit/libdebugger/rtems-debugger-microblaze.c
Normal file
1393
cpukit/libdebugger/rtems-debugger-microblaze.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -208,6 +208,30 @@ typedef struct {
|
||||
#define _CPU_MSR_SET( _msr_value ) \
|
||||
{ __asm__ volatile ("mts rmsr, %0" : "=&r" ((_msr_value)) : "0" ((_msr_value))); }
|
||||
|
||||
#define MICROBLAZE_PVR0_VERSION_GET( _pvr0_value ) \
|
||||
( ( _pvr0_value >> 8 ) & 0xff )
|
||||
|
||||
#define _CPU_PVR0_GET( _pvr0_value ) \
|
||||
do { \
|
||||
( _pvr0_value ) = 0; \
|
||||
__asm__ volatile ( "mfs %0, rpvr0" : "=&r" ( ( _pvr0_value ) ) ); \
|
||||
} while ( 0 )
|
||||
|
||||
#define MICROBLAZE_PVR3_BP_GET( _pvr3_value ) \
|
||||
( ( _pvr3_value >> 25 ) & 0xf )
|
||||
|
||||
#define MICROBLAZE_PVR3_RWP_GET( _pvr3_value ) \
|
||||
( ( _pvr3_value >> 19 ) & 0x7 )
|
||||
|
||||
#define MICROBLAZE_PVR3_WWP_GET( _pvr3_value ) \
|
||||
( ( _pvr3_value >> 13 ) & 0x7 )
|
||||
|
||||
#define _CPU_PVR3_GET( _pvr3_value ) \
|
||||
do { \
|
||||
( _pvr3_value ) = 0; \
|
||||
__asm__ volatile ( "mfs %0, rpvr3" : "=&r" ( ( _pvr3_value ) ) ); \
|
||||
} while ( 0 )
|
||||
|
||||
#define _CPU_ISR_Disable( _isr_cookie ) \
|
||||
{ \
|
||||
unsigned int _new_msr; \
|
||||
|
||||
@@ -16,6 +16,8 @@ links:
|
||||
uid: objdbgarm
|
||||
- role: build-dependency
|
||||
uid: objdbgi386
|
||||
- role: build-dependency
|
||||
uid: objdbgmicroblaze
|
||||
source:
|
||||
- cpukit/libdebugger/rtems-debugger-block.c
|
||||
- cpukit/libdebugger/rtems-debugger-bsp.c
|
||||
|
||||
15
spec/build/cpukit/objdbgmicroblaze.yml
Normal file
15
spec/build/cpukit/objdbgmicroblaze.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
|
||||
build-type: objects
|
||||
cflags: []
|
||||
copyrights:
|
||||
- Copyright (C) 2022 On-Line Applications Research (OAR)
|
||||
cppflags: []
|
||||
cxxflags: []
|
||||
enabled-by:
|
||||
- microblaze
|
||||
includes: []
|
||||
install: []
|
||||
links: []
|
||||
source:
|
||||
- cpukit/libdebugger/rtems-debugger-microblaze.c
|
||||
type: build
|
||||
@@ -12,6 +12,7 @@ enabled-by:
|
||||
- aarch64
|
||||
- arm
|
||||
- i386
|
||||
- microblaze
|
||||
links: []
|
||||
name: BUILD_LIBDEBUGGER
|
||||
type: build
|
||||
|
||||
Reference in New Issue
Block a user