OpenCores
URL https://opencores.org/ocsvn/openmsp430/openmsp430/trunk

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [tools/] [bin/] [openmsp430-gdbproxy.tcl] - Diff between revs 87 and 110

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 87 Rev 110
Line 27... Line 27...
# 
# 
# Author(s):
# Author(s):
#             - Olivier Girard,    olgirard@gmail.com
#             - Olivier Girard,    olgirard@gmail.com
#
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# $Rev: 87 $
# $Rev: 110 $
# $LastChangedBy: olivier.girard $
# $LastChangedBy: olivier.girard $
# $LastChangedDate: 2011-02-05 14:40:22 +0100 (Sat, 05 Feb 2011) $
# $LastChangedDate: 2011-05-19 22:33:51 +0200 (Thu, 19 May 2011) $
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
 
 
global serial_baudrate
global serial_baudrate
global serial_device
global serial_device
global serial_status
global serial_status
global hw_break
global hw_break
global clients
global clients
global server
global server
global verbose
global verbose
global shell
global shell
 
global omsp_info
 
 
# Initializations
# Initializations
set serial_status 0
set serial_status 0
 
 
 
 
Line 156... Line 157...
        }
        }
        exit 1
        exit 1
    }
    }
 
 
    # Display info
    # Display info
 
    if {$omsp_info(alias)==""} {
    puts "INFO: Sucessfully connected with the openMSP430 target."
    puts "INFO: Sucessfully connected with the openMSP430 target."
 
    } else {
 
        puts "INFO: Sucessfully connected with the openMSP430 target ($omsp_info(alias))."
 
    }
    set sizes [GetCPU_ID_SIZE]
    set sizes [GetCPU_ID_SIZE]
    puts "INFO: Program Memory Size - [lindex $sizes 0] B"
    if {$omsp_info(asic)} {
    puts "INFO: Data Memory Size - [lindex $sizes 1] B"
        puts "INFO: CPU Version              - $omsp_info(cpu_ver) / ASIC"
 
    } else {
 
        puts "INFO: CPU Version              - $omsp_info(cpu_ver) / FPGA"
 
    }
 
    puts "INFO: User Version             - $omsp_info(user_ver)"
 
    if {$omsp_info(cpu_ver)==1} {
 
        puts "INFO: Hardware Multiplier      - --"
 
    } elseif {$omsp_info(mpy)} {
 
        puts "INFO: Hardware Multiplier      - Yes"
 
    } else {
 
        puts "INFO: Hardware Multiplier      - No"
 
    }
 
    puts "INFO: Program Memory Size      - $omsp_info(pmem_size) B"
 
    puts "INFO: Data Memory Size         - $omsp_info(dmem_size) B"
 
    puts "INFO: Peripheral Address Space - $omsp_info(per_size) B"
    puts "INFO: $hw_break(num) Hardware Brea/Watch-point unit(s) detected"
    puts "INFO: $hw_break(num) Hardware Brea/Watch-point unit(s) detected"
    puts ""
    puts ""
 
 
    # Reset & Stop CPU
    # Reset & Stop CPU
    ExecutePOR_Halt
    ExecutePOR_Halt
Line 186... Line 205...
####################################
####################################
 
 
wm title    . "openMSP430 GDB Proxy"
wm title    . "openMSP430 GDB Proxy"
wm iconname . "openMSP430 GDB Proxy"
wm iconname . "openMSP430 GDB Proxy"
 
 
# Create the Main Menu budget
# Create the Main Menu frame
frame  .menu
frame  .menu
pack   .menu   -side top -padx 10 -pady 10 -fill x
pack   .menu   -side top -padx 10 -pady 10 -fill x
 
 
# Create the Serial port Menu budget
# Create the Connection frame
frame  .serial
frame  .connect -bd 2 -relief ridge    ;# solid
pack   .serial -side top -padx 10 -pady 10 -fill x
pack   .connect -side top -padx 10 -pady {5 0} -fill x
 
 
# Create the Server Menu budget
# Create the Info frame
frame  .server
frame  .info    -bd 2 -relief ridge    ;# solid
pack   .server -side top -padx 10 -pady 10 -fill x
pack   .info    -side top -padx 10 -pady {10 0} -fill x
 
 
 
# Create the Server frame
 
frame  .server -bd 2 -relief ridge    ;# solid
 
pack   .server -side top -padx 10 -pady {10 0} -fill x
 
 
# Create the TCL script field
# Create the TCL script field
frame  .tclscript
frame  .tclscript -bd 2 -relief ridge    ;# solid
pack   .tclscript -side top -padx 10 -pady 10 -fill x
pack   .tclscript -side top -padx 10 -pady 10 -fill x
 
 
 
 
####################################
####################################
#  CREATE THE REST                 #
#  CREATE THE REST                 #
Line 211... Line 234...
 
 
# Exit button
# Exit button
button .menu.exit -text "Exit" -command {stopServer; exit 0}
button .menu.exit -text "Exit" -command {stopServer; exit 0}
pack   .menu.exit -side left
pack   .menu.exit -side left
 
 
 
# openMSP430 label
 
label  .menu.omsp      -text "openMSP430 GDB proxy" -anchor center -fg "\#6a5acd" -font {-weight bold -size 14}
 
pack   .menu.omsp      -side right -padx 20
 
 
 
# Create the Configuration, Start & Info frames
 
frame  .connect.config
 
pack   .connect.config -side left   -padx 10 -pady 0 -fill x -expand true
 
frame  .connect.start
 
pack   .connect.start  -side right  -padx 10 -pady 0 -fill x -expand true
 
 
# Serial Port fields
# Serial Port fields
label  .serial.l1      -text "Serial Port:"  -anchor w
 
pack   .serial.l1      -side left
 
set serial_device      [lindex [dbg_list_uart] end]
set serial_device      [lindex [dbg_list_uart] end]
combobox .serial.p1    -textvariable serial_device -editable true
frame    .connect.config.serial_port
eval     .serial.p1    list insert end [dbg_list_uart]
pack     .connect.config.serial_port     -side top   -padx 5 -pady {10 0} -fill x
pack   .serial.p1      -side left -padx 5
label    .connect.config.serial_port.l1  -text "Serial Port:"  -anchor w
label  .serial.l2      -text "  Baudrate:" -anchor w
pack     .connect.config.serial_port.l1  -side left  -padx 5
pack   .serial.l2      -side left
combobox .connect.config.serial_port.p1  -textvariable serial_device -editable true -width 20
 
eval     .connect.config.serial_port.p1  list insert end [dbg_list_uart]
 
pack     .connect.config.serial_port.p1  -side right -padx 20
 
 
 
# Serial Baudrate fields
set serial_baudrate    115200
set serial_baudrate    115200
combobox .serial.p2    -textvariable serial_baudrate -editable true
frame    .connect.config.serial_baudrate
eval     .serial.p2    list insert end [list    9600   19200  38400  57600 115200 \
pack     .connect.config.serial_baudrate     -side top  -padx 5 -pady {5 0} -fill x
 
label    .connect.config.serial_baudrate.l2  -text "  Baudrate:" -anchor w
 
pack     .connect.config.serial_baudrate.l2  -side left
 
combobox .connect.config.serial_baudrate.p2  -textvariable serial_baudrate -editable true -width 20
 
eval     .connect.config.serial_baudrate.p2  list insert end [list    9600   19200  38400  57600 115200 \
                                              230400  460800 500000 576000 921600 \
                                              230400  460800 500000 576000 921600 \
                                             1000000 1152000]
                                             1000000 1152000]
pack   .serial.p2      -side left -padx 5
pack     .connect.config.serial_baudrate.p2  -side right -padx 20
label  .serial.l3      -text "Disconnected" -anchor w -fg Red
 
pack   .serial.l3      -side left -padx 10
 
 
 
 
 
# Server Port field
# Server Port field
frame  .server.port
frame    .connect.config.server_port
pack   .server.port    -side top -fill x
pack     .connect.config.server_port    -side top   -padx 10 -pady {15 10} -fill x
label  .server.port.l1 -text "Proxy Server Port:" -anchor w
label    .connect.config.server_port.l1 -text "Proxy Server Port:" -anchor w
pack   .server.port.l1 -side left
pack     .connect.config.server_port.l1 -side left
entry  .server.port.p  -textvariable server(port) -relief sunken
entry    .connect.config.server_port.p  -textvariable server(port) -relief sunken -width 20
pack   .server.port.p  -side left -padx 5
pack     .connect.config.server_port.p  -side right -padx 5 -padx 20
label  .server.port.l2 -text "Not running" -anchor w -fg Red
 
pack   .server.port.l2 -side left -padx 10
 
button .server.port.start -text "Start Proxy Server" -command {startServerGUI}
# Connect to CPU & start proxy server
pack   .server.port.start -side right
button .connect.start.but -text "Connect to CPU\n and \nStart Proxy Server" -command {startServerGUI}
 
pack   .connect.start.but -side right -padx 30
 
 
 
 
 
# CPU Info
 
frame  .info.cpu
 
pack   .info.cpu      -side top   -padx 10 -pady {5 0} -fill x
 
label  .info.cpu.l    -text "CPU Info:"       -anchor w
 
pack   .info.cpu.l    -side left -padx {10 10}
 
label  .info.cpu.con  -text "Disconnected"    -anchor w -fg Red
 
pack   .info.cpu.con  -side left
 
button .info.cpu.more -text "More..."         -width 9 -command {displayMore} -state disabled
 
pack   .info.cpu.more -side right -padx {0 30}
 
 
 
 
 
# Server Info
 
frame  .info.server
 
pack   .info.server     -side top   -padx 10 -pady {0 10} -fill x
 
label  .info.server.l   -text "Server Info:"       -anchor w
 
pack   .info.server.l   -side left -padx {10 10}
 
label  .info.server.con -text "Not running"    -anchor w -fg Red
 
pack   .info.server.con -side left
 
 
 
 
# Create the text widget to log received messages
# Create the text widget to log received messages
frame  .server.t
frame  .server.t
pack   .server.t     -side top -padx 10 -pady 10 -fill x
pack   .server.t     -side top -padx 10 -pady 10 -fill x
set server(log) [text   .server.t.log -width 80 -height 10 -borderwidth 2  \
set server(log) [text   .server.t.log -width 80 -height 15 -borderwidth 2  \
                          -setgrid true -yscrollcommand {.server.t.scroll set}]
                          -setgrid true -yscrollcommand {.server.t.scroll set}]
pack   .server.t.log -side left  -fill both -expand true
pack   .server.t.log -side left  -fill both -expand true
scrollbar .server.t.scroll -command {.server.t.log yview}
scrollbar .server.t.scroll -command {.server.t.log yview}
pack   .server.t.scroll -side right -fill both
pack   .server.t.scroll -side right -fill both
 
 
 
 
# Log commands
# Log commands
frame  .server.cmd
frame  .server.cmd
pack   .server.cmd   -side top -fill x
pack   .server.cmd   -side top  -pady {0 10} -fill x
button .server.cmd.clear -text "Clear log" -command {$server(log) delete 1.0 end}
button .server.cmd.clear -text "Clear log" -command {$server(log) delete 1.0 end}
pack   .server.cmd.clear -side left -padx 10
pack   .server.cmd.clear -side left -padx 10
checkbutton .server.cmd.verbose -text "Verbose" -variable verbose
checkbutton .server.cmd.verbose -text "Verbose" -variable verbose
pack   .server.cmd.verbose -side right -padx 10
pack   .server.cmd.verbose -side right -padx 10
 
 
 
 
# Load TCL script fields
# Load TCL script fields
frame  .tclscript.ft
frame  .tclscript.ft
pack   .tclscript.ft        -side top -fill x
pack   .tclscript.ft        -side top  -padx 10  -pady 10 -fill x
label  .tclscript.ft.l      -text "TCL script:" -state disabled
label  .tclscript.ft.l      -text "TCL script:" -state disabled
pack   .tclscript.ft.l      -side left -padx "0 10"
pack   .tclscript.ft.l      -side left -padx "0 10"
entry  .tclscript.ft.file   -width 58 -relief sunken -textvariable tcl_file_name -state disabled
entry  .tclscript.ft.file   -width 58 -relief sunken -textvariable tcl_file_name -state disabled
pack   .tclscript.ft.file   -side left -padx 10
pack   .tclscript.ft.file   -side left -padx 10
button .tclscript.ft.browse -text "Browse" -state disabled -command {set tcl_file_name [tk_getOpenFile -filetypes {{{TCL Files} {.tcl}} {{All Files} *}}]}
button .tclscript.ft.browse -text "Browse" -state disabled -command {set tcl_file_name [tk_getOpenFile -filetypes {{{TCL Files} {.tcl}} {{All Files} *}}]}
pack   .tclscript.ft.browse -side left -padx 5
pack   .tclscript.ft.browse -side left -padx 5
frame  .tclscript.fb
frame  .tclscript.fb
pack   .tclscript.fb        -side top -fill x
pack   .tclscript.fb        -side top -fill x
button .tclscript.fb.read   -text "Source TCL script !" -state disabled -command {if {[file exists $tcl_file_name]} {source $tcl_file_name}}
button .tclscript.fb.read   -text "Source TCL script !" -state disabled -command {if {[file exists $tcl_file_name]} {source $tcl_file_name}}
pack   .tclscript.fb.read   -side left -padx 5 -fill x
pack   .tclscript.fb.read   -side left -padx 20  -pady {0 10} -fill x
 
 
 
wm resizable . 0 0
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.