aboutsummaryrefslogtreecommitdiff
path: root/src/tcl
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-08-24 18:20:49 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-08-24 18:20:49 +0000
commit8d73c2a9b0c00c870694a57f7cfbc23e354855ac (patch)
tree075eb1d11d8349fa8daa20ee2401b71666fa070f /src/tcl
parent6abf942baba746df2c7195abe01a9b05cec13b1e (diff)
downloadriscv-openocd-8d73c2a9b0c00c870694a57f7cfbc23e354855ac.zip
riscv-openocd-8d73c2a9b0c00c870694a57f7cfbc23e354855ac.tar.gz
riscv-openocd-8d73c2a9b0c00c870694a57f7cfbc23e354855ac.tar.bz2
duan ellis target tcl work in progress
converts a number of 'simple string lookup tables' into NVP tables. These NVP tables will be used by various commands coming in the next patch. git-svn-id: svn://svn.berlios.de/openocd/trunk@962 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/tcl')
-rw-r--r--src/tcl/chip/atmel/at91/rtt.tcl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tcl/chip/atmel/at91/rtt.tcl b/src/tcl/chip/atmel/at91/rtt.tcl
index 56abb29..9c60300 100644
--- a/src/tcl/chip/atmel/at91/rtt.tcl
+++ b/src/tcl/chip/atmel/at91/rtt.tcl
@@ -15,7 +15,9 @@ proc show_RTTC_RTMR_helper { NAME ADDR VAL } {
set rtpres 65536;
}
global AT91C_SLOWOSC_FREQ
- set f [expr double($AT91C_SLOWOSC_FREQ) / double($rtpres)]
+ # Nasty hack, make this a float by tacking a .0 on the end
+ # otherwise, jim makes the value an integer
+ set f [expr $AT91C_SLOWOSC_FREQ.0 / $rtpres.0]
puts [format "\tPrescale value: 0x%04x (%5d) => %f Hz" $rtpres $rtpres $f]
if { $VAL & $BIT16 } {
puts "\tBit16 -> Alarm IRQ Enabled"