This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Using GDB with M32R MSA2000 Board



Thanks for the advice.  Unfortunately I am going out of
town for a couple of weeks so I won't be able to
try it out until I get back.


On 11 Jan 2001, at 10:25, Fernando Nasser wrote:

> Noah Aklilu wrote:
> > 
> > It still comes out with the same error (minus the backtrace)
> > about the bad value returned.  Unfortunately the mon2000
> > is a remote target, so there is really no way I can think
> > of logging that.  Is there a way to starting backend
> > logging with gdb?
> > 
> > Well here is the result when I execute the gdb command:
> > 
> > m32r-elf-gdb -nw hello.exe
> > 
> > GNU gdb 5.0
> > Copyright 2000 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and
> > you are
> > welcome to change it and/or distribute copies of it under certain
> > conditions.
> > Type "show copying" to see the conditions.
> > There is absolutely no warranty for GDB.  Type "show warranty" for
> > details.
> > This GDB was configured as "--host=i686-pc-cygwin --target=m32r-
> > elf"...
> > (gdb) set remotebaud 9600
> > (gdb) target mon2000 com2
> > Remote target mon2000 connected to com2
> > monitor_supply_register (21):  bad value from monitor: 7FFFFFF0
> > psw = 000000C0 (BSM=0, BIE=0, BC=0, SM=1, IE=1, C=0)
> >   bpc = 00000000
> >   r0  = 00000000    r1  = 00000000    r2  = 00000000    r3  = 00000000
> >   r4  = 00000000    r5  = 00000000    r6  = 00000000    r7  = 00000000
> >   r8  = 00000000    r9  = 00000000    r10 = 00000000    r11 = 00000000
> >   r12 = 00000000    r13 = 00000000    r14 = 00000000
> >   spu = 009E3200    spi = 009E4200    acc = 00000000:00000000
> > Mon2000>.
> > (gdb) quit
> > The program is running.  Exit anyway? (y or n)
> > 
> > --end
> > 
> 
> Before issuing the "target" command, please use
> 
> set debug remote 2
> set debug monitor on
> 
> so we can see what the monitor is sending as the PC.
> 
> Alternatively, run gdb under gdb (use -nw as arguments for both) and
> set a breakpoint:
> 
> break m32r_supply_register 
> 
> and lets see what gdb is getting as a PC from the monitor.
> 
> 
> 
> > Now I am wondering if I have a different version of the
> > mon2000 monitor from what cygnus used to develop the
> > code for the toolset.  But when I read throught the
> > libgloss code, it says msa2000 in the comments. Hmmm.
> > 
> 
> It is possible that something different is being sent and GDB is
> not expecting.  If this is true you'll have to modify GDB to match
> your board monitor.
> 
> 
> > Below is the output with the version of the monitor and
> > system captured from the terminal emulator.
> > 
> 
> I wouldn't know anything about versions of these.  I never seen one
> of these boards.
> 
> Would anyone else know?
> 
> 
> > Noah.
> > 
> > MSA2000G01(M32R/D_2MB version)monitor program
> > Mon2000 Ver1.00b for FORTH programming system
> > Copyright 1997, MITSUBISHI ELECTRIC CORPORATION.
> > and MITSUBISHI ELECTRIC SEMICONDUCTOR SOFTWARE CORPORATION.
> > All Rights Reserved.
> > Mon2000> help
> >         ***** CLIENT PROGRAM DEBUGGING COMMAND *****
> > 
> >         TO               [data] TO %reg_name
> >             reg_name = R[0-14],SPU,SPI,PC,BPC,PSW,ACCH,ACCL
> >         .REGISTERS       .REGISTERS
> >         DUMP             [start_address] [byte_count] DUMP
> >         MOVE             [src_address] [dest_address] [count] MOVE
> >         MOVEH            [src_address] [dest_address] [count] MOVEH
> >         MOVEW            [src_address] [dest_address] [count] MOVEW
> >         FILL             [start_address] [count] [data] FILL
> >         FILLH            [start_address] [count] [data] FILLH
> >         FILLW            [start_address] [count] [data] FILLW
> >         GO               GO
> >         STEP             STEP
> >         STEPS            [count] STEPS
> >         DIS              [address] DIS
> >         +DIS             +DIS
> >         .BP              .BP
> >         +BP              [address] +BP
> >         -BP              [address] -BP
> >         BPOFF            BPOFF
> >         TILL             [address] TILL
> >         MB               [address] MB
> >         MH               [address] MH
> >         MW               [address] MW
> >         UL               UL[filename]
> >         UP               UP[path_name]
> >         UHIP             UHIP [sever_IPaddress]
> >         ULIP             ULIP [borad_IPaddress]
> >         UST              UST
> >         PING             PING [IPaddress]
> > Mon2000>
> > 
> > On 9 Jan 2001, at 21:30, Fernando Nasser wrote:
> > 
> > > Just to get a clearer error message, use GDB in command mode:
> > >
> > > gdb -x -nw <your program>
> > > ...
> > > (gdb) set remotebaud 9600
> > > (gdb) target mon2000 /dev/com1
> > >
> > > I don't know much about the mon2000 target.  If it has a log
> > > facility you may try setting it on.
> > >
> > > Fernando
> > >
> > >
> > >
> > >
> > > Noah Aklilu wrote:
> > > >
> > > > Hi
> > > >         I trying to get gdb (really insight 5.0)
> > > > to talk to a Mitusbishi MSA2000G01 (the m32r
> > > > evaluation board).  I switched the board to monitor/
> > > > self-debugging mode (instead of the default db32r ethernet
> > > > mode) and  get the Mon2000> prompt
> > > > using a terminal emulator.  When I tell gdb to
> > > > connect to the same com port using mon2000 as the
> > > > target (target mon2000 /dev/com1) it comes back with the error
> > > > listed below.
> > > >         I tried other target modes such as target m32r /dev/com1
> > > > but it simply times out.  I am running gdb/insight under cygwin
> > > > 1.1.7 on an NT 4 host (and compiled it there as well).  Any
> > > > comments/tips will be appreciated.
> > > >
> > > > Noah.
> > > >
> > > > -- start here
> > > > monitor_supply_register (21):  bad value from monitor: 7FFFFFF0
> > > > psw =
> > > > 000000C0 (BSM=0, BIE=0,
> > > > BC=0, SM=1, IE=1, C=0)
> > > >  bpc = 00000000
> > > >  r0  = 00000000    r1  = 00000000    r2  = 00000000    r3  = 00000000
> > > >  r4  = 00000000    r5  = 00000000    r6  = 00000000    r7  = 00000000
> > > >  r8  = 00000000    r9  = 00000000    r10 = 00000000    r11 = 00000000
> > > >  r12 = 00000000    r13 = 00000000    r14 = 00000000
> > > >  spu = 009E3200    spi = 009E4200    acc = 00000000:00000000
> > > > >.
> > > >
> > > >     while executing
> > > > "gdb_cmd "set remotebaud $baud""
> > > >     (object "::.targetselection0.targetselection" method
> > > > "::TargetSelection::change_baud" body line 4)
> > > >     invoked from within
> > > > "::.targetselection0.targetselection change_baud
> > > > .targetselection0.targetselection.f.lab.lf.childsite.cb 9600"
> > > >     (in namespace inscope "::TargetSelection" script line 1)
> > > >     invoked from within
> > > > "namespace inscope ::TargetSelection
> > > > {::.targetselection0.targetselection
> > > > change_baud}
> > > > .targetselection0.targetselection.f.lab.lf.childsite.cb 9600"
> > > >     ("after" script)errorCode is NONE
> > > > --end here
> > > >
> > > > ------------------------------------------
> > > > Noah Aklilu
> > > > http://www.ee.ualberta.ca/~aklilu/
> > > > naklilu@ualberta.ca
> > >
> > > --
> > > Fernando Nasser
> > > Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
> > > 2323 Yonge Street, Suite #300
> > > Toronto, Ontario   M4P 2C9
> > 
> > ------------------------------------------
> > Noah Aklilu
> > http://www.ee.ualberta.ca/~aklilu/
> > naklilu@ualberta.ca
> 
> -- 
> Fernando Nasser
> Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
> 2323 Yonge Street, Suite #300
> Toronto, Ontario   M4P 2C9



------------------------------------------
Noah Aklilu
http://www.ee.ualberta.ca/~aklilu/
naklilu@ualberta.ca

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]