0% found this document useful (0 votes)
26 views9 pages

EP00311714NWA2

Uploaded by

fernando
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views9 pages

EP00311714NWA2

Uploaded by

fernando
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Europäisches Patentamt

(19) European Patent Office *EP001118939A2*


Office européen des brevets (11) EP 1 118 939 A2
(12) EUROPEAN PATENT APPLICATION

(43) Date of publication: (51) Int Cl.7: G06F 11/36, G06F 11/00
25.07.2001 Bulletin 2001/30

(21) Application number: 00311714.0

(22) Date of filing: 27.12.2000

(84) Designated Contracting States: • Warder, Mark


AT BE CH CY DE DK ES FI FR GB GR IE IT LI LU Woolwell, Plymouth PL6 7SX (GB)
MC NL PT SE TR • Hansell-Wright, Lisa
Designated Extension States: Mainstone, Plymouth PL6 8NR (GB)
AL LT LV MK RO SI
(74) Representative: Lind, Robert
(30) Priority: 18.01.2000 GB 0000960 Marks & Clerk,
4220 Nash Court,
(71) Applicant: Mitel Semiconductor Limited Oxford Business Park South
Swindon, Wiltshire SN2 2QW (GB) Oxford OX4 2RU (GB)

(72) Inventors:
• Aldridge, David
Tavistock, Devon (GB)

(54) Software debugger user interface

(57) A method of debugging software arranged to field. One or more of the populated fields is displayed
run on a microcontroller for the purpose of controlling a on a graphical user interface of the debugger application
macrocell associated with the microcontroller 1. The 3. User initiated debugging related instructions are re-
method comprises the steps of populating fields of a de- layed to the microcontroller 1 from the debugger appli-
bugger application 3 using macrocell specific data read cation 3, whilst response data is received from the mi-
electronically from a database 4, said fields including at crocontroller 1 at the debugger application 3. The re-
least a parameter name field and a parameter location ceived response data is displayed to the user on the
graphical user interface of the debugger application 3.
EP 1 118 939 A2

Printed by Jouve, 75001 PARIS (FR)


1 EP 1 118 939 A2 2

Description might return 0x2c030000.


4. Interpret the value read. In the example, the Tim-
[0001] The present invention relates to software de- er B Run Status is set.
bugging and more particularly to the debugging of soft-
ware arranged to run on a microcontroller for the pur- 5 [0005] A similar series of steps must be taken if the
pose of controlling a macrocell associated with the mi- software developer wishes to modify an aspect of a
crocontroller macrocell's configuration. For example, the developer
[0002] A microcontroller may comprise one or more may wish to clear the Timer B Run Status bit. To modify
processor cores together with one or more macrocells. a bit field, steps 1 and 2 above are repeated, and are
A macrocell is a sub-system built into a microcontroller 10 followed by a register write operation to write the correct
to provide specific functionality in addition to that pro- new value.
vided by the microprocessor itself. Macrocells are typi- [0006] It will be appreciated that this process of veri-
cally implemented in hardware, although in certain cir- fying a macrocell's configuration is both error-prone and
cumstances they may be implemented in software or in tedious. In addition, there may be "side effects" of which
a combination of hardware and software. Examples of 15 the user is unaware. For example, the reading of a cer-
macrocells are Interrupt Controllers, Universal Asyn- tain register may be a destructive operation (because
chronous Receivers/Transmitters, and Timer/Counters. certain status bits are automatically cleared by the read
[0003] When developing software for a microcontrol- operation), or, when writing to a register, only certain
ler having one or more associated macrocells, it is often write values may be allowed. In another example, cer-
necessary to use software debugging tools to verify how 20 tain "polymorphic" registers may be not available under
the macrocell components have been configured by the certain modes of operation.
software under development and, possibly, to modify [0007] There is described in US5,815,653 a system
the configuration "on-the-fly". The configuration of a for debugging software and which comprises a portable
macrocell is achieved through programming certain bit debug environment-independent client debugger object
fields which are grouped into registers of the macrocell. 25 and at least one non-portable server debugger object
Typically, the registers are mapped into the addressable with platform specific debug logic. The client object and
memory space of the processor core, or into the proc- the server object(s) are run on respective nodes con-
essor core's input-output space. In either case, the proc- nected to a common network. This system is not intend-
essor core is able both to read from and to write to these ed to debug macrocell related software but rather is con-
registers in order to monitor or control the functionality 30 cerned exclusively with the debugging of microcontroller
of its macrocells. specific software. The system of US5,815,653 requires,
[0004] In order for the developer of software intended for all debugging operations, the presence of both a
to run on the microcontroller to be able to verify the cor- server and a client object and therefore represents a rel-
rect operation of the software, or perhaps to modify the atively complex solution.
macrocell configuration at a certain point, the developer 35 [0008] It is an object of the present invention to over-
will use a software debugger tool. Such tools are gen- come the disadvantages of existing macrocell software
erally specific to the processor core(s) in a microcontrol- debuggers noted above. It is also an object of the
ler, and do not have knowledge of the macrocell com- present invention to provide a debugging system and
ponents. Accordingly, to examine a certain aspect of a method which is relatively uncomplicated and which
macrocell's configuration, the software developer will 40 provides an easy to use interface for a human operator.
typically have to carry out the following steps: [0009] According to a first aspect of the present inven-
tion there is provided a method of debugging software
1. Identify from the microcontroller's data sheet, the arranged to run on a microcontroller for the purpose of
bit field that controls the macrocell functionality with controlling a macrocell associated with the microcontrol-
which the developer is concerned. This will locate 45 ler, the method comprising the steps of:
the bit field within a register. For example, in the Mi-
tel Mvt905001 Microcontroller™, the "Timer B Run populating fields of a debugger application using
Status" bit of the Timer/Counter (TIC) macrocell is macrocell specific data read electronically from a
bit 17 of the Timer B Control/Status register. database, said fields including at least a parameter
2. Look up the address of the register. This step of- 50 name field and a parameter location field;
ten involves adding an offset to a macrocell base displaying one or more of the populated fields on a
address. Continuing the above example, the Timer graphical user interface of the debugger applica-
B Control/Status register is listed as being at an off- tion;
set of 0x20, and the macrocell base address is giv- transmitting user initiated debugging related in-
en as 0xE000E000. Accordingly, this register's ad- 55 structions to the microcontroller from the debugger
dress is 0xE000E020. application;
3. Use the debugger to read the register. For exam- receiving response data from the microcontroller at
ple, reading memory at the address 0xE000E020 the debugger application; and

2
3 EP 1 118 939 A2 4

displaying the response data to the user on the erates in conjunction with a standard debugger tool, the
graphical user interface of the debugger applica- standard debugger tool and the debugger application
tion. may communicate with the target microcontroller via a
shared driver. A server may be used to route traffic be-
[0010] It will be understood that the parameter name 5 tween the driver and the debugger tool and application.
field of the debugger application contains names which Certain instructions may be communicated from the de-
can be understood by a technical user. It will also be bugger application to the target microcontroller via the
understood that the parameter location field contains debugger tool.
details of the locations of the parameters identified in [0018] According to a second aspect of the present
the parameter name field, i.e. memory storage location 10 invention there is provided a system for debugging soft-
in the microcontroller or macrocell. ware arranged to run on a microcontroller for the pur-
[0011] Embodiments of the present invention allow pose of controlling a macrocell associated with the mi-
the debugger application to be configured according to crocontroller, the system comprising:
the specific macrocell for which software is to be de-
bugged. This contrasts with existing solutions where de- 15 first memory means storing one or more databases
bugger applications are specific only to certain micro- containing macrocell specific data;
controller types, e.g. where a microcontroller manufac- computer means comprising a processor and a sec-
turer provides a debugger application specific to his own ond memory means arranged in use to implement
product(s) but where the debugger application has no a debugger application including at least a param-
knowledge of the macrocell. A user may select a first 20 eter name field and a parameter location field, the
macrocell for which the appropriate fields of the debug- fields being populated using macrocell specific data
ger application are populated, and then select a second obtained from a database;
(or subsequent) macrocell for which the fields are re- input/output means for coupling to a microcontrol-
populated. ler, wherein user initiated debugging related instruc-
[0012] Preferably, the method comprises the step of 25 tions may be transmitted to the microcontroller from
identifying the macrocell for which software is to be de- the debugger application, and response data from
bugged and selecting a database (or portion of a data- the microcontroller may be received at the debug-
base) corresponding to the identified macrocell, wherein ger application; and
said macrocell specific data can be extracted from the a graphical user interface for displaying at least cer-
selected database (or database portion). 30 tain of said populated fields in addition to response
[0013] In addition to a parameter name field and a pa- data received from the microcontroller.
rameter location field, the debugger application may ad-
ditionally comprise a parameter value field, and a pa- [0019] According to a third aspect of the present in-
rameter information field, where the former field con- vention there is provided a computer memory encoded
tains the values (if any) for respective macrocell param- 35 with executable instructions representing a computer
eters and the later contains explanations of the purpos- program for causing a computer connected to a compu-
es of respective macrocell parameters. ter network to debug software arranged to run on a mi-
[0014] The debugger application may also obtain pa- crocontroller for the purpose of controlling a macrocell
rameter access data from the selected database. This associated with the microcontroller, the debugging op-
may include details of the read/write access which a us- 40 eration comprising the steps of:
er may have to certain parameters. It may also include
warnings which can be displayed to a user if a certain populating fields of a debugger application using
parameter is selected for a read or write operation. macrocell specific data obtained from a database,
[0015] The database which is used to populate the de- said fields including at least a parameter name field
bugger application may be created manually, for exam- 45 and a parameter location field;
ple by extracting data from a macrocell provider's man- displaying one or more of the populated fields on a
ual and entering it into appropriate fields of the data- graphical user interface of the debugging applica-
base. Alternatively, the database may be constructed tion;
"automatically" using a tool assisted translation proc- transmitting user initiated debugging related in-
ess. 50 structions to the microcontroller from the debugger
[0016] Preferably, the debugger application operates application;
in conjunction with a standard debugger tool. More pref- receiving response data from the microcontroller at
erably, the debugger tool is used to establish a commu- the debugger application; and
nications link with the target microcontroller and the de- displaying the response data to the user on the
bugger application sends and receives data over this 55 graphical user interface of the debugger applica-
link. Alternatively however, the debugger application tion.
may incorporate its own debugger tool.
[0017] In the case where the debugger application op- [0020] For a better understanding of the present in-

3
5 EP 1 118 939 A2 6

vention and in order to show how the same may be car- the debugger application 3 with a target debugger 5 re-
ried into effect reference will now be made, by way of quires a 'Debugger Environment' to be created whereby
example, to the accompanying drawings, in which: the debugger application 3 and the target debugger 5
both communicate with the same target microcontroller
Figure 1 illustrates the graphical user interface of a 5 1. In effect, the debugger application 3 piggybacks on
debugger application displaying sample data; the communication link established by the ADW 5 with
Figure 2 illustrates schematically a debugger sys- the target microcontroller 1.
tem incorporating a debugger application; and [0025] The driver 2 used by the ADW 5 to communi-
Figure 3 is a flow diagram illustrating the method of cate with the target microcontroller 1 exposes two DLL
operation of the debugger application of Figure 2. 10 Application Programming Interfaces (APIs): WinRDI
and RDI (the WinRDI API is directly exported, whilst the
[0021] There is illustrated in Figure 1 a Windows™ RDI API is returned through WinRDI_GetRDIProcVec).
style graphical user interface of a debugger application The DLL is a user-selectable item in the ADW 5, and is
embodying the present invention. It is assumed that the used to configure the debugger's connection to the tar-
application has been configured for a specific macrocell 15 get (by selecting different DLLs in the ADW 5, the user
as will be described below. The left hand window of the can connect to different targets). An ADW Client DLL 6
display contains a macrocell/register tree structure for is provided to re-implement both the WinRDI and the
the processor of the selected microcontroller; in this RDI DLL APIs with versions that redirect them remotely
case the microcontroller is an Mvt905001™ microcon- to the Server application. The MTL remote_a.dll ADW
troller and the processor is an Arm7tdmi™ processor. 20 Client DLL is used to implement the Macroscope De-
The processor has seven macrocells (Dmac to Uart) as- bugger Environment. Both the debugger application 3
sociated with it, of which the Tic1 macrocell is shown and the ADW Client DLL 6 are interfaced to the driver 2
selected in Figure 1. Within the Tic1 Macrocell, the Con- via a COM Server 7.
trol and Status2 register is selected. In the right hand [0026] To support the debugger application 3, the in-
window, the identities of the nine bit fields of the Tic1 25 terface IMscope is provided by the Server 7. In conjunc-
macrocell are listed in the first column. Other columns tion with this interface, the debugger application 3 pro-
of this window contain the values, positions, width, ac- vides the connection point sink interface IStatus. On the
cess rights, and descriptions of the nine bit fields. Server 7, the IMscope interface provides the following
[0022] Not shown by the graphical display (illustrated functions: ReadRegister; WriteRegister; Stop; IsInitial-
in Figure 1) are the actual locations of the bit fields in 30 ised, IsRunning; and QueryConnect. These functions
the registers of the microcontroller. These locations are are used by the debugger application 3 to query the sta-
invisible to the user but are maintained by the applica- tus of the target microcontroller 1 and to read from and
tion. The debugger application therefore represents a write to registers. The first two functions use the RDI
transparent interface between the user and the macro- DLL API in their implementation, as has been noted pre-
cell bit fields. 35 viously.
[0023] Figure 2 illustrates schematically the structure [0027] In order that the debugger application 3 can
of a debugging system including the connections to a know about the execution status of the target microcon-
"target" microcontroller 1 having macrocell software to troller 1, the IStatus interface is employed. This interface
be debugged. The system connects to the target micro- allows the debugger application 3 to display the execu-
controller 1 via a driver 2 (data being written to and read 40 tion status of the target microcontroller 1, as well as al-
from the file "remote_a.dll") and debugging control in- lowing the debugger application 3 to prevent the user
terface 8 or 9. An essential element of the system is the from attempting to modify registers whilst the target is
debugger application 3 which produces the graphical executing.
user interface (see Figure 1). The fields of the left side [0028] The Microcontroller Information Database
windows of the user interface of the debugger applica- 45 Server 4 is a COM server which describes to the debug-
tion 3 are populated during a set-up phase (initiated by ger application 3 the target microcontroller's constitu-
the user clicking on a given macrocell in the right side ents. The server 4 implements the IchipInfo interface.
window) using data obtained from a Microcontroller In- The information obtained from the Database Server 4 is
formation Database Server 4, as well as "live" data ob- used by the debugger application 3 to configure the ap-
tained from the microcontroller 1. The Server 4 contains 50 plication's display at run-time. The Microcontroller Infor-
a database in which is stored information for each of the mation Database in turn obtains its data from a SIF file.
macrocells of the Mvt905001™ microcontroller The debugger application 3 supplies this file name to
[0024] The debugging system incorporates an the Microcontroller Information Database Server after
ARM™ Debugger for Windows™ (ADW) 5 which is used the user has selected it for opening. The information
in conjunction with the debugger application 3. The 55 needed to render each macrocell register in the debug-
ADW 5 allows programs to be loaded into the target mi- ger application 3 is summarised by the following list:
crocontroller 1 as well as the sending of start and stop
execution instructions thereto. This requirement to use Macrocell Name

4
7 EP 1 118 939 A2 8

Macrocell Base Address dition to a parameter name field and a parameter


Register Name location field, the debugger application additionally
Register Address Offset comprises a parameter value field and a parameter
Register Width information field, where the former field contains the
Bit Field Assignment 5 values for respective macrocell parameters and the
Bit Field Name later contains explanations of the purposes of re-
Bit Field Size spective macrocell parameters.
Bit Field Read Only Bit Mask
Bit Field Read Write Bit Mask 4. A method according to any one of the preceding
Bit Field Reserved Bit Mask 10 claims, wherein the debugger application obtains
Bit Field Write Only Bit Mask parameter access data from the selected database
including details of the read/write access which a
[0029] Figure 3 is a flow diagram illustrating the main user may have to certain parameters.
steps of the method described above.
[0030] It will be appreciated that various modifications 15 5. A method according to any one of the preceding
may be made to the above described embodiment with- claims, wherein the database which is used to pop-
out departing from the scope of the present invention. ulate the debugger application has been created
For example, whilst the invention has been illustrated manually.
above with reference to a debugging a real microcon-
troller, it will be appreciated that the invention may be 20 6. A method according to any one of claims 1 to 4,
applied to debugging an emulated microcontroller, i.e. wherein the database which is used to populate the
a software simulation running on a computer worksta- debugger application has been created automati-
tion. cally using a tool assisted translation process.

25 7. A method according to any one of the preceding


Claims claims, wherein the debugger application operates
in conjunction with a standard debugger tool.
1. A method of debugging software arranged to run on
a microcontroller for the purpose of controlling a 8. A method according to claim 7, wherein the stand-
macrocell associated with the microcontroller, the 30 ard debugger tool and the debugger application
method comprising the steps of: communicate with the target microcontroller via a
shared driver, and a server is used to route traffic
populating fields of a debugger application us- between the driver and the debugger tool and ap-
ing macrocell specific data read electronically plication.
from a database, said fields including at least a 35
parameter name field and a parameter location 9. A method according to any one of claims 1 to 6,
field; wherein the debugger application incorporates a
displaying one or more of the populated fields debugger tool.
on a graphical user interface of the debugger
application; 40 10. A method according to any one of the preceding
transmitting user initiated debugging related in- claims, wherein the microcontroller is a software
structions to the microcontroller from the de- emulation.
bugger application;
receiving response data from the microcontrol- 11. A system for debugging software arranged to run
ler at the debugger application; and 45 on a microcontroller for the purpose of controlling a
displaying the response data to the user on the macrocell associated with the microcontroller, the
graphical user interface of the debugger appli- system comprising:
cation.
first memory means storing one or more data-
2. A method according to claim 1 and comprising the 50 bases containing macrocell specific data;
step of identifying the macrocell for which software computer means comprising a processor and
is to be debugged and selecting a database or por- a second memory means arranged in use to im-
tion of a database corresponding to the identified plement a debugger application including at
macrocell, wherein said macrocell specific data can least a parameter name field and a parameter
be extracted from the selected database or data- 55 location field, the fields being populated using
base portion. macrocell specific data obtained from a data-
base;
3. A method according to claim 1 or 2, wherein, in ad- input/output means for coupling to a microcon-

5
9 EP 1 118 939 A2 10

troller, wherein user initiated debugging related


instructions may be transmitted to the micro-
controller from the debugger application, and
response data from the microcontroller may be
received at the debugger application; and 5
a graphical user interface for displaying at least
certain of said populated fields in addition to re-
sponse data received from the microcontroller.

12. A computer memory encoded with executable in- 10


structions representing a computer program for
causing a computer connected to a computer net-
work to debug software arranged to run on a micro-
controller for the purpose of controlling a macrocell
associated with the microcontroller, the debugging 15
operation comprising the steps of:

populating fields of a debugger application us-


ing macrocell specific data obtained from a da-
tabase, said fields including at least a parame- 20
ter name field and a parameter location field;
displaying one or more of the populated fields
on a graphical user interface of the debugging
application;
transmitting user initiated debugging related in- 25
structions to the microcontroller from the de-
bugger application;
receiving response data from the microcontrol-
ler at the debugger application; and
displaying the response data to the user on the 30
graphical user interface of the debugger appli-
cation.

35

40

45

50

55

6
EP 1 118 939 A2

7
EP 1 118 939 A2

8
EP 1 118 939 A2

You might also like