This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

2:Insight not knowing about execuded gdb.ini commands!


Sorry, there are no screenshots allowed in the mails. Therefore the first mail is not really understandable. Here a second try.

Hi everyone,

I am programming a NetSilicon ARM7 processor using Microcross Visual
X-Tools 2.2 which include
cygwin 1.2, gcc 2.95.x, Insight/gdbtk 4.18i, OCDLibRemote for
Macraigor-Raven JTAG.

I know that the toolchain is quite old, but for the moment I am bound to it.
Actually these issues are mainly about convenience.

1)
If I start gdbtk without passing the gdb.ini file as command line
argument I will have to click a bunch of button once gdbtk is up
( connecting to the remote server via TCP, loading the gdb.ini file
manually, downloading the programm) to get ready to debug.
If I pass the gdb.ini file as command line argument, I am able to make
gdbtk to connect and download automatically. gdbtk then is ready to debug.
Once I want to restart (run button), gdbtk opens the connect dialog,
probably because the GUI did not recognize that we are connected already.

How can I make gdbtk realize what is executed in the gdb.ini file
(please see the script files at the end of the email)?


2) In the gdb.ini file I change the read write packet sizes in order to speed up download, which actually works fine, if where was not this warning window I have to confirm all the time. I tried several different packet sizes.

Warning window message:
<
This target my not be able to correctly handle a memory-write-packet-size of 1024 bytes. Change the packet size?
Yes /No?
>


Has anyone an idea how get rid of that?

3) The run button in gdbtk does not work, even though I connected
manually to the remote server (not the same problem as 1) ). So I tried
the console within gdbtk
 and typed the run command and got the following result.

Console window:
<
Breakpoint 1, BootSytemUp() at ./../../Global/Bootc:206
(netsilicon-gdb) run
Starting program: /cygdrive/d/Daten/MicrocrossARM7/APP_TrxIface/C_Prj/Global/TrxIface32b/image.elf
>



Warning window message: < The program being debugged has been started already. Start it from the beginning? Yes /No ? >

After pressing Yes..

Console window:
<
Error You can't do that without a process to debug.

(netSilicon-gdb)
>



So how does gdb(tk) know what to run the first time and when I try to
restart it after breaking somewhere in the code it does not?
I assume that the none working RUN-button in the GUI and the error
message in the console have the same cause.

How to fix this?


All the button clicking in issue 1) was not that bad, if had not to quit and restart gdbtk everytime I need to start the program debugged from the beginning.


I would appreciate some hints on that issues. Thanks!!



Regards


Roman



gdb.ini file:
--------------

echo Setting up the environment for debugging gdb.\n

set complaints 1
set output-radix 16
set input-radix 16
set endian big
dir .
set prompt (netsilicon-gdb)

# This connects to a target via netsiliconLibRemote
# listening for commands on this PC's tcp port 8888
#target remote localhost:8888

# Set netSiliconLibRemote to write short/long values
# in big-endian
monitor endian big

# Set GDB in big-endian
set endian big

# Reset the chip to get to a known state.
monitor reset
monitor halt

# NET50 INITIALIZATION VALUES
monitor long 0xffb00000 = 0x4004a000
monitor long 0xffb00000 = 0x4004a000
monitor long 0xffc00000 = 0x0dc00000
monitor long 0xffb00030 = 0x00000000
monitor long 0xffc00034 = 0x00000000
monitor long 0xffc00010 = 0x0
monitor long 0xffc00020 = 0x0

# 16MB RAM
#monitor long 0xffc00024 = 0xf3000070

# 8MB RAM
monitor long 0xffc00024 = 0xf3800070

monitor long 0xffc00020 = 0x0000022d
monitor long 0xffc00028 = 0x00000001
monitor long 0xffc00014 = 0xf3000574
monitor long 0xffc00018 = 0x00000005
monitor long 0xffb00020 = 0xefe00000

# Set Registers to known value
set $r0 = 0
set $r1 = 0
set $r2 = 0
set $r3 = 0
set $r4 = 0
set $r5 = 0
set $r6 = 0
set $r7 = 0
set $r8 = 0
set $r9 = 0
set $r10 = 0
set $r11 = 0
set $r12 = 0
set $sp = 0x80000
set $lr = 0
set $pc = 0
set $cpsr = 0xd3
set $r13 = 0
set $r14 = 0
set $r15 = 0


# Setup GDB FOR FASTER DOWNLOADS #set remote memory-read-packet-size 1024 #set remote memory-read-packet-size fixed set remote memory-write-packet-size 1024 set remote memory-write-packet-size fixed

# Load the program executable called "image.elf"
#load image.elf
# Load the symbols for the program.


file: start script with gdb.ini as command line argument ---------------------------------------------------------

#!/bin/bash


bash -c "D:/Daten/MicrocrossARM7/NETOS51_GNU/bin/netSiliconLibRemote.exe &";


bash -c "arm-elf-gdbtk -x ../../../../HAL_TRXIFACE/dbg/gdb-TrxIface-tk.ini -se image.elf";


file: start script without gdb.ini as command line argument --------------------------------------------------------------

#!/bin/bash


bash -c "arm-elf-gdbtk -se image.elf &";


bash -c "D:/Daten/MicrocrossARM7/NETOS51_GNU/bin/netSiliconLibRemote.exe";


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