background image

S I G N U M   S Y S T E M S  

8 3 0

 

5. 

To start a new debugging session, from the debug history list, select the debug configuration 

you created—in our example, “Debug with JTAGjet”—or open the Debug Configuration 
dialog box by selecting Debug Configuration from the Debug As option in the project pop-

up menu. Press the Debug button. 

Using GDB with the GDB Server 

The GDB Monitor Command 

SigGdbServer provides the following commands for sending special requests to the GDB server. 

JTAGjet GDB Server commands: 
  flash before-load - before loading a new program 
  flash after-load  - after loading a new program 
  set verify-memory 0|1 – verify when writing memory 
  status - display the processor status 
  do <macro-file>   - execute a macro file 
  Any macro language command (see SigGdbServer User Manual for a list of 

available commands). 

 
The above commands are available in the GDB debugger as monitor commands. For instance: 

(gdb) monitor flash before-load 

The 

flash before-load

 and 

flash after-load

 commands are described in section 

Loading to 

Flash

 (page 

6

).  

The 

set verify-memory

 command controls memory verification by the server after writing. As 

write operations involving 4 or less bytes may be attempts to access memory-mapped I/O 

registers, they are not verified. 
The 

monitor

 command allows you to execute the macro commands listed in 

Table 2

 (page 

5

). A 

set of commands found in Table 2 can be stored in a file and executed with the use of the 

do 

<macro-file>

 command. The examples below illustrate the command usage. 

(gdb) monitor do C:\Signum\SigGdbServer\boards\iMX31.ini 
(gdb) monitor reset /halt 
(gdb) monitor d32 0x10000000 

Some 

monitor

 commands may change the state of the processor. To let GDB notice such a 

change, delay the 

monitor

 command until the next 

continue

 command, using the 

–delay

, or 

–d

option. For instance: 

(gdb) monitor –d reset 
(gdb) cont 

Some processors may stop on reset, usually at the reset vector. The 

cont

 command will report 

the processor status as halted. If the processor does not stop after reset, press CTRL-C key 
combination to halt it. 
Delayed monitor commands are combined and executed at once by the next 

continue

 

command: 

(gdb) monitor –d reset 
(gdb) monitor –d pause 100 

10 

Summary of Contents for GDB Server

Page 1: ...SIGNUM SY STEMS CORPORATION GDB Server for ARM XScale and Cortex User Manual Server series...

Page 2: ...tion of such revision or changes WARRANTY Signum Systems warrants to the original purchaser that this product is free of defects in material and workmanship and performs to applicable published Signum...

Page 3: ...the Server 3 Usage 3 Emulation Parameter File 5 Macro Initialization Files 5 Board and CPU Customization 6 Loading to Flash 6 Configuring the Debugger 7 GNU GDB Debugger 7 Code Sourcery G IDE 8 Using...

Page 4: ...er emulator tandem requires a license If your emulator does not have it an external license file must be obtained from Signum Systems Once received the Jxxxxx Gdb lic file needs to be placed in the di...

Page 5: ...finition files boards par ini CPU and target specific parameter and board initialization files targets def Peripheral register definition files Drivers USB JTAGjet USB driver TABLE 1 The contents of t...

Page 6: ...will make the license available to all your Signum applications To make the license available exclusively to the Signum GDB server put the license file in the directory where you installed SigGdbServ...

Page 7: ...T H A N O R F L A S H A T 0 X A 0 0 0 _ 0 0 0 0 sigGdbServer cpu iMX31 init flash cfi 0xA000_0000 ram 16k 0x1FFF_C000 C O N N E C T T O T H E L U M I N A R Y M I C R O L M 3 S X X X P R O C E S S O R...

Page 8: ...SB S16 SW S32 SD addr value OR value with memory at addr S8 SB S16 SW S32 SD addr value AND value with memory at addr S8 SB S16 SW S32 SD addr value XOR value with memory at addr D8 DB D16 DW D32 DD...

Page 9: ...figure the GDB server for several microcontrollers with internal flash memory are shown on page 4 The current version of the server supports the following flash types external CFI compatible NOR flash...

Page 10: ...ecting to the server on the local machine gdb target remote localhost 2000 The server will report a successful connection If GDB can read an XML target description from a target the server will load t...

Page 11: ...t simultaneously The server may also be started directly from the GDB debugger using a pipe So started SigGdbServer receives commands from the debugger on its standard input and sends answers on its s...

Page 12: ...g External Embedded Server and connection parameters 3 JTAGjet GDB Server ver 1 06 and earlier require the verbose resume mode to be disabled Add the following command to your gdbinit file set remote...

Page 13: ...e described in section Loading to Flash page 6 The set verify memory command controls memory verification by the server after writing As write operations involving 4 or less bytes may be attempts to a...

Page 14: ...nual for the format description If the file name extension or the file path matches its default value it can be omitted The default extension of the register definition file is def and the default fil...

Page 15: ...command gdb set var CP15 CONTROL 0x51078 Alternatively coprocessor registers may be accessed using one of the monitor commands See Table 2 on page 5 for a list of available commands For instance gdb...

Page 16: ...ead size 0x240 lma 0x90008000 Loading section init size 0x1edc0 lma 0x90008240 Loading section text size 0x34f5b8 lma 0x90027000 Loading section text init size 0xd4 lma 0x903765b8 Loading section __ks...

Page 17: ...Set a hardware breakpoint at start_kernel gdb hbreak start_kernel Hardware assisted breakpoint 6 at 0xc00087b0 file init main c line 547 gdb c Continuing Breakpoint 6 start_kernel at init main c 547 5...

Reviews: