On Wed, Oct 27, 2010 at 10:53 PM, Freddie Chopin <freddie_cho...@op.pl> wrote:
> Hi!
>
> Someone has asked me for help with using OpenOCD + STM32F100 (8kB of RAM).
> After some time I've come to conclusion that the problem was caused by
> incorrect workareasize value, which in stm32.cfg is defined to be 16kB. With
> std cfg files flashing the device resulted in:
>
>> Error: JTAG-DP STICKY ERROR
>> Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x20002004
>> Error: JTAG-DP STICKY ERROR
>> Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x20002004
>> Warn : Block write error address 0x20002000, wcount 0xc
>
> The flashing actually works, but is extremely slow (rate < 200B/s). Changing
> the workareasize to 2kB helps - everything works normally then.

We should probably change it to the least common denominator within
the family, which is 8kB (maybe even 6?). Definitely, if you don't see
any significant reduction in flashing speed after reducing the
workareasize (8kB vs 2kB). That's likely dependent on the adapter in
use, of course.

> However, I've always thought that OpenOCD somehow finds the amount of RAM
> that is available on the chip and will not allocate more than is possible?
> Am I wrong?

Yes. Early silicon had a SRAM size register in factory programmed ROM
but it was later removed for some reason. I don't think OpenOCD used
it even when it existed. We could probably determine the size
indirectly, maybe from a chip id database, but I think it's just as
good to simply provide a minimum safe workareasize and let the user
override it if he wishes.

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

Reply via email to