From 6e1184dcffaf807476ab312404c1bc0a32c38c36 Mon Sep 17 00:00:00 2001 From: oharboe Date: Mon, 22 Dec 2008 15:24:35 +0000 Subject: httpd wip git-svn-id: svn://svn.berlios.de/openocd/trunk@1271 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/server/httpd/browsemem.tcl | 2 - src/server/httpd/downloadmem.tcl | 6 +-- src/server/httpd/erase.tcl | 2 - src/server/httpd/flash.tcl | 2 - src/server/httpd/flashinfo.tcl | 2 - src/server/httpd/guiupload.tcl | 46 ++-------------------- src/server/httpd/httpd.tcl | 5 +++ src/server/httpd/index.tcl | 5 --- src/server/httpd/menu.xml | 85 +++++----------------------------------- src/server/httpd/openocd.tcl | 4 +- src/server/httpd/production.tcl | 2 - src/server/httpd/run.tcl | 2 - src/server/httpd/targets.tcl | 10 ++--- src/server/httpd/terminal.tcl | 2 - 14 files changed, 26 insertions(+), 149 deletions(-) (limited to 'src/server') diff --git a/src/server/httpd/browsemem.tcl b/src/server/httpd/browsemem.tcl index b34ff692..566643aa 100644 --- a/src/server/httpd/browsemem.tcl +++ b/src/server/httpd/browsemem.tcl @@ -12,8 +12,6 @@ append buffer { - - diff --git a/src/server/httpd/downloadmem.tcl b/src/server/httpd/downloadmem.tcl index 035ff3d9..6e9d00fb 100644 --- a/src/server/httpd/downloadmem.tcl +++ b/src/server/httpd/downloadmem.tcl @@ -14,8 +14,6 @@ append buffer { - - @@ -317,12 +315,12 @@ append buffer { - Download memory to ZY1000 from target.
+ Download memory from target.
Note that download memory can take a long time(potentially minutes for megabytes at low JTAG clk speeds).

Once the memory is downloaded a link is available on the page to download - the file from ZY1000 to your PC. + the file to your PC. diff --git a/src/server/httpd/erase.tcl b/src/server/httpd/erase.tcl index b48197f1..3c29840d 100644 --- a/src/server/httpd/erase.tcl +++ b/src/server/httpd/erase.tcl @@ -14,8 +14,6 @@ append buffer { - - diff --git a/src/server/httpd/flash.tcl b/src/server/httpd/flash.tcl index f7c8547b..6fd1cb16 100644 --- a/src/server/httpd/flash.tcl +++ b/src/server/httpd/flash.tcl @@ -14,8 +14,6 @@ append buffer { - - diff --git a/src/server/httpd/flashinfo.tcl b/src/server/httpd/flashinfo.tcl index 595c449d..7a208636 100644 --- a/src/server/httpd/flashinfo.tcl +++ b/src/server/httpd/flashinfo.tcl @@ -14,8 +14,6 @@ append buffer { - - OpenOCD debugger diff --git a/src/server/httpd/guiupload.tcl b/src/server/httpd/guiupload.tcl index 9b02c2ac..1911510c 100644 --- a/src/server/httpd/guiupload.tcl +++ b/src/server/httpd/guiupload.tcl @@ -14,8 +14,6 @@ append buffer { - - @@ -95,7 +93,7 @@ append buffer {

-Upload File to ZY1000 +Upload File
@@ -149,7 +147,7 @@ append buffer { -

Upload File to ZY1000

+

Upload File

@@ -171,7 +169,7 @@ append buffer { } } - append buffer {} + append buffer {
Filename on ZY1000
} append buffer {
Filename on OpenOCD machine
File to upload
} append buffer {
 
 
} append buffer {
} @@ -302,43 +300,7 @@ append buffer { - - -

The ZY1000 has three filing systems "/rom", "/ram" and "/config". "/rom" is a read only filing - embedded into the firmware.

- -

Use "/ram" to store temporary files.

- -

- You can browse filing systems and download files by pointing your web browser to: -

-

- -

- You can also upload files using e.g. curl from the command line. Example: -

- - curl --form form_filecontent=@/tmp/myfile.elf --form form_filename=/ram/myfile.elf } -append buffer [ip] -append buffer {upload.tcl - -

- If you have a tftp server installed on your development PC, you can access - files on your developer PC using a /tftp/ip/ prefix to the file to be accessed - on your developer PC. Note that if you do not increase the default packet - size for your tftp server, then the performance will be very poor. Normal - performance is about 500-600kBytes/s. -

- - cp /tftp/10.0.0.106/build/src/openocd /ram/test - - - - + diff --git a/src/server/httpd/httpd.tcl b/src/server/httpd/httpd.tcl index b5794114..607660cc 100644 --- a/src/server/httpd/httpd.tcl +++ b/src/server/httpd/httpd.tcl @@ -106,3 +106,8 @@ proc capture_catch {a} { } result return $result } + +proc zy1000_flash {} { + set t [lindex 0 [ocd_flash_banks]] + return $t(base) +} diff --git a/src/server/httpd/index.tcl b/src/server/httpd/index.tcl index 91e7e3fb..f450ce0f 100644 --- a/src/server/httpd/index.tcl +++ b/src/server/httpd/index.tcl @@ -298,10 +298,7 @@ append buffer { 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.

-

Power on - Turn on ZY1000 target power relay.

-

Power off - Turn off ZY1000 target power relay.

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

-

Reboot ZY1000 - Reboots ZY1000 unit. Type "help reboot" in telnet.

@@ -325,8 +322,6 @@ append buffer { - - diff --git a/src/server/httpd/menu.xml b/src/server/httpd/menu.xml index cf286e23..11daef94 100644 --- a/src/server/httpd/menu.xml +++ b/src/server/httpd/menu.xml @@ -87,10 +87,7 @@ 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.

-

Power on - Turn on ZY1000 target power relay.

-

Power off - Turn off ZY1000 target power relay.

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

-

Reboot ZY1000 - Reboots ZY1000 unit. Type "help reboot" in telnet.

]]> @@ -108,13 +105,13 @@ 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 Zylin provides. + is embedded into the openocd.cfg file in the sampls OpenOCD provides.

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 @@ -133,33 +130,6 @@ - - reload.tcl - index.tcl - Reload Config Scripts - - - set form_action [formfetch form_action] - - if {[string compare $form_action "Reload"]==0} { - append buffer "Reloading Config Scripts...

" - reboot - } - -

- -
- - ]]>
- - Restart ZY1000 to reload selected target config script. - - - - - flashinfo.tcl @@ -789,12 +759,12 @@ append console [encode [capture_catch poll]] ]]> + Download memory from target.
Note that download memory can take a long time(potentially minutes for megabytes at low JTAG clk speeds).

Once the memory is downloaded a link is available on the page to download - the file from ZY1000 to your PC. + the file to your PC. ]]> @@ -811,9 +781,9 @@ append console [encode [capture_catch poll]] openocd.tcl - + @@ -869,7 +839,7 @@ append console [encode [capture_catch poll]] guiupload.tcl openocd.tcl - Upload File to ZY1000 + Upload File Filename on ZY1000} + append buffer {} append buffer {
Filename on OpenOCD machine
File to upload
} append buffer {
 
 
} append buffer {
} @@ -897,41 +867,6 @@ append console [encode [capture_catch poll]] ]]>
- - The ZY1000 has three filing systems "/rom", "/ram" and "/config". "/rom" is a read only filing - embedded into the firmware.

- -

Use "/ram" to store temporary files.

- -

- You can browse filing systems and download files by pointing your web browser to: -

-

- -

- You can also upload files using e.g. curl from the command line. Example: -

- - curl --form form_filecontent=@/tmp/myfile.elf --form form_filename=/ram/myfile.elf append buffer [ip]upload.tcl - -

- If you have a tftp server installed on your development PC, you can access - files on your developer PC using a /tftp/ip/ prefix to the file to be accessed - on your developer PC. Note that if you do not increase the default packet - size for your tftp server, then the performance will be very poor. Normal - performance is about 500-600kBytes/s. -

- - cp /tftp/10.0.0.106/build/src/openocd /ram/test - - - ]]> -
@@ -946,13 +881,13 @@ append console [encode [capture_catch poll]] 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 Zylin provides. + is embedded into the openocd.cfg file in the sampls OpenOCD provides.

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 diff --git a/src/server/httpd/openocd.tcl b/src/server/httpd/openocd.tcl index fe1d195d..cb28026e 100644 --- a/src/server/httpd/openocd.tcl +++ b/src/server/httpd/openocd.tcl @@ -14,8 +14,6 @@ append buffer { - - @@ -91,7 +89,7 @@ append buffer {

-Upload File to ZY1000 +Upload File
diff --git a/src/server/httpd/production.tcl b/src/server/httpd/production.tcl index 654c6311..8172800b 100644 --- a/src/server/httpd/production.tcl +++ b/src/server/httpd/production.tcl @@ -14,8 +14,6 @@ append buffer { - - diff --git a/src/server/httpd/run.tcl b/src/server/httpd/run.tcl index 1a00eb97..1ce78132 100644 --- a/src/server/httpd/run.tcl +++ b/src/server/httpd/run.tcl @@ -14,8 +14,6 @@ append buffer { - - diff --git a/src/server/httpd/targets.tcl b/src/server/httpd/targets.tcl index 3df16367..f56746f8 100644 --- a/src/server/httpd/targets.tcl +++ b/src/server/httpd/targets.tcl @@ -105,13 +105,13 @@ append buffer { A target needs an openocd.cfg file. This config file sets up - the CPU, flash and reset init script. Either ZY1000 ships with an + the CPU, flash and reset init script. Either OpenOCD ships with an openocd.cfg file for your target or you need to take an existing config file and modify it for your needs.

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 Zylin provides. + is embedded into the openocd.cfg file in the sampls OpenOCD provides.

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 @@ -260,8 +260,6 @@ append buffer { - - @@ -392,13 +390,13 @@ append buffer { A target needs an openocd.cfg file. This config file sets up - the CPU, flash and reset init script. Either ZY1000 ships with an + the CPU, flash and reset init script. Either OpenOCD ships with an openocd.cfg file for your target or you need to take an existing config file and modify it for your needs.

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 Zylin provides. + is embedded into the openocd.cfg file in the sampls OpenOCD provides.

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 diff --git a/src/server/httpd/terminal.tcl b/src/server/httpd/terminal.tcl index 707ddd0f..5032e124 100644 --- a/src/server/httpd/terminal.tcl +++ b/src/server/httpd/terminal.tcl @@ -14,8 +14,6 @@ append buffer { - - -- cgit v1.2.3