EmbDev.net

Forum: ARM programming with GCC/GNU tools Yagarto - OpenOCD r423 : flash write (write_binary) not work


Author: Thomas Schulte (1stern)
Posted on:

Rate this post
0 useful
not useful
Hello friends,

I installed the r423 and found out that the flash command ist not
accepting further keywords like write or the newer command write_binary.

Any idea ?

Am I doing s.th. wrong?

Regards
Thomas

Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 useful
not useful
OpenOCD ist currently a very "moving target". Can you check if flash
write_image does work for you (i.e. flash write_image test.bin 0 bin)?

Author: Thomas Schulte (1stern)
Posted on:

Rate this post
0 useful
not useful
Martin Thomas wrote:
> OpenOCD ist currently a very "moving target". Can you check if flash
> write_image does work for you (i.e. flash write_image test.bin 0 bin)?

write_image ALSO MISSING. This is coming out:
Open On-Chip Debugger (2008-03-01 20:00 CET) svn: 423
$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk $
Info:    options.c:50 configuration_output_handler(): Command
write_image not found

I am using the provided sam7s_jtagkey.cfg.

I added only 2 lines to it

flash write_image 0 main.bin 0x0
shutdown

------------------------------------------------
# tell gdb our flash memory map
# and enable flash programming
gdb_memory_map enable
gdb_flash_program enable

#interface
interface ft2232
ft2232_device_desc "Amontec JTAGkey A"
ft2232_layout jtagkey
ft2232_vid_pid 0x0403 0xcff8
jtag_speed 0
jtag_nsrst_delay 200
jtag_ntrst_delay 200


#use combined on interfaces or targets that can't set TRST/SRST
separately
reset_config srst_only srst_pulls_trst

#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe

#target configuration
daemon_startup reset

#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little run_and_init 0 arm7tdmi
run_and_halt_time 0 30

target_script 0 reset
C:\Development\openocd\bin\scripts\sam7s256\sam7s_reset.script

flash write_image 0 main.bin 0x0  # program the onchip flash

working_area 0 0x00200000 0x4000 nobackup

#flash bank <driver> <base> <size> <chip_width> <bus_width>
flash bank at91sam7 0 0 0 0 0

# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=O...

shutdown

Author: Thomas Schulte (1stern)
Posted on:

Rate this post
0 useful
not useful
Martin Thomas wrote:
> OpenOCD ist currently a very "moving target". Can you check if flash
> write_image does work for you (i.e. flash write_image test.bin 0 bin)?

flash probe hat es auch erwischt %-)

Wahrscheinlich betrifft es das ganze flash ...

Übrigens, im cmd window, openocd-ftd2xx.exe -c help
erscheint für flash und eine Reihe anderer Kandidaten:
"no help available"

Vielleicht ein Hinweis?

Grußt
Thomas

Author: Michael Fischer (mifi)
Posted on:

Rate this post
0 useful
not useful
Hello Thomas,

it is working here, I have checked it again with my sam7s256 target.

"flash probe 0" works, and even "flash write_image".

If you like contact me direct to solve your problem. We can
make the result here public.

Regards,

Michael

Author: Jonathan Dumaresq (dumarjo)
Posted on:

Rate this post
0 useful
not useful
Thomas Schulte wrote:
> Hello friends,
>
> I installed the r423 and found out that the flash command ist not
> accepting further keywords like write or the newer command write_binary.
>
> Any idea ?
>
> Am I doing s.th. wrong?
>
> Regards
> Thomas

Same problem here with sam7x devices.

Could be great to have a solution for this. right now I use the r247 and
it's work

Jonathan

Author: Helmut Jansen (jah4711)
Posted on:

Rate this post
0 useful
not useful
Michael Fischer wrote:
> Hello Thomas,
>
> it is working here, I have checked it again with my sam7s256 target.
>
> "flash probe 0" works, and even "flash write_image".
>
> If you like contact me direct to solve your problem. We can
> make the result here public.
>
> Regards,
>
> Michael

Hi everybody,
I have the same problems with OpenOCD r423 and newer.
Do you have any solution or information ?

Regards,
Helmut

Author: Jonathan Dumaresq (dumarjo)
Posted on:

Rate this post
0 useful
not useful
Helmut Jansen wrote:
> Michael Fischer wrote:
>> Hello Thomas,
>>
>> it is working here, I have checked it again with my sam7s256 target.
>>
>> "flash probe 0" works, and even "flash write_image".
>>
>> If you like contact me direct to solve your problem. We can
>> make the result here public.
>>
>> Regards,
>>
>> Michael
>
> Hi everybody,
> I have the same problems with OpenOCD r423 and newer.
> Do you have any solution or information ?

yeah, look in the pdf that comes with Yagarto, you will see the new
command sets.

Jonathan

>
> Regards,
> Helmut

Author: Helmut Jansen (jah4711)
Posted on:

Rate this post
0 useful
not useful
Hi Jonathan,
thanks for this answer, but the pdf comes with openocd !

I have already read the manual and changed the
"DEPRECATED" Flash wite command to flash write_binary.
The result is "command not found".


**** Build of configuration Default for project
demo_at91sam7_blink_flash ****

make -k program
Flash Programming with OpenOCD...
'C:/Programme/openocd-r520/bin/'openocd-ftd2xx.exe -f
'C:/Programme/openocd-r520/bin/'at91sam7s256-jtagkey-flash-program.cfg
# program the onchip FLASH here
Open On-Chip Debugger (2008-03-22 12:00 CET) svn: r520
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/
Info:    jtag.c:1329 jtag_examine_chain(): JTAG device found: 0x3f0f0f0f
(Manufacturer: 0x787, Part: 0xf0f0, Version: 0x3)
Warning: jtag.c:902 jtag_add_reset(): requested reset would assert trst
Info:    target.c:240 target_init_handler(): executing reset script
'script.ocd'
Info:    options.c:50 configuration_output_handler(): core state: ARM
Info:    options.c:50 configuration_output_handler(): Command
write_binary not found
Warning: jtag.c:902 jtag_add_reset(): requested reset would assert trst
Info:    target.c:240 target_init_handler(): executing reset script
'script.ocd'
Info:    options.c:50 configuration_output_handler(): core state: ARM
Info:    options.c:50 configuration_output_handler(): Command
write_binary not found



Regards,
Helmut


Jonathan Dumaresq wrote:

> yeah, look in the pdf that comes with Yagarto, you will see the new
> command sets.
>
> Jonathan
>
>>
>> Regards,
>> Helmut

Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Helmut Jansen wrote:
> I have already read the manual and changed the
> "DEPRECATED" Flash wite command to flash write_binary.
> The result is "command not found".

flash write_binary is not longer available in newer versions of Openocd
as far as I can see (not just "will be gone soon" but gone). Search the
pdf for flash write_bank which should be the "drop-in" replacement, also
see flash write_image.

In my opinion the old commands should have been kept for compatiblity as
long as possible but obviously the developers wanted to clean up the
code. So we "end-users" have to live with it.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.