flashing and executing on str736

I use OpenOCD r 115 and str736.

I need to write a binary in flash (approximately 7KB).

my configuration script is:

#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface ft2232
ft2232_device_desc "Signalyzer A"
ft2232_layout signalyzer
ft2232_vid_pid 0x0403 0xbca0
jtag_speed 0

#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst 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_halt 0 arm7tdmi
run_and_halt_time 0 30

working_area 0 0xA0002000 0x2000 nobackup

#flash bank <driver> <base> <size> <chip_width> <bus_width>
flash bank str7x 0x80000000 0x00010000 0 0 STR73x 0

the device has 16KB SRAM, and I had assigne half (8KB) as working area, but while flashing OpenOCD report this:

Warning: target.c:535 target_alloc_working_area(): not enough working area available

Once writing is done I try to run my program using reset and resume command, but nothing happen. But if I turn off and then on the power it works.

So why it doesn’t work with reset/resume?

Could this problem be related to lackness of working area?

How do I need to set the working area in configuration script?

thanks

ps: the same problem happened with OpenOCD r 100

That warning isn’t really a problem. The str7x flashing code tries to allocate a buffer as large as possible, starting with 8kB and then divides the size by two until it succeeds. In addition to the buffer a few byte (80) are required to hold the flash algorithm itself, so the first try with 8kB fails if you only have 8kB working_area.

I remember having a similar problem with a STR711, but I’m not really sure why. I’ll investigate this problem when I find some time, until then you should be safe if you shut the OpenOCD down after flashing and restart it. The flashing itself should have worked properly.

Regards,

Dominic