>> ocd_mem2array/ocd_array2mem don't want work on my system, they throw
>> an error:
>>    Error: mem2array: no command context

ØH> Fixed in the master branch.

I've installed master branch and mem2array works fine, thanks!

Now I'm trying to write a TCL-function which would write flash from
image:

I want to read image from TCL script.
I wrote
    set fh [ open file_name r ]

but caught this error:
    invalid command name "open"

openocd has stripped TCL, so I must use 'Image loading commands'

I RTFMed a bit and found the function:

load_image filename address min_address length

I though to use it in cycle (expanded):

    # first block
    load_image filename $flash_addr 0 512
    # downloaded 500 bytes in 0.545993s (0.894 KiB/s)
    write_block_command 0

    # second block
    load_image filename [ expr $flash_addr - 512 ] 512 1024
    # downloaded 0 bytes in 0.000067s (0.000 KiB/s)
    write_block_command 1

    # third block
    load_image filename [ expr $flash_addr - 512 ] 1024 1536
    # downloaded 0 bytes in 0.000058s (0.000 KiB/s)
    write_block_command 2

    ... etc

But this function doesn't return any information. How can I understand
that I must finish writting operation?

It is a closed disk: If I want write flash from script I must have a
driver which was hard-integrated into openocd.

My hardware is allow me to write memory cells/read/run/stop/etc. But I
can't program its flash. I'm sad :(

The 'manual' driver would be an ideal solution :)

-- 
... mpd is off

. ''`.                               Dmitry E. Oboukhov
: :’  :   email: un...@debian.org jabber://un...@uvw.ru
`. `~’              GPGKey: 1024D / F8E26537 2006-11-21
  `- 1B23 D4F8 8EC0 D902 0555  E438 AB8C 00CF F8E2 6537

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to