OpenOCD work area


Work areas are small RAM areas associated with CPU targets. They are used by OpenOCDto speed up downloads,
and to download small snippets of code to program flash chips. Ifthe chip includes a form of “on-chip-ram” - and
many do - define a work area if you can.Again using the at91sam7 as an example, this can look like:
$_TARGETNAME configure -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0

-work-area-backup (‘0’|‘1’) – says whether the work area gets backed up; bydefault, it is not backed up.
When possible, use a working area that doesn’t needto be backed up, since performing a backup slows down
operations. For example,the beginning of an SRAM block is likely to be used by most build systems, butthe end
is often unused.

-work-area-size size – specify work are size, in bytes. The same size appliesregardless of whether its physical or
virtual address is being used.

-work-area-phys address – set the work area base address to be used when noMMU is active.

-work-area-virt address – set the work area base address to be used when anMMU is active. Do not specify a value
for this except on targets with an MMU.The value should normally correspond to a static mapping for the
-work-area-physaddress, set up by the current operating system.

work area是一小块内存区域。它们被用来OpenOCD下载加速,并下载小片段代码进行flash芯片编程。如果芯片包含一个片上RAM,
并有多余的空间,你可以定义一个work area,在此以at91sam7作为例子:
$_TARGETNAME configure -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0

-work-area-backup (‘0’|‘1’) -指定是否备份work area;默认情况下,它是不备份的。通常使用work area并不需要进行备份,
因为执行备份会导致操作变慢。例如,For example,the beginning of an SRAM block is likely to be used by most build systems,
but the end is often unused.

-work-area-size size -指定work area大小,单位为字节。申请指定大小,而不管物理或虚拟地址已经被使用。

-work-area-phys address -当无MMU时用来设置work area基址

-work-area-virt address -当有MMU时用来设置work area基址。除带MMU的目标,否则不要指定这个值。
该值通常应于一个-work-area-phys address对应,通过当前操作系统进行设置。

posted @ 2011-04-15 10:46  阿C  阅读(603)  评论(0编辑  收藏  举报