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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [tools/] [bin/] [openmsp430-gdbproxy.tcl] - Blame information for rev 198

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 olivier.gi
#!/usr/bin/tclsh
2
#------------------------------------------------------------------------------
3
# Copyright (C) 2001 Authors
4
#
5
# This source file may be used and distributed without restriction provided
6
# that this copyright statement is not removed from the file and that any
7
# derivative work contains the original copyright notice and the associated
8
# disclaimer.
9
#
10
# This source file is free software; you can redistribute it and/or modify
11
# it under the terms of the GNU Lesser General Public License as published
12
# by the Free Software Foundation; either version 2.1 of the License, or
13
# (at your option) any later version.
14
#
15
# This source is distributed in the hope that it will be useful, but WITHOUT
16
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18
# License for more details.
19
#
20
# You should have received a copy of the GNU Lesser General Public License
21
# along with this source; if not, write to the Free Software Foundation,
22
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23
#
24
#------------------------------------------------------------------------------
25
# 
26
# File Name: openmsp430-gdbproxy.tcl
27
# 
28 14 olivier.gi
# Author(s):
29
#             - Olivier Girard,    olgirard@gmail.com
30
#
31 2 olivier.gi
#------------------------------------------------------------------------------
32 14 olivier.gi
# $Rev: 198 $
33
# $LastChangedBy: olivier.girard $
34
# $LastChangedDate: 2014-10-07 21:30:05 +0200 (Tue, 07 Oct 2014) $
35
#------------------------------------------------------------------------------
36 2 olivier.gi
 
37
###############################################################################
38
#                                                                             #
39
#                            SOURCE LIBRARIES                                 #
40
#                                                                             #
41
###############################################################################
42
 
43
# Get library path
44
set current_file [info script]
45
if {[file type $current_file]=="link"} {
46
    set current_file [file readlink $current_file]
47
}
48
set lib_path [file dirname $current_file]/../lib/tcl-lib
49
 
50
# Source library
51
source $lib_path/dbg_functions.tcl
52 158 olivier.gi
source $lib_path/dbg_utils.tcl
53 2 olivier.gi
 
54
# Source remaining files
55
source [file dirname $current_file]/../openmsp430-gdbproxy/server.tcl
56
source [file dirname $current_file]/../openmsp430-gdbproxy/commands.tcl
57
 
58
 
59
###############################################################################
60
#                                                                             #
61 158 olivier.gi
#                            GLOBAL VARIABLES                                 #
62
#                                                                             #
63
###############################################################################
64
 
65
global omsp_conf
66
global omsp_info
67
 
68
global omsp_nr
69
 
70 172 olivier.gi
global mem_mapping
71
 
72 158 olivier.gi
global gui_dbg_if
73
global gui_adapter
74
global clients
75
global server
76
global verbose
77
global shell
78 172 olivier.gi
global breakSelect
79 198 olivier.gi
global mspgcc_compat_mode
80 158 olivier.gi
 
81
# Initialize to default values
82 172 olivier.gi
set omsp_nr                1
83 158 olivier.gi
set omsp_conf(interface)  uart_generic
84
set omsp_conf(device)     [lindex [utils::uart_port_list] end]
85
set omsp_conf(baudrate)   [lindex [GetAllowedSpeeds] 1]
86
set omsp_conf(0,cpuaddr)  50
87
set omsp_conf(1,cpuaddr)  51
88
set omsp_conf(2,cpuaddr)  52
89
set omsp_conf(3,cpuaddr)  53
90
 
91 172 olivier.gi
set server(0,port)      2000
92
set server(1,port)      2001
93
set server(2,port)      2002
94
set server(3,port)      2003
95 158 olivier.gi
 
96 172 olivier.gi
set mem_mapping(0)         0
97
set mem_mapping(1)         0
98
set mem_mapping(2)         0
99
set mem_mapping(3)         0
100 158 olivier.gi
 
101 172 olivier.gi
set breakSelect            0
102
 
103
set shell                  0
104
set verbose                0
105 198 olivier.gi
set mspgcc_compat_mode     0
106 172 olivier.gi
 
107 158 olivier.gi
###############################################################################
108
#                                                                             #
109 2 olivier.gi
#                            PARAMETER CHECK                                  #
110
#                                                                             #
111
###############################################################################
112
 
113
proc help {} {
114
    puts ""
115 158 olivier.gi
    puts "USAGE   : openmsp430-gdbproxy.tcl \[-device   <communication port>\]"
116
    puts "                                  \[-adaptor  <adaptor type>\]"
117
    puts "                                  \[-speed    <communication speed>\]"
118
    puts "                                  \[-i2c_addr <cpu address>\]"
119 2 olivier.gi
    puts "                                  \[-port     <server port>\]"
120
    puts "                                  \[-shell]"
121
    puts "                                  \[-verbose\]"
122 198 olivier.gi
    puts "                                  \[-mspgcc_compat_mode\]"
123 2 olivier.gi
    puts "                                  \[-help\]"
124
    puts ""
125 158 olivier.gi
    puts "Examples: openmsp430-gdbproxy.tcl -device /dev/ttyUSB0 -adaptor uart_generic -speed  115200  -port 2000"
126
    puts "          openmsp430-gdbproxy.tcl -device COM2:        -adaptor i2c_usb-iss  -speed  I2C_S_100KHZ -i2c_addr 75 -port 2000"
127 2 olivier.gi
    puts ""
128
}
129
 
130
# Parse arguments
131
for {set i 0} {$i < $argc} {incr i} {
132
    switch -exact -- [lindex $argv $i] {
133 198 olivier.gi
        -device             {set omsp_conf(device)    [lindex $argv [expr $i+1]]; incr i}
134
        -adaptor            {set omsp_conf(interface) [lindex $argv [expr $i+1]]; incr i}
135
        -speed              {set omsp_conf(baudrate)  [lindex $argv [expr $i+1]]; incr i}
136
        -i2c_addr           {set omsp_conf(0,cpuaddr) [lindex $argv [expr $i+1]]; incr i}
137
        -port               {set server(0,port)       [lindex $argv [expr $i+1]]; incr i}
138
        -shell              {set shell   1}
139
        -verbose            {set verbose 1}
140
        -mspgcc_compat_mode {set mspgcc_compat_mode 1}
141
        -h                  {help; exit 0}
142
        -help               {help; exit 0}
143
        default             {}
144 2 olivier.gi
    }
145
}
146
 
147 158 olivier.gi
# Make sure the selected adptor is valid
148
if {![string eq $omsp_conf(interface) "uart_generic"] &
149
    ![string eq $omsp_conf(interface) "i2c_usb-iss"]} {
150
    puts "\nERROR: Specified adaptor is not valid (should be \"uart_generic\" or \"i2c_usb-iss\")"
151
    help
152
    exit 1
153
}
154
 
155
# Make sure the I2C address is an integer
156
if {![string is integer $omsp_conf(0,cpuaddr)]} {
157
    puts "\nERROR: Specified I2C address is not an integer"
158
    help
159
    exit 1
160
}
161
 
162
# Make sure the I2C address is valid
163
if {($omsp_conf(0,cpuaddr)<8) | ($omsp_conf(0,cpuaddr)>119)} {
164
    puts "\nERROR: Specified I2C address should lay between 7 and 120"
165
    help
166
    exit 1
167
}
168
 
169
# If the selected interface is a UART, make sure the selected speed is an integer
170
if {[string eq $omsp_conf(interface) "uart_generic"]} {
171
    if {![string is integer $omsp_conf(baudrate)]} {
172
        puts "\nERROR: Specified UART communication speed is not an integer"
173
        help
174
        exit 1
175
    }
176
} elseif {[string eq $omsp_conf(interface) "i2c_usb-iss"]} {
177
    if {[lsearch [lindex [GetAllowedSpeeds] 2] $omsp_conf(baudrate)]==-1} {
178
        puts "\nERROR: Specified I2C communication speed is not valid."
179
        puts "         Allowed values are:"
180
        foreach allowedVal [lindex [GetAllowedSpeeds] 2] {
181
            puts "                              - $allowedVal"
182
        }
183
        puts ""
184
        exit 1
185
    }
186
}
187
 
188 2 olivier.gi
# Source additional library for graphical interface
189
if {!$shell} {
190
    source $lib_path/combobox.tcl
191
    package require combobox 2.3
192
    catch {namespace import combobox::*}
193
}
194
 
195
# Small functions to display messages
196
proc putsLog {string {nonewline 0}} {
197
    global server
198
    global shell
199
    if {$shell} {
200 158 olivier.gi
        if {$nonewline} {
201
            puts -nonewline $string
202
        } else {
203
            puts $string
204
        }
205 2 olivier.gi
    } else {
206 158 olivier.gi
        if {$nonewline} {
207
            $server(log) insert end "$string"
208
        } else {
209
            $server(log) insert end "$string\n"
210
        }
211
        $server(log) see end
212 2 olivier.gi
    }
213
}
214
proc putsVerbose {string} {
215
    global verbose
216
    if {$verbose} {
217 158 olivier.gi
        putsLog "$string"
218 2 olivier.gi
    }
219
}
220
 
221
###############################################################################
222
#                               SHELL MODE                                    #
223
###############################################################################
224
if {$shell} {
225
 
226
    # Connect to device
227 172 olivier.gi
    if {![GetDevice 0]} {
228 198 olivier.gi
        puts "ERROR: Could not open $omsp_conf(device)"
229 158 olivier.gi
        puts "INFO:  Available serial ports are:"
230
        foreach port [utils::uart_port_list] {
231
            puts "INFO:                               -  $port"
232
        }
233
        if {[string eq $omsp_conf(interface) "i2c_usb-iss"]} {
234
            puts "\nMake sure the specified I2C device address is correct: $omsp_conf(0,cpuaddr)\n"
235
        }
236
        exit 1
237 2 olivier.gi
    }
238
 
239
    # Display info
240 172 olivier.gi
    if {$omsp_info(0,alias)==""} {
241 158 olivier.gi
        puts "INFO: Sucessfully connected with the openMSP430 target."
242 110 olivier.gi
    } else {
243 172 olivier.gi
        puts "INFO: Sucessfully connected with the openMSP430 target ($omsp_info(0,alias))."
244 110 olivier.gi
    }
245 172 olivier.gi
    set sizes [GetCPU_ID_SIZE 0]
246
    if {$omsp_info(0,asic)} {
247
        puts "INFO: CPU Version              - $omsp_info(0,cpu_ver) / ASIC"
248 110 olivier.gi
    } else {
249 172 olivier.gi
        puts "INFO: CPU Version              - $omsp_info(0,cpu_ver) / FPGA"
250 110 olivier.gi
    }
251 172 olivier.gi
    puts "INFO: User Version             - $omsp_info(0,user_ver)"
252
    if {$omsp_info(0,cpu_ver)==1} {
253 158 olivier.gi
        puts "INFO: Hardware Multiplier      - --"
254 172 olivier.gi
    } elseif {$omsp_info(0,mpy)} {
255 158 olivier.gi
        puts "INFO: Hardware Multiplier      - Yes"
256 110 olivier.gi
    } else {
257 158 olivier.gi
        puts "INFO: Hardware Multiplier      - No"
258 110 olivier.gi
    }
259 172 olivier.gi
    puts "INFO: Program Memory Size      - $omsp_info(0,pmem_size) B"
260
    puts "INFO: Data Memory Size         - $omsp_info(0,dmem_size) B"
261
    puts "INFO: Peripheral Address Space - $omsp_info(0,per_size) B"
262
    puts "INFO: $omsp_info(0,hw_break) Hardware Brea/Watch-point unit(s) detected"
263 2 olivier.gi
    puts ""
264
 
265
    # Reset & Stop CPU
266 172 olivier.gi
    ExecutePOR_Halt 0
267 2 olivier.gi
 
268
    # Start server for GDB
269 172 olivier.gi
    if {![startServer 0]} {
270 158 olivier.gi
        exit 1
271 2 olivier.gi
    }
272
 
273
    vwait forever
274
}
275
 
276 158 olivier.gi
proc getConfiguration {} {
277 2 olivier.gi
 
278 158 olivier.gi
    global gui_dbg_if
279
    global gui_adapter
280
    global omsp_conf
281
 
282
    regexp {(.+)_(.+)} $omsp_conf(interface) whole_match tmp_if tmp_adapter
283
 
284
    set gui_dbg_if  [string toupper $tmp_if]
285
    set gui_adapter [string toupper $tmp_adapter]
286
 
287
    return 1
288
}
289
 
290
proc updateConfiguration {{w ""} {sel ""}} {
291
 
292
    global gui_dbg_if
293
    global gui_adapter
294
    global omsp_conf
295
    global omsp_nr
296
 
297
    if {$sel=="UART"} {
298 172 olivier.gi
        eval .connect.cfg.if.config2.adapter.p2 list delete 0 end
299
        eval .connect.cfg.if.config2.adapter.p2 list insert   end [list "GENERIC"]
300
        set gui_adapter "GENERIC"
301
        set omsp_conf(interface)  uart_generic
302 158 olivier.gi
 
303
    } elseif {$sel=="I2C"} {
304
 
305 172 olivier.gi
        eval .connect.cfg.if.config2.adapter.p2 list delete 0 end
306
        eval .connect.cfg.if.config2.adapter.p2 list insert   end [list "USB-ISS"]
307
        set gui_adapter "USB-ISS"
308
        set omsp_conf(interface)  i2c_usb-iss
309 158 olivier.gi
    }
310
 
311
    if {$gui_dbg_if=="UART"} {
312 172 olivier.gi
        set omsp_nr 1
313
        .connect.cfg.ad.i2c_nr.l        configure -state disabled
314
        .connect.cfg.ad.i2c_nr.s        configure -state disabled
315
        .connect.cfg.ad.i2c_addr.l      configure -state disabled
316
        .connect.cfg.ad.i2c_addr.s0     configure -state disabled
317
        .connect.cfg.ad.i2c_addr.s1     configure -state disabled
318
        .connect.cfg.ad.i2c_addr.s2     configure -state disabled
319
        .connect.cfg.ad.i2c_addr.s3     configure -state disabled
320
        .connect.cfg.ad.arrow.l0        configure -state disabled
321
        .connect.cfg.ad.arrow.l1        configure -state disabled
322
        .connect.cfg.ad.arrow.l2        configure -state disabled
323
        .connect.cfg.ad.arrow.l3        configure -state disabled
324
        .connect.cfg.ad.server_port.p0  configure -state normal
325
        .connect.cfg.ad.server_port.p1  configure -state disabled
326
        .connect.cfg.ad.server_port.p2  configure -state disabled
327
        .connect.cfg.ad.server_port.p3  configure -state disabled
328
        .connect.cfg.ad.core_nr.l0      configure -state disabled
329
        .connect.cfg.ad.core_nr.l1      configure -state disabled
330
        .connect.cfg.ad.core_nr.l2      configure -state disabled
331
        .connect.cfg.ad.core_nr.l3      configure -state disabled
332
        .connect.cfg.ad.i2c_nr.f.soft.b configure -state disabled
333
        if {[winfo exists .omsp_sft_brk]} {
334
            updateSoftBreakpoints
335
        }
336
 
337 158 olivier.gi
    } elseif {$gui_dbg_if=="I2C"} {
338 172 olivier.gi
        .connect.cfg.ad.core_nr.l0      configure -state normal
339
        .connect.cfg.ad.i2c_nr.l        configure -state normal
340
        .connect.cfg.ad.i2c_nr.s        configure -state normal
341
        .connect.cfg.ad.i2c_addr.l      configure -state normal
342
        .connect.cfg.ad.i2c_addr.s0     configure -state normal
343
        .connect.cfg.ad.arrow.l0        configure -state normal
344
        .connect.cfg.ad.server_port.p0  configure -state normal
345 158 olivier.gi
 
346 172 olivier.gi
        if {$omsp_nr < 2} {
347
            .connect.cfg.ad.core_nr.l1      configure -state disabled
348
            .connect.cfg.ad.server_port.p1  configure -state disabled
349
            .connect.cfg.ad.arrow.l1        configure -state disabled
350
            .connect.cfg.ad.i2c_addr.s1     configure -state disabled
351
            .connect.cfg.ad.i2c_nr.f.soft.b configure -state disabled
352
        } else            {
353
            .connect.cfg.ad.core_nr.l1      configure -state normal
354
            .connect.cfg.ad.server_port.p1  configure -state normal
355
            .connect.cfg.ad.arrow.l1        configure -state normal
356
            .connect.cfg.ad.i2c_addr.s1     configure -state normal
357
            .connect.cfg.ad.i2c_nr.f.soft.b configure -state normal
358
        }
359 158 olivier.gi
 
360 172 olivier.gi
        if {$omsp_nr < 3} {
361
            .connect.cfg.ad.core_nr.l2      configure -state disabled
362
            .connect.cfg.ad.server_port.p2  configure -state disabled
363
            .connect.cfg.ad.arrow.l2        configure -state disabled
364
            .connect.cfg.ad.i2c_addr.s2     configure -state disabled
365
        } else            {
366
            .connect.cfg.ad.core_nr.l2      configure -state normal
367
            .connect.cfg.ad.server_port.p2  configure -state normal
368
            .connect.cfg.ad.arrow.l2        configure -state normal
369
            .connect.cfg.ad.i2c_addr.s2     configure -state normal
370
        }
371 158 olivier.gi
 
372 172 olivier.gi
        if {$omsp_nr < 4} {
373
            .connect.cfg.ad.core_nr.l3      configure -state disabled
374
            .connect.cfg.ad.server_port.p3  configure -state disabled
375
            .connect.cfg.ad.arrow.l3        configure -state disabled
376
            .connect.cfg.ad.i2c_addr.s3     configure -state disabled
377
        } else            {
378
            .connect.cfg.ad.core_nr.l3      configure -state normal
379
            .connect.cfg.ad.server_port.p3  configure -state normal
380
            .connect.cfg.ad.arrow.l3        configure -state normal
381
            .connect.cfg.ad.i2c_addr.s3     configure -state normal
382
        }
383
        updateSoftBreakpoints
384 158 olivier.gi
    }
385
 
386
    .connect.cfg.if.config2.serial_port.p2 configure -editable  1
387
    eval .connect.cfg.if.config2.serial_port.p2  list delete 0 end
388
    eval .connect.cfg.if.config2.serial_port.p2  list insert   end [lindex [GetAllowedSpeeds] 2]
389
    set omsp_conf(baudrate) [lindex [GetAllowedSpeeds] 1];
390
    .connect.cfg.if.config2.serial_port.p2 configure -editable  [lindex [GetAllowedSpeeds] 0];
391
 
392
}
393
 
394 2 olivier.gi
###############################################################################
395
#                                 GUI MODE                                    #
396
###############################################################################
397
 
398
####################################
399
#   CREATE & PLACE MAIN WIDGETS    #
400
####################################
401
 
402
wm title    . "openMSP430 GDB Proxy"
403
wm iconname . "openMSP430 GDB Proxy"
404
 
405 110 olivier.gi
# Create the Main Menu frame
406 2 olivier.gi
frame  .menu
407
pack   .menu   -side top -padx 10 -pady 10 -fill x
408
 
409 110 olivier.gi
# Create the Connection frame
410
frame  .connect -bd 2 -relief ridge    ;# solid
411
pack   .connect -side top -padx 10 -pady {5 0} -fill x
412 2 olivier.gi
 
413 110 olivier.gi
# Create the Info frame
414
frame  .info    -bd 2 -relief ridge    ;# solid
415
pack   .info    -side top -padx 10 -pady {10 0} -fill x
416 2 olivier.gi
 
417 110 olivier.gi
# Create the Server frame
418
frame  .server -bd 2 -relief ridge    ;# solid
419
pack   .server -side top -padx 10 -pady {10 0} -fill x
420
 
421 87 olivier.gi
# Create the TCL script field
422 110 olivier.gi
frame  .tclscript -bd 2 -relief ridge    ;# solid
423 87 olivier.gi
pack   .tclscript -side top -padx 10 -pady 10 -fill x
424 2 olivier.gi
 
425 87 olivier.gi
 
426 2 olivier.gi
####################################
427
#  CREATE THE REST                 #
428
####################################
429
 
430
# Exit button
431 172 olivier.gi
button .menu.exit -text "Exit" -command {stopAllServers; exit 0}
432 2 olivier.gi
pack   .menu.exit -side left
433
 
434 110 olivier.gi
# openMSP430 label
435
label  .menu.omsp      -text "openMSP430 GDB proxy" -anchor center -fg "\#6a5acd" -font {-weight bold -size 14}
436
pack   .menu.omsp      -side right -padx 20
437 2 olivier.gi
 
438 110 olivier.gi
# Create the Configuration, Start & Info frames
439 158 olivier.gi
getConfiguration
440
frame  .connect.cfg
441
pack   .connect.cfg    -side left   -padx  0 -pady  0 -fill x -expand true
442
frame  .connect.cfg.if -bd 2 -relief ridge
443
pack   .connect.cfg.if -side top    -padx 10 -pady {10 0} -fill x -expand true
444
frame  .connect.cfg.ad -bd 2 -relief ridge
445
pack   .connect.cfg.ad -side top    -padx 10 -pady 10 -fill both -expand true
446 110 olivier.gi
frame  .connect.start
447 198 olivier.gi
pack   .connect.start  -side right  -padx 10 -pady 10 -fill both -expand true
448 110 olivier.gi
 
449 158 olivier.gi
frame  .connect.cfg.if.config1
450
pack   .connect.cfg.if.config1 -side left   -padx 0 -pady 0 -fill x -expand true
451
frame  .connect.cfg.if.config2
452
pack   .connect.cfg.if.config2 -side left   -padx 0 -pady 0 -fill x -expand true
453 110 olivier.gi
 
454 158 olivier.gi
# Interface & Adapter selection
455
frame    .connect.cfg.if.config1.adapter
456
pack     .connect.cfg.if.config1.adapter         -side top  -padx 5 -pady {10 0} -fill x
457
label    .connect.cfg.if.config1.adapter.l1      -text "Serial Debug Interface:" -anchor w
458
pack     .connect.cfg.if.config1.adapter.l1      -side left -padx 5
459
combobox .connect.cfg.if.config1.adapter.p1      -textvariable gui_dbg_if -editable false -width 15 -command {updateConfiguration}
460
eval     .connect.cfg.if.config1.adapter.p1      list insert end [list "UART" "I2C"]
461
pack     .connect.cfg.if.config1.adapter.p1      -side right -padx 10
462 2 olivier.gi
 
463 158 olivier.gi
frame    .connect.cfg.if.config2.adapter
464
pack     .connect.cfg.if.config2.adapter         -side top  -padx 5 -pady {10 0} -fill x
465
label    .connect.cfg.if.config2.adapter.l2      -text "Adapter selection:" -anchor w
466
pack     .connect.cfg.if.config2.adapter.l2      -side left -padx 5
467
combobox .connect.cfg.if.config2.adapter.p2      -textvariable gui_adapter -editable false -width 15
468
eval     .connect.cfg.if.config2.adapter.p2      list insert end [list "GENERIC"]
469
pack     .connect.cfg.if.config2.adapter.p2      -side right -padx 5
470 2 olivier.gi
 
471 158 olivier.gi
# Device port & Speed selection 
472
frame    .connect.cfg.if.config1.serial_port
473
pack     .connect.cfg.if.config1.serial_port     -side top   -padx 5 -pady {10 10} -fill x
474
label    .connect.cfg.if.config1.serial_port.l1  -text "Device Port:"  -anchor w
475
pack     .connect.cfg.if.config1.serial_port.l1  -side left  -padx 5
476
combobox .connect.cfg.if.config1.serial_port.p1  -textvariable omsp_conf(device) -editable true -width 15
477
eval     .connect.cfg.if.config1.serial_port.p1  list insert end [utils::uart_port_list]
478
pack     .connect.cfg.if.config1.serial_port.p1  -side right -padx 10
479 2 olivier.gi
 
480 158 olivier.gi
frame    .connect.cfg.if.config2.serial_port
481
pack     .connect.cfg.if.config2.serial_port     -side top   -padx 5 -pady {10 10} -fill x
482
label    .connect.cfg.if.config2.serial_port.l2  -text "Speed:" -anchor w
483
pack     .connect.cfg.if.config2.serial_port.l2  -side left  -padx 5
484
combobox .connect.cfg.if.config2.serial_port.p2  -textvariable omsp_conf(baudrate) -editable [lindex [GetAllowedSpeeds] 0] -width 15
485
eval     .connect.cfg.if.config2.serial_port.p2  list insert end [lindex [GetAllowedSpeeds] 2]
486
pack     .connect.cfg.if.config2.serial_port.p2  -side right -padx 5
487
 
488
# Server Port field & I2C address selection
489
frame    .connect.cfg.ad.core_nr
490 172 olivier.gi
pack     .connect.cfg.ad.core_nr     -side left -padx 5 -pady {0 20} -fill y
491 158 olivier.gi
label    .connect.cfg.ad.core_nr.l3  -text "Core 3:" -anchor w
492
pack     .connect.cfg.ad.core_nr.l3  -side bottom  -padx {25 0} -pady {10 10}
493
label    .connect.cfg.ad.core_nr.l2  -text "Core 2:" -anchor w
494
pack     .connect.cfg.ad.core_nr.l2  -side bottom  -padx {25 0} -pady {10 2}
495
label    .connect.cfg.ad.core_nr.l1  -text "Core 1:" -anchor w
496
pack     .connect.cfg.ad.core_nr.l1  -side bottom  -padx {25 0} -pady {10 2}
497
label    .connect.cfg.ad.core_nr.l0  -text "Core 0:" -anchor w
498
pack     .connect.cfg.ad.core_nr.l0  -side bottom  -padx {25 0} -pady {10 2}
499
 
500
frame    .connect.cfg.ad.server_port
501 172 olivier.gi
pack     .connect.cfg.ad.server_port    -side left -padx 5 -pady {0 20} -fill y
502
entry    .connect.cfg.ad.server_port.p3 -textvariable server(3,port) -relief sunken -width 10
503 158 olivier.gi
pack     .connect.cfg.ad.server_port.p3 -side bottom  -padx 5 -pady {10 10}
504 172 olivier.gi
entry    .connect.cfg.ad.server_port.p2 -textvariable server(2,port) -relief sunken -width 10
505 158 olivier.gi
pack     .connect.cfg.ad.server_port.p2 -side bottom  -padx 5 -pady {10 0}
506 172 olivier.gi
entry    .connect.cfg.ad.server_port.p1 -textvariable server(1,port) -relief sunken -width 10
507 158 olivier.gi
pack     .connect.cfg.ad.server_port.p1 -side bottom  -padx 5 -pady {10 0}
508 172 olivier.gi
entry    .connect.cfg.ad.server_port.p0 -textvariable server(0,port) -relief sunken -width 10
509 158 olivier.gi
pack     .connect.cfg.ad.server_port.p0 -side bottom  -padx 5 -pady {10 0}
510
label    .connect.cfg.ad.server_port.l  -text "Proxy Server Port" -anchor w
511
pack     .connect.cfg.ad.server_port.l  -side bottom  -padx 5 -pady {10 0}
512
 
513
frame    .connect.cfg.ad.arrow
514 172 olivier.gi
pack     .connect.cfg.ad.arrow     -side left -padx 5 -pady {0 20} -fill y
515 158 olivier.gi
label    .connect.cfg.ad.arrow.l3  -text "==>" -anchor w
516
pack     .connect.cfg.ad.arrow.l3  -side bottom  -padx 5 -pady {10 10}
517
label    .connect.cfg.ad.arrow.l2  -text "==>" -anchor w
518
pack     .connect.cfg.ad.arrow.l2  -side bottom  -padx 5 -pady {10 2}
519
label    .connect.cfg.ad.arrow.l1  -text "==>" -anchor w
520
pack     .connect.cfg.ad.arrow.l1  -side bottom  -padx 5 -pady {10 2}
521
label    .connect.cfg.ad.arrow.l0  -text "==>" -anchor w
522
pack     .connect.cfg.ad.arrow.l0  -side bottom  -padx 5 -pady {10 2}
523
 
524
frame    .connect.cfg.ad.i2c_addr
525 172 olivier.gi
pack     .connect.cfg.ad.i2c_addr     -side left -padx 5 -pady {0 20} -fill y
526 158 olivier.gi
spinbox  .connect.cfg.ad.i2c_addr.s3  -from 8 -to 119 -textvariable omsp_conf(3,cpuaddr) -width 4
527
pack     .connect.cfg.ad.i2c_addr.s3  -side bottom    -padx 5 -pady {10 10}
528
spinbox  .connect.cfg.ad.i2c_addr.s2  -from 8 -to 119 -textvariable omsp_conf(2,cpuaddr) -width 4
529
pack     .connect.cfg.ad.i2c_addr.s2  -side bottom    -padx 5 -pady {10 0}
530
spinbox  .connect.cfg.ad.i2c_addr.s1  -from 8 -to 119 -textvariable omsp_conf(1,cpuaddr) -width 4
531
pack     .connect.cfg.ad.i2c_addr.s1  -side bottom    -padx 5 -pady {10 0}
532
spinbox  .connect.cfg.ad.i2c_addr.s0  -from 8 -to 119 -textvariable omsp_conf(0,cpuaddr) -width 4
533
pack     .connect.cfg.ad.i2c_addr.s0  -side bottom    -padx 5 -pady {10 0}
534
label    .connect.cfg.ad.i2c_addr.l   -text "I2C Address" -anchor w
535
pack     .connect.cfg.ad.i2c_addr.l   -side bottom    -padx 5 -pady {10 0}
536
 
537
frame    .connect.cfg.ad.i2c_nr
538
pack     .connect.cfg.ad.i2c_nr     -side right -padx 5 -fill y
539
label    .connect.cfg.ad.i2c_nr.l   -text "Number of cores" -anchor w
540
pack     .connect.cfg.ad.i2c_nr.l   -side top    -padx 50 -pady {10 0}
541
spinbox  .connect.cfg.ad.i2c_nr.s   -from 1 -to 4 -textvariable omsp_nr -state readonly -width 4 -command {updateConfiguration}
542
pack     .connect.cfg.ad.i2c_nr.s   -side top    -padx 50 -pady {10 10}
543
 
544 172 olivier.gi
frame       .connect.cfg.ad.i2c_nr.f   -bd 2 -relief ridge
545
pack        .connect.cfg.ad.i2c_nr.f   -side top -padx 10 -pady {5 5} -fill x
546
label       .connect.cfg.ad.i2c_nr.f.l2  -text "Breakpoint configuration" -anchor w
547
pack        .connect.cfg.ad.i2c_nr.f.l2  -side top    -padx 0 -pady {5 10}
548
 
549
frame       .connect.cfg.ad.i2c_nr.f.soft
550
pack        .connect.cfg.ad.i2c_nr.f.soft   -side top -padx 0 -fill x
551
radiobutton .connect.cfg.ad.i2c_nr.f.soft.r -value "0" -text "" -state normal -variable breakSelect -command {updateSoftBreakpoints}
552
pack        .connect.cfg.ad.i2c_nr.f.soft.r -side left -padx {10 0}  -pady {0 0}
553
label       .connect.cfg.ad.i2c_nr.f.soft.l -text "Soft" -anchor w
554
pack        .connect.cfg.ad.i2c_nr.f.soft.l -side left -padx {5 10} -pady {3 0}
555
button      .connect.cfg.ad.i2c_nr.f.soft.b -text "Config." -state disabled -command {configSoftBreakpoints}
556
pack        .connect.cfg.ad.i2c_nr.f.soft.b -side right -padx {0 20}
557
 
558
frame       .connect.cfg.ad.i2c_nr.f.hard
559
pack        .connect.cfg.ad.i2c_nr.f.hard   -side top -padx 0 -pady {0 10} -fill x
560
radiobutton .connect.cfg.ad.i2c_nr.f.hard.r -value "1" -text "" -state normal -variable breakSelect -command {updateSoftBreakpoints}
561
pack        .connect.cfg.ad.i2c_nr.f.hard.r -side left -padx {10 0}  -pady {0 0}
562
label       .connect.cfg.ad.i2c_nr.f.hard.l -text "Hard" -anchor w
563
pack        .connect.cfg.ad.i2c_nr.f.hard.l -side left -padx {5 10} -pady {3 0}
564
 
565 158 olivier.gi
# Update according to default values
566
updateConfiguration
567
 
568 110 olivier.gi
# Connect to CPU & start proxy server
569 198 olivier.gi
frame       .connect.start.f
570
pack        .connect.start.f   -side top -padx 10 -pady 0 -fill x -expand true
571
button      .connect.start.f.b -text "Connect to CPU(s)\n and \nStart Proxy Server(s)" -command {startServerGUI}
572
pack        .connect.start.f.b -side top -padx 30
573
checkbutton .connect.start.comp_mode -text "MSPGCC Compatibility Mode" -variable mspgcc_compat_mode
574
pack        .connect.start.comp_mode -side bottom -padx 10
575 110 olivier.gi
 
576
 
577
# CPU Info
578
frame  .info.cpu
579
pack   .info.cpu      -side top   -padx 10 -pady {5 0} -fill x
580
label  .info.cpu.l    -text "CPU Info:"       -anchor w
581
pack   .info.cpu.l    -side left -padx {10 10}
582
label  .info.cpu.con  -text "Disconnected"    -anchor w -fg Red
583
pack   .info.cpu.con  -side left
584
button .info.cpu.more -text "More..."         -width 9 -command {displayMore} -state disabled
585
pack   .info.cpu.more -side right -padx {0 30}
586
 
587
 
588
# Server Info
589
frame  .info.server
590
pack   .info.server     -side top   -padx 10 -pady {0 10} -fill x
591
label  .info.server.l   -text "Server Info:"       -anchor w
592
pack   .info.server.l   -side left -padx {10 10}
593
label  .info.server.con -text "Not running"    -anchor w -fg Red
594
pack   .info.server.con -side left
595
 
596
 
597 2 olivier.gi
# Create the text widget to log received messages
598
frame  .server.t
599
pack   .server.t     -side top -padx 10 -pady 10 -fill x
600 110 olivier.gi
set server(log) [text   .server.t.log -width 80 -height 15 -borderwidth 2  \
601 2 olivier.gi
                          -setgrid true -yscrollcommand {.server.t.scroll set}]
602
pack   .server.t.log -side left  -fill both -expand true
603
scrollbar .server.t.scroll -command {.server.t.log yview}
604 87 olivier.gi
pack   .server.t.scroll -side right -fill both
605 2 olivier.gi
 
606
 
607
# Log commands
608
frame  .server.cmd
609 110 olivier.gi
pack   .server.cmd   -side top  -pady {0 10} -fill x
610 2 olivier.gi
button .server.cmd.clear -text "Clear log" -command {$server(log) delete 1.0 end}
611
pack   .server.cmd.clear -side left -padx 10
612
checkbutton .server.cmd.verbose -text "Verbose" -variable verbose
613
pack   .server.cmd.verbose -side right -padx 10
614 87 olivier.gi
 
615
 
616
# Load TCL script fields
617
frame  .tclscript.ft
618 110 olivier.gi
pack   .tclscript.ft        -side top  -padx 10  -pady 10 -fill x
619 87 olivier.gi
label  .tclscript.ft.l      -text "TCL script:" -state disabled
620
pack   .tclscript.ft.l      -side left -padx "0 10"
621
entry  .tclscript.ft.file   -width 58 -relief sunken -textvariable tcl_file_name -state disabled
622
pack   .tclscript.ft.file   -side left -padx 10
623
button .tclscript.ft.browse -text "Browse" -state disabled -command {set tcl_file_name [tk_getOpenFile -filetypes {{{TCL Files} {.tcl}} {{All Files} *}}]}
624
pack   .tclscript.ft.browse -side left -padx 5
625
frame  .tclscript.fb
626
pack   .tclscript.fb        -side top -fill x
627
button .tclscript.fb.read   -text "Source TCL script !" -state disabled -command {if {[file exists $tcl_file_name]} {source $tcl_file_name}}
628 110 olivier.gi
pack   .tclscript.fb.read   -side left -padx 20  -pady {0 10} -fill x
629 87 olivier.gi
 
630 110 olivier.gi
wm resizable . 0 0
631 172 olivier.gi
 
632
 
633
 
634
#####################################
635
#  Breakpoint configuration window  #
636
#####################################
637
 
638
proc configSoftBreakpoints  { } {
639
 
640
    global omsp_nr
641
 
642
    # Destroy windows if already existing
643
    if {[lsearch -exact [winfo children .] .omsp_sft_brk]!=-1} {
644
        destroy .omsp_sft_brk
645
    }
646
 
647
    # Create master window
648
    set title "Software Breakpoint Configuration"
649
    toplevel     .omsp_sft_brk
650
    wm title     .omsp_sft_brk $title
651
    wm geometry  .omsp_sft_brk +380+200
652
    wm resizable .omsp_sft_brk 0 0
653
 
654
    # Title
655
    label  .omsp_sft_brk.title  -text "$title"   -anchor center -fg "\#6a5acd" -font {-weight bold -size 16}
656
    pack   .omsp_sft_brk.title  -side top -padx {20 20} -pady {20 10}
657
 
658
    # Create global frame
659
    frame     .omsp_sft_brk.map
660
    pack      .omsp_sft_brk.map   -side top  -padx {10 10} -pady {0 0}
661
 
662
    # Create frame for buttons
663
    frame       .omsp_sft_brk.map.b  -bd 2 -relief ridge
664
    pack        .omsp_sft_brk.map.b  -side top  -padx 10  -pady {10 0} -fill x -expand true
665
 
666
    button      .omsp_sft_brk.map.b.share -text "Shared Program Memory"    -command {setMemMapping 0 0 0 0}
667
    pack        .omsp_sft_brk.map.b.share -side left  -padx {20 15} -pady {10 10}
668
 
669
    button      .omsp_sft_brk.map.b.dedic -text "Dedicated Program Memory" -command {setMemMapping 0 1 2 3}
670
    pack        .omsp_sft_brk.map.b.dedic -side right -padx {15 20} -pady {10 10}
671
 
672
 
673
    # Create fram for radio-buttons
674
    frame       .omsp_sft_brk.map.r  -bd 2 -relief ridge
675
    pack        .omsp_sft_brk.map.r  -side top  -padx 10  -pady {10 20} -fill x -expand true
676
 
677
    frame       .omsp_sft_brk.map.r.core_nr
678
    pack        .omsp_sft_brk.map.r.core_nr     -side left -padx 5 -pady {0 20} -fill y
679
    label       .omsp_sft_brk.map.r.core_nr.l3  -text "Core 3:" -anchor w
680
    pack        .omsp_sft_brk.map.r.core_nr.l3  -side bottom  -padx {25 0} -pady {10 10}
681
    label       .omsp_sft_brk.map.r.core_nr.l2  -text "Core 2:" -anchor w
682
    pack        .omsp_sft_brk.map.r.core_nr.l2  -side bottom  -padx {25 0} -pady {10 2}
683
    label       .omsp_sft_brk.map.r.core_nr.l1  -text "Core 1:" -anchor w
684
    pack        .omsp_sft_brk.map.r.core_nr.l1  -side bottom  -padx {25 0} -pady {10 2}
685
    label       .omsp_sft_brk.map.r.core_nr.l0  -text "Core 0:" -anchor w
686
    pack        .omsp_sft_brk.map.r.core_nr.l0  -side bottom  -padx {25 0} -pady {10 2}
687
 
688
    frame       .omsp_sft_brk.map.r.pmem0
689
    pack        .omsp_sft_brk.map.r.pmem0    -side left -padx 5 -pady {0 20} -fill y
690
    radiobutton .omsp_sft_brk.map.r.pmem0.p3 -value "0" -text "" -state normal -variable mem_mapping(3)
691
    pack        .omsp_sft_brk.map.r.pmem0.p3 -side bottom  -padx 5 -pady {10 10}
692
    radiobutton .omsp_sft_brk.map.r.pmem0.p2 -value "0" -text "" -state normal -variable mem_mapping(2)
693
    pack        .omsp_sft_brk.map.r.pmem0.p2 -side bottom  -padx 5 -pady {10 0}
694
    radiobutton .omsp_sft_brk.map.r.pmem0.p1 -value "0" -text "" -state normal -variable mem_mapping(1)
695
    pack        .omsp_sft_brk.map.r.pmem0.p1 -side bottom  -padx 5 -pady {10 0}
696
    radiobutton .omsp_sft_brk.map.r.pmem0.p0 -value "0" -text "" -state normal -variable mem_mapping(0)
697
    pack        .omsp_sft_brk.map.r.pmem0.p0 -side bottom  -padx 5 -pady {10 0}
698
    label       .omsp_sft_brk.map.r.pmem0.l  -text "Program\nMemory 0" -anchor w
699
    pack        .omsp_sft_brk.map.r.pmem0.l  -side bottom  -padx 5 -pady {10 0}
700
 
701
    frame       .omsp_sft_brk.map.r.pmem1
702
    pack        .omsp_sft_brk.map.r.pmem1    -side left -padx 5 -pady {0 20} -fill y
703
    radiobutton .omsp_sft_brk.map.r.pmem1.p3 -value "1" -text "" -state normal -variable mem_mapping(3)
704
    pack        .omsp_sft_brk.map.r.pmem1.p3 -side bottom  -padx 5 -pady {10 10}
705
    radiobutton .omsp_sft_brk.map.r.pmem1.p2 -value "1" -text "" -state normal -variable mem_mapping(2)
706
    pack        .omsp_sft_brk.map.r.pmem1.p2 -side bottom  -padx 5 -pady {10 0}
707
    radiobutton .omsp_sft_brk.map.r.pmem1.p1 -value "1" -text "" -state normal -variable mem_mapping(1)
708
    pack        .omsp_sft_brk.map.r.pmem1.p1 -side bottom  -padx 5 -pady {10 0}
709
    radiobutton .omsp_sft_brk.map.r.pmem1.p0 -value "1" -text "" -state disable -variable mem_mapping(0)
710
    pack        .omsp_sft_brk.map.r.pmem1.p0 -side bottom  -padx 5 -pady {10 0}
711
    label       .omsp_sft_brk.map.r.pmem1.l  -text "Program\nMemory 1" -anchor w
712
    pack        .omsp_sft_brk.map.r.pmem1.l  -side bottom  -padx 5 -pady {10 0}
713
 
714
    frame       .omsp_sft_brk.map.r.pmem2
715
    pack        .omsp_sft_brk.map.r.pmem2    -side left -padx 5 -pady {0 20} -fill y
716
    radiobutton .omsp_sft_brk.map.r.pmem2.p3 -value "2" -text "" -state normal -variable mem_mapping(3)
717
    pack        .omsp_sft_brk.map.r.pmem2.p3 -side bottom  -padx 5 -pady {10 10}
718
    radiobutton .omsp_sft_brk.map.r.pmem2.p2 -value "2" -text "" -state normal -variable mem_mapping(2)
719
    pack        .omsp_sft_brk.map.r.pmem2.p2 -side bottom  -padx 5 -pady {10 0}
720
    radiobutton .omsp_sft_brk.map.r.pmem2.p1 -value "2" -text "" -state disable -variable mem_mapping(1)
721
    pack        .omsp_sft_brk.map.r.pmem2.p1 -side bottom  -padx 5 -pady {10 0}
722
    radiobutton .omsp_sft_brk.map.r.pmem2.p0 -value "2" -text "" -state disable -variable mem_mapping(0)
723
    pack        .omsp_sft_brk.map.r.pmem2.p0 -side bottom  -padx 5 -pady {10 0}
724
    label       .omsp_sft_brk.map.r.pmem2.l  -text "Program\nMemory 2" -anchor w
725
    pack        .omsp_sft_brk.map.r.pmem2.l  -side bottom  -padx 5 -pady {10 0}
726
 
727
    frame       .omsp_sft_brk.map.r.pmem3
728
    pack        .omsp_sft_brk.map.r.pmem3    -side left -padx 5 -pady {0 20} -fill y
729
    radiobutton .omsp_sft_brk.map.r.pmem3.p3 -value "3" -text "" -state normal -variable mem_mapping(3)
730
    pack        .omsp_sft_brk.map.r.pmem3.p3 -side bottom  -padx 5 -pady {10 10}
731
    radiobutton .omsp_sft_brk.map.r.pmem3.p2 -value "3" -text "" -state disable -variable mem_mapping(2)
732
    pack        .omsp_sft_brk.map.r.pmem3.p2 -side bottom  -padx 5 -pady {10 0}
733
    radiobutton .omsp_sft_brk.map.r.pmem3.p1 -value "3" -text "" -state disable -variable mem_mapping(1)
734
    pack        .omsp_sft_brk.map.r.pmem3.p1 -side bottom  -padx 5 -pady {10 0}
735
    radiobutton .omsp_sft_brk.map.r.pmem3.p0 -value "3" -text "" -state disable -variable mem_mapping(0)
736
    pack        .omsp_sft_brk.map.r.pmem3.p0 -side bottom  -padx 5 -pady {10 0}
737
    label       .omsp_sft_brk.map.r.pmem3.l  -text "Program\nMemory 3" -anchor w
738
    pack        .omsp_sft_brk.map.r.pmem3.l  -side bottom  -padx 5 -pady {10 0}
739
 
740
    # Create OK button
741
    button .omsp_sft_brk.okay -text "OK" -font {-weight bold}  -command {destroy .omsp_sft_brk}
742
    pack   .omsp_sft_brk.okay -side bottom -expand true -fill x -padx 5 -pady {0 10}
743
 
744
    # Update according to number of cores
745
    updateSoftBreakpoints
746
}
747
 
748
proc updateSoftBreakpoints  { } {
749
 
750
    global omsp_nr
751
    global breakSelect
752
 
753
    if {[winfo exists .omsp_sft_brk]} {
754
        if {$breakSelect==0} {
755
            .omsp_sft_brk.map.r.core_nr.l0  configure -state normal
756
            .omsp_sft_brk.map.r.pmem0.p0    configure -state normal
757
            if {$omsp_nr < 2} {
758
                .omsp_sft_brk.map.r.core_nr.l1  configure -state disabled
759
                .omsp_sft_brk.map.r.pmem0.p1    configure -state disabled
760
                .omsp_sft_brk.map.r.pmem1.p1    configure -state disabled
761
            } else {
762
                .omsp_sft_brk.map.r.core_nr.l1  configure -state normal
763
                .omsp_sft_brk.map.r.pmem0.p1    configure -state normal
764
                .omsp_sft_brk.map.r.pmem1.p1    configure -state normal
765
            }
766
 
767
            if {$omsp_nr < 3} {
768
                .omsp_sft_brk.map.r.core_nr.l2  configure -state disabled
769
                .omsp_sft_brk.map.r.pmem0.p2    configure -state disabled
770
                .omsp_sft_brk.map.r.pmem1.p2    configure -state disabled
771
                .omsp_sft_brk.map.r.pmem2.p2    configure -state disabled
772
            } else {
773
                .omsp_sft_brk.map.r.core_nr.l2  configure -state normal
774
                .omsp_sft_brk.map.r.pmem0.p2    configure -state normal
775
                .omsp_sft_brk.map.r.pmem1.p2    configure -state normal
776
                .omsp_sft_brk.map.r.pmem2.p2    configure -state normal
777
            }
778
 
779
            if {$omsp_nr < 4} {
780
                .omsp_sft_brk.map.r.core_nr.l3  configure -state disabled
781
                .omsp_sft_brk.map.r.pmem0.p3    configure -state disabled
782
                .omsp_sft_brk.map.r.pmem1.p3    configure -state disabled
783
                .omsp_sft_brk.map.r.pmem2.p3    configure -state disabled
784
                .omsp_sft_brk.map.r.pmem3.p3    configure -state disabled
785
            } else {
786
                .omsp_sft_brk.map.r.core_nr.l3  configure -state normal
787
                .omsp_sft_brk.map.r.pmem0.p3    configure -state normal
788
                .omsp_sft_brk.map.r.pmem1.p3    configure -state normal
789
                .omsp_sft_brk.map.r.pmem2.p3    configure -state normal
790
                .omsp_sft_brk.map.r.pmem3.p3    configure -state normal
791
            }
792
        } else {
793
            .omsp_sft_brk.map.r.core_nr.l0  configure -state disabled
794
            .omsp_sft_brk.map.r.pmem0.p0    configure -state disabled
795
            .omsp_sft_brk.map.r.core_nr.l1  configure -state disabled
796
            .omsp_sft_brk.map.r.pmem0.p1    configure -state disabled
797
            .omsp_sft_brk.map.r.pmem1.p1    configure -state disabled
798
            .omsp_sft_brk.map.r.core_nr.l2  configure -state disabled
799
            .omsp_sft_brk.map.r.pmem0.p2    configure -state disabled
800
            .omsp_sft_brk.map.r.pmem1.p2    configure -state disabled
801
            .omsp_sft_brk.map.r.pmem2.p2    configure -state disabled
802
            .omsp_sft_brk.map.r.core_nr.l3  configure -state disabled
803
            .omsp_sft_brk.map.r.pmem0.p3    configure -state disabled
804
            .omsp_sft_brk.map.r.pmem1.p3    configure -state disabled
805
            .omsp_sft_brk.map.r.pmem2.p3    configure -state disabled
806
            .omsp_sft_brk.map.r.pmem3.p3    configure -state disabled
807
        }
808
    }
809
}
810
 
811
proc setMemMapping {core0 core1 core2 core3} {
812
 
813
    global mem_mapping
814
    global omsp_nr
815
 
816
    set mem_mapping(0) $core0
817
    if {$omsp_nr > 1} {
818
        set mem_mapping(1) $core1
819
    }
820
    if {$omsp_nr > 2} {
821
        set mem_mapping(2) $core2
822
    }
823
    if {$omsp_nr > 3} {
824
        set mem_mapping(3) $core3
825
    }
826 198 olivier.gi
}

powered by: WebSVN 2.1.0

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