From 7c5acf8660ddfce4746152e03749b699532f513f Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Wed, 30 Dec 2009 07:48:49 +0800 Subject: whitespace cleanup, mostly for docs Remove useless space/tab at end of lines. Remove spaces in indentation and replace with tab. Signed-off-by: Antonio Borneo Signed-off-by: David Brownell --- src/server/httpd/menu.xml | 454 +++++++++++++++++++++---------------------- src/server/httpd/menu.xsl | 240 +++++++++++------------ src/server/httpd/menuweb.css | 6 +- src/server/httpd/readme.txt | 2 +- 4 files changed, 351 insertions(+), 351 deletions(-) (limited to 'src/server/httpd') diff --git a/src/server/httpd/menu.xml b/src/server/httpd/menu.xml index ef1d4ec8..be144641 100644 --- a/src/server/httpd/menu.xml +++ b/src/server/httpd/menu.xml @@ -1,26 +1,26 @@ - + index.tcl - Config Target - index.tcl + Config Target + index.tcl OpenOCD debugger index.tcl - - +   @@ -35,18 +35,18 @@ set form_address [formfetch form_address] set form_action [formfetch form_action] - + if {[string compare $form_action "Halt"]==0} { append console [encode [capture_catch "halt"]] } if {[string compare $form_action "Resume"]==0} { append console [encode [capture_catch "resume"]] } - + if {[string compare $form_action "Reset and run"]==0} { append console [encode [capture_catch "reset run"]] } - + if {[string compare $form_action "Power on"]==0} { append console [encode [capture_catch "power on"]] } @@ -54,13 +54,13 @@ append console [encode [capture_catch "power off"]] } - + append console [encode [capture_catch poll]] -
+ @@ -69,32 +69,32 @@
-
-
- +
+
+

]]>
Target status shows that status of the connected target.

+

Target status shows that status of the connected target.

Current target - selected target configuration.

Startup - whether or not the target script ran to completion. Note that even if the target is disconnected, powered down or unresponsive, the startup script will still run to completion. Startup - OK does not mean that the target is fully operational, simply that the configuration script - did not contain syntax errors for instance. + did not contain syntax errors for instance. See log for details.

Target power - Detects power on target.
If the JTAG cable is not connected, or the target has no power, then no target power will be detected.

Type "help power" in telnet for command to control power relay.

]]>
- +
- - + + @@ -103,12 +103,12 @@ Target config quick start guide +

The reset init script is crucial. It will set up e.g. MMU, chip select registers, etc. after a reset. The init.cfg (reset init script) is embedded into the openocd.cfg file in the sampls OpenOCD provides. @@ -116,25 +116,25 @@ Writing an openocd.cfg from scratch is a non-trivial exercise, but fortunally it only has to be done once for a target and afterwards it rarely if ever needs to be changed. - - + + ]]> - - Quick start guide on how to configure a target. + + Quick start guide on how to configure a target. - - + + - + flashinfo.tcl - Flash - flashinfo.tcl + Flash + flashinfo.tcl Flash Information flashinfo.tcl @@ -150,13 +150,13 @@ Configured flash banks: -

+

set flash_return [ocd_flash_banks] if {[llength $flash_return]!=0} { append buffer [encode [flash banks]] - + set form_action [formfetch form_action] if {[string compare $form_action "Reset CPU and probe flash"]==0} { append console [encode [capture_catch "reset init"]] @@ -168,17 +168,17 @@ }

-

+ foreach a [ocd_flash_banks] { append buffer "Flash bank at [format "0x%08x size 0x%08x" $a(base) $a(size)]: " -
+ "> "> - +
@@ -186,7 +186,7 @@ }
- + ]]>
@@ -198,7 +198,7 @@ the different sectors in the flash, and the flash driver used.

]]>
- +
@@ -208,82 +208,82 @@ Program / Verify Flash - + set form_offset [formfetch form_offset] set form_action [formfetch form_action] set form_type [formfetch form_type] - - + + set post "" catch {set post $post_data} err - + if {[string compare $form_offset ""]==0} { set form_offset 0 } if {[string compare $form_type ""]==0} { set form_type "" } - + - + set data "" append buffer {
} - - set action_reset [expr {[string length $form_action]!=0}] - set action_flash [expr {[string compare $form_action "Flash"]==0 || [string compare $form_action "Flash and verify"]==0}] + + set action_reset [expr {[string length $form_action]!=0}] + set action_flash [expr {[string compare $form_action "Flash"]==0 || [string compare $form_action "Flash and verify"]==0}] set action_verify [expr {[string compare $form_action "Verify"]==0 || [string compare $form_action "Flash and verify"]==0}] - + if {$action_reset} { append console [encode [capture_catch "reset init"]] } - + append buffer {} append buffer {} append buffer "" - + - + - - + +
File
Offset
Type
- +
 
 
- +
- +

- + if {$action_flash||$action_verify} { catch {writeform form_filecontent $upload_filename} result append console [encode $result] @@ -313,27 +313,27 @@ } append buffer "" } - - + +

- + ]]>
- + Program and/or verify the flash on your target.

Flash - Halt CPU, automatically erase flash if required and program flash with image.

Flash and verify - Programs the flash and verifies the programmed flash content is correct.

Verify - Halt CPU and verify image in flash or RAM.

-

Offset - This value is added to the address of the image.
- Binary images start at address 0 by default, whereas elf and ihex have addresses encoded into the image.
+

Offset - This value is added to the address of the image.
+ Binary images start at address 0 by default, whereas elf and ihex have addresses encoded into the image.
Typically 0 for elf/ihex and the address to write the image to for binary files.

- ]]> + ]]>
- - + +
- + @@ -350,23 +350,23 @@ set form_serialnumber [formfetch form_serialnumber] append buffer [production_info] - +
- + if {[string compare $form_action "Upload firmware"]==0} { - set wrotedata [catch {writeform form_filecontent $upload_filename} result] + set wrotedata [catch {writeform form_filecontent $upload_filename} result] append buffer [encode $result] if {$wrotedata==0} { append buffer "
Running production procedure

" append buffer "
Reset and init:
" - + append console [encode [capture_catch {catch "production $upload_filename $form_serialnumber"}]] } } if {[string compare $form_action "Test"]==0} { append buffer "
Running production test. Output from first 10 seconds printed below.

" - + append console [encode [capture_catch {catch production_test}]] } if {[string compare $form_action "Power on"]==0} { @@ -381,13 +381,13 @@ append buffer {

Firmware file(raw binary)

} append buffer {

Serial number

} - +
 
 
- + @@ -395,55 +395,55 @@
  

- + ]]> - + Upload firmware - Power cycle target, reset target and program raw binary file to flash bank 0, offset 0 and verify flash programming. Leave target powered on.

-

Test - Power up target, run 10 second target test. Output is provided via the DCC output channel.

+

Test - Power up target, run 10 second target test. Output is provided via the DCC output channel.

Power on - Power on target.

Power off - Power off target.

Serial number - A target script can use this string in the production procedure. Type "help production" for more info.

- ]]> + ]]>
- - + + - + erase.tcl - erase.tcl + erase.tcl Erase Flash flashinfo.tcl - + set form_address [formfetch form_address] set form_length [formfetch form_length] set form_action [formfetch form_action] - + if {[string compare $form_length ""]==0} { set form_length 0x10000 - } + } if {[string compare $form_address ""]==0} { if {[catch {[first_flash_base]} result]==0} { set form_address "0x[tohex $result]" - } - } - - + } + } + + if {[string compare $form_address ""]!=0} { if {[string compare $form_action "Erase"]==0} { append buffer "" @@ -451,13 +451,13 @@ reset init flash erase_address $form_address $form_length}]] append buffer - } + } } - - + +
- -
+ + @@ -468,14 +468,14 @@
Address
Length
 
- +
- - + +
- - + + ]]> The length field is specified in number of bytes.

]]>
- + run.tcl - run.tcl + run.tcl Run program flashinfo.tcl set form_address [formfetch form_address] @@ -508,26 +508,26 @@ if {[string compare $form_action "Run from address"]==0} { append console [encode [capture_catch "halt"]] append console [encode [capture_catch "wait_halt"]] append console [encode [capture_catch "resume $form_address"]] -} +} if {[string compare $form_action "Halt"]==0} { append console [encode [capture_catch "halt"]] append console [encode [capture_catch "wait_halt"]] } - + if {[string compare $form_action "Reset and run"]==0} { append console [encode [capture_catch "reset run"]] } - + if {[string compare $form_action "Reset and init"]==0} { append console [encode [capture_catch "reset init"]] -} +} append console [encode [capture_catch poll]]
-
+ @@ -537,12 +537,12 @@ append console [encode [capture_catch poll]]
Address
 
- +
- - + + ]]> Reset and init - reset CPU and run init script.

]]>
- + browsemem.tcl - Memory - browsemem.tcl + Memory + browsemem.tcl Browse / Edit Memory browsemem.tcl @@ -570,53 +570,53 @@ append console [encode [capture_catch poll]] - + - + set form_address [formfetch form_address] set form_length [formfetch form_length] set form_type [formfetch form_type] set form_action [formfetch form_action] set form_value [formfetch form_value] - + if {[string compare $form_length ""]==0} { set form_length 0 - } + } if {$form_length<=0} { set form_length 0x80 - } + } if {$form_length>0x1000} { set form_length 0x1000 - } - + } + if {[string compare $form_type ""]==0} { set form_type mdw } - + if {[string compare $form_type "mdw"]==0} { set wordsize 4 - set modify_cmd mww + set modify_cmd mww } if {[string compare $form_type "mdh"]==0} { set wordsize 2 - set modify_cmd mwh + set modify_cmd mwh } if {[string compare $form_type "mdb"]==0} { set wordsize 1 - set modify_cmd mwb + set modify_cmd mwb } - - - - + + + + if {[string compare $form_address ""]!=0} { if {[string compare $form_action "Previous"]==0} { # Kludge! Work around problems parsing hex in Jim Tcl expressions @@ -626,24 +626,24 @@ append console [encode [capture_catch poll]] } else { set form_address "0x0" } - } + } if {[string compare $form_action "Next"]==0} { # Kludge! Work around problems parsing hex in Jim Tcl expressions incr form_address ; set form_address [expr $form_address-1] set form_address "0x[tohex [expr $form_address+$form_length]]" - } + } if {[string compare $form_action "Modify"]==0} { append console [capture_catch "$modify_cmd $form_address $form_value"] - } + } if {[string compare $form_action "Fill"]==0} { append console [capture_catch "$modify_cmd $form_address $form_value $form_length"] - } + } } - - + + - -
+ + @@ -652,17 +652,17 @@ append console [encode [capture_catch poll]]
Address
Length">
 
Type - +
@@ -670,14 +670,14 @@ append console [encode [capture_catch poll]]
 
- +
   

- +

Memory:

@@ -686,19 +686,19 @@ append console [encode [capture_catch poll]] if {[string compare $form_address ""]!=0} { append console [encode [capture_catch halt]] append buffer [encode [capture_catch "$form_type $form_address [expr $form_length]"]] - } + } - - + + ]]> Browse and edit target memory.
- Length is in bytes, maximum 4096 bytes.

+ Length is in bytes, maximum 4096 bytes.

An error message is shown when trying to browse or edit memory which cases a CPU fault.

CPU will be halted if required.

Modify - Will modify only one byte, half-word or word starting at Address.

@@ -706,11 +706,11 @@ append console [encode [capture_catch poll]]

Refresh - Display the content of the specified memory area.

]]> - + - + @@ -723,8 +723,8 @@ append console [encode [capture_catch poll]] set form_address [formfetch form_address] set form_length [formfetch form_length] set form_action [formfetch form_action] - -
+ + @@ -736,29 +736,29 @@ append console [encode [capture_catch poll]]
Address
Length
 
- + - - + +
if {[string compare $form_action "Download"]==0} { append console [encode [capture_catch "reset init"]] append console [encode [capture_catch "dump_image /tmp/dump.bin $form_address $form_length"]] -
+
- + } - + - + ]]> - Note that download memory can take a long time(potentially minutes for megabytes at low JTAG clk speeds). @@ -768,25 +768,25 @@ append console [encode [capture_catch poll]] ]]> - +
openocd.tcl - OpenOCD - openocd.tcl + OpenOCD + openocd.tcl Run Command openocd.tcl - + 0} { set form_edittext [capture_catch {eval $form_command}] } - + append buffer {
} "\n" append buffer {Command
} - append buffer {
} append buffer {
} - append buffer {
} - + append buffer {
} "\n" - + ]]>
- + Run tcl statement(s). Add "ocd_" prefix to OpenOCD commands otherwise @@ -828,28 +828,28 @@ append console [encode [capture_catch poll]] curl --form form_command=ocd_version append buffer [ip]runtcl.tcl - + ]]>
- - + + guiupload.tcl openocd.tcl Upload File set form_filename [formfetch form_filename]; set form_action [formfetch form_action]; #set form_filecontent [formfetch form_filecontent]; - + append buffer {
} - append buffer
+ append buffer
if {[string compare $form_action "Upload"]==0} { if {[catch {writeform form_filecontent $form_filename} result]==0} { append buffer [encode $result] @@ -857,20 +857,20 @@ append console [encode [capture_catch poll]] append buffer Wrote $form_filename } } - + append buffer {} append buffer {
Filename on OpenOCD machine
File to upload
} append buffer {
 
 
} append buffer {
} append buffer {
} - + - + ]]>
- +
- + @@ -879,12 +879,12 @@ append console [encode [capture_catch poll]] Target config quick start guide +

The reset init script is crucial. It will set up e.g. MMU, chip select registers, etc. after a reset. The init.cfg (reset init script) is embedded into the openocd.cfg file in the sampls OpenOCD provides. @@ -892,24 +892,24 @@ append console [encode [capture_catch poll]] Writing an openocd.cfg from scratch is a non-trivial exercise, but fortunally it only has to be done once for a target and afterwards it rarely if ever needs to be changed. - - + + ]]> - - Quick start guide on how to configure a target. + + Quick start guide on how to configure a target. - - + + - + - index.tcl + index.tcl index.tcl terminal.tcl UART forwarding @@ -924,27 +924,27 @@ append console [encode [capture_catch poll]] set form_action [formfetch form_action]

- Target baudrate: + Target baudrate: -

+

-

+ if {[string compare $form_action "Set baudrate"]==0} { append console [encode [ocd_uart $form_baudrate]] } - +

Simple UART

This terminal window is purely for illustrative purposes. Use telnet or a terminal program to talk to the target over TCP/IP for anything but trivial case of reading/writing a few @@ -963,11 +963,11 @@ append console [encode [capture_catch poll]] ]]>
- +
- +
- -
\ No newline at end of file + + diff --git a/src/server/httpd/menu.xsl b/src/server/httpd/menu.xsl index 7b47d9e0..b54f16c7 100644 --- a/src/server/httpd/menu.xsl +++ b/src/server/httpd/menu.xsl @@ -2,7 +2,7 @@ ]> @@ -16,17 +16,17 @@ OpenOCD debugger - - - + + + - - + + set console "" set upload_filename /ram/upload - +
@@ -92,17 +92,17 @@ - + - + - + @@ -142,96 +142,96 @@ - - - - -
-   -
- - - - -

- - - - + + + + +
+   +
+ + + + +

+ + + + - - - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - - - + + + + + set toggle_details [formfetch toggle_details] + if {[string length $toggle_details]==0} { + set toggle_details 0 + } + set show_details [load_var show_details] + if {[string length $show_details]==0} { + set show_details 0 + } + if {$toggle_details==1} { + set show_details [expr 1-$show_details] + save_var show_details $show_details + } + + if {[string length $console]!=0} { + + + - - - if {$show_details==1} { - append buffer - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer ]]> - } else { - append buffer - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer ]]> - } - - + + + if {$show_details==1} { + append buffer + append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} + append buffer ]]> + } else { + append buffer + append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} + append buffer ]]> + } + + ?toggle_details=1 if {$show_details==1} { append buffer "Hide details" - append buffer
+ append buffer
} else { append buffer {
} append buffer "Show details" append buffer {
} }
-
- - if {$show_details==1} { - append buffer $console - } - + + + if {$show_details==1} { + append buffer $console + } + /td]]> - if {$show_details!=1} { - append buffer {} - } + if {$show_details!=1} { + append buffer {} + } - -
      
- +   + + - + } - - -
-   -
- - - + + +
+   +
+ + + @@ -240,56 +240,56 @@
- Documentation + Documentation
- - -   - - - + + +   + + + + + + + + + + OpenOCD Manual
+ - - - - - - OpenOCD Manual
- - - - - - - - - -
- - - - - + + + + + + + +
+ + + + + - + - - - - -   - - + + + + +   + + - + - + diff --git a/src/server/httpd/menuweb.css b/src/server/httpd/menuweb.css index ac87c85e..60c62393 100644 --- a/src/server/httpd/menuweb.css +++ b/src/server/httpd/menuweb.css @@ -70,7 +70,7 @@ body font-size: 12px; line-height: 15px; color : #024d67; - + } h1 @@ -86,7 +86,7 @@ td { padding: 0px; font-size: 12px; - vertical-align:top; + vertical-align:top; } @@ -95,7 +95,7 @@ td color: #cccccc; padding: 0px; font-size: 12px; - vertical-align:top; + vertical-align:top; } diff --git a/src/server/httpd/readme.txt b/src/server/httpd/readme.txt index bade32cb..7bc80e66 100644 --- a/src/server/httpd/readme.txt +++ b/src/server/httpd/readme.txt @@ -7,7 +7,7 @@ tcl with embedded html. sh build.sh -xalan.jar can be gotten from apache.org. +xalan.jar can be gotten from apache.org. 2. libmicrohttpd is a bit tricky to build under Cygwin: -- cgit v1.2.3