URL
https://opencores.org/ocsvn/openmsp430/openmsp430/trunk
Subversion Repositories openmsp430
Compare Revisions
- This comparison shows the changes necessary to convert path
/openmsp430/trunk/tools/openmsp430-gdbproxy
- from Rev 87 to Rev 110
- ↔ Reverse comparison
Rev 87 → Rev 110
/server.tcl
93,22 → 93,42
proc startServerGUI { } { |
global serial_device |
global hw_break |
global omsp_info |
|
# Connect to device |
if {![GetDevice]} { |
.serial.l3 configure -text "Connection problem" -fg red |
.info.cpu.con configure -text "Connection problem" -fg red |
putsLog "ERROR: Could not open $serial_device" |
return 0 |
} |
.serial.l3 configure -text "Connected" -fg green |
|
if {$omsp_info(alias)==""} { |
.info.cpu.con configure -text "Connected" -fg "\#00ae00" |
} else { |
.info.cpu.con configure -text "Connected to $omsp_info(alias)" -fg "\#00ae00" |
} |
|
# Display info |
putsLog "INFO: Sucessfully connected with the openMSP430 target." |
set sizes [GetCPU_ID_SIZE] |
putsLog "INFO: ROM Size - [lindex $sizes 0] B" |
putsLog "INFO: RAM Size - [lindex $sizes 1] B" |
putsLog "INFO: $hw_break(num) Hardware Break/Watch-point unit(s) detected" |
putsLog " " |
if {$omsp_info(asic)} { |
putsLog "INFO: CPU Version - $omsp_info(cpu_ver) / ASIC" |
} else { |
putsLog "INFO: CPU Version - $omsp_info(cpu_ver) / FPGA" |
} |
putsLog "INFO: User Version - $omsp_info(user_ver)" |
if {$omsp_info(cpu_ver)==1} { |
putsLog "INFO: Hardware Multiplier - --" |
} elseif {$omsp_info(mpy)} { |
putsLog "INFO: Hardware Multiplier - Yes" |
} else { |
putsLog "INFO: Hardware Multiplier - No" |
} |
putsLog "INFO: Program Memory Size - $omsp_info(pmem_size) B" |
putsLog "INFO: Data Memory Size - $omsp_info(dmem_size) B" |
putsLog "INFO: Peripheral Address Space - $omsp_info(per_size) B" |
putsLog "INFO: $hw_break(num) Hardware Brea/Watch-point unit(s) detected" |
putsLog "" |
|
# Activate Load TCL script section |
.tclscript.ft.l configure -state normal |
116,21 → 136,24
.tclscript.ft.browse configure -state normal |
.tclscript.fb.read configure -state normal |
|
# Activate extra cpu info button |
.info.cpu.more configure -state normal |
|
# Reset & Stop CPU |
ExecutePOR_Halt |
|
# Start server for GDB |
if {![startServer]} { |
.server.port.l2 configure -text "Connection problem" -fg red |
.info.server.con configure -text "Connection problem" -fg red |
return 0 |
} |
.server.port.l2 configure -text "Running" -fg green |
.info.server.con configure -text "Running" -fg "\#00ae00" |
|
# Disable gui entries |
.serial.p1 configure -state disabled |
.serial.p2 configure -state disabled |
.server.port.p configure -state disabled |
.server.port.start configure -state disabled |
.connect.config.serial_port.p1 configure -state disabled |
.connect.config.serial_baudrate.p2 configure -state disabled |
.connect.config.server_port.p configure -state disabled |
.connect.start.but configure -state disabled |
} |
|
############################################################################### |
292,3 → 315,91
proc putDebugChar {sock char} { |
puts -nonewline $sock $char |
} |
|
############################################################################### |
# # |
# GUI: DISPLAY EXTRA INFO # |
# # |
############################################################################### |
|
proc displayMore { } { |
|
global omsp_info |
|
# Destroy windows if already existing |
if {[lsearch -exact [winfo children .] .omsp_extra_info]!=-1} { |
destroy .omsp_extra_info |
} |
|
# Create master window |
toplevel .omsp_extra_info |
wm title .omsp_extra_info "openMSP430 extra info" |
wm geometry .omsp_extra_info +380+200 |
wm resizable .omsp_extra_info 0 0 |
|
# Title |
set title "openMSP430" |
if {$omsp_info(alias)!=""} { |
set title $omsp_info(alias) |
} |
label .omsp_extra_info.title -text "$title" -anchor center -fg "\#00ae00" -font {-weight bold -size 16} |
pack .omsp_extra_info.title -side top -padx {20 20} -pady {20 10} |
|
# Add extra info |
frame .omsp_extra_info.extra |
pack .omsp_extra_info.extra -side top -padx 10 -pady {10 10} |
scrollbar .omsp_extra_info.extra.yscroll -orient vertical -command {.omsp_extra_info.extra.text yview} |
pack .omsp_extra_info.extra.yscroll -side right -fill both |
text .omsp_extra_info.extra.text -wrap word -height 20 -font TkFixedFont -yscrollcommand {.omsp_extra_info.extra.yscroll set} |
pack .omsp_extra_info.extra.text -side right |
|
# Create OK button |
button .omsp_extra_info.okay -text "OK" -font {-weight bold} -command {destroy .omsp_extra_info} |
pack .omsp_extra_info.okay -side bottom -expand true -fill x -padx 5 -pady {0 10} |
|
|
# Fill the text widget will configuration info |
.omsp_extra_info.extra.text tag configure bold -font {-family TkFixedFont -weight bold} |
.omsp_extra_info.extra.text insert end "Configuration\n\n" bold |
.omsp_extra_info.extra.text insert end [format "CPU Version : %5s\n" $omsp_info(cpu_ver)] |
.omsp_extra_info.extra.text insert end [format "User Version : %5s\n" $omsp_info(user_ver)] |
if {$omsp_info(cpu_ver)==1} { |
.omsp_extra_info.extra.text insert end [format "Implementation : %5s\n" --] |
} elseif {$omsp_info(asic)==0} { |
.omsp_extra_info.extra.text insert end [format "Implementation : %5s\n" FPGA] |
} elseif {$omsp_info(asic)==1} { |
.omsp_extra_info.extra.text insert end [format "Implementation : %5s\n" ASIC] |
} |
if {$omsp_info(mpy)==1} { |
.omsp_extra_info.extra.text insert end [format "Hardware Multiplier support: %5s\n" Yes] |
} elseif {$omsp_info(mpy)==0} { |
.omsp_extra_info.extra.text insert end [format "Hardware Multiplier support: %5s\n" No] |
} else { |
.omsp_extra_info.extra.text insert end [format "Hardware Multiplier support: %5s\n" --] |
} |
.omsp_extra_info.extra.text insert end [format "Program memory size : %5s B\n" $omsp_info(pmem_size)] |
.omsp_extra_info.extra.text insert end [format "Data memory size : %5s B\n" $omsp_info(dmem_size)] |
.omsp_extra_info.extra.text insert end [format "Peripheral address space : %5s B\n" $omsp_info(per_size)] |
if {$omsp_info(alias)==""} { |
.omsp_extra_info.extra.text insert end [format "Alias : %5s\n\n\n" None] |
} else { |
.omsp_extra_info.extra.text insert end [format "Alias : %5s\n\n\n" $omsp_info(alias)] |
} |
|
.omsp_extra_info.extra.text insert end "Extra Info\n\n" bold |
|
if {$omsp_info(alias)!=""} { |
|
set aliasEXTRA [lsort -increasing [array names omsp_info -glob "extra,*"]] |
if {[llength $aliasEXTRA]} { |
|
foreach currentEXTRA $aliasEXTRA { |
regexp {^.+,.+,(.+)$} $currentEXTRA whole_match extraATTR |
.omsp_extra_info.extra.text insert end [format "%-15s: %s\n" $extraATTR $omsp_info($currentEXTRA)] |
} |
.omsp_extra_info.extra.text insert end "\n\n" |
} |
} else { |
.omsp_extra_info.extra.text insert end "No alias found in 'omsp_alias.xml' file" |
} |
} |