Problems with str750 flash

I successfuly launched debugging of STR750 in RAM using YAGARTO and OPENOCD and everything is working fine. I started with the STR7test example and changed addressing for STR750. However, I have problems when working on flash.

My first question is:

How to change the STR7test example to get a .bin file for the flash? What files should be changed?

The second problem is connected with the programming process. I tried to program some .bin file into the flash and got:

failed writing file test.bin to flash bank 0 at offset 0x00000000

flash program error

in telnet

and

Warning: target.c:537 target_alloc_working_area(): not enough working area avail

able

Warning: target.c:537 target_alloc_working_area(): not enough working area avail

able

Error: armv4_5.c:584 armv4_5_run_algorithm(): timeout waiting for algorithm to

complete, trying to halt target

Error: str7x.c:539 str7x_write_block(): error executing str7x flash write algo

rithm

Error: str7x.c:627 str7x_write(): flash writing failed with error code: 0xe600

0010

in console

when I try to erase I got:

flash erase error

in telnet

and

Error: str7x.c:352 str7x_erase(): error erasing flash bank, FLASH_ER: 0xe6000010

in console

I tried to change jtag_speed even to 100 and I get the same errors.

The memory and flash banks are set to:

working_area 0 0x40000000 0x4000 nobackup

flash bank str7x 0x20000000 0x00040000 0 0 STR75x 0

I will be grateful for any suggestions or help