UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 17151

11.1 EDK - PowerPC のキャッシュを使用せずにプログラムを独自にリンクおよび実行する方法について

説明

キーワード : XPS, GNU, PPC, EST, リンク, キャッシュ

PowerPC のキャッシュを使用せずにプログラムを独自にリンクおよび実行する方法について

ソリューション

次の GNU リンカ スクリプトを使用すると、PowerPC のキャッシュを使用せずにアプリケーションをリンクできます。

//
// XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"
// SOLELY FOR USE IN DEVELOPING PROGRAMS AND SOLUTIONS FOR
// XILINX DEVICES. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION
// AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION
// OR STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS
// IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,
// AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE
// FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY DISCLAIMS ANY
// WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE
// IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR
// REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
// INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE.
//
// (c) Copyright 2002 Xilinx, Inc.
// All rights reserved.
//
//---------------------------------------------------------------------------*/

_STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 4k;
_HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 4k;

MEMORY
{
icache : ORIGIN = 0x70000000, LENGTH = 16k - 4
boot : ORIGIN = 0x70003ffc, LENGTH = 4
dcache : ORIGIN = 0x78000000, LENGTH = 16k
}

ENTRY(_boot)
STARTUP(boot.o)
GROUP(libxil.a libc.a)

SECTIONS
{

.vectors :
{
. = ALIGN(64k);
*(.vectors)
} > icache

.text :
{
*(.boot0)
*(.text)
} > icache

.data :
{
*(.data)
*(.got2)
*(.rodata)
*(.fixup)
} > dcache

/* small data area (read/write): keep together! */
.sdata :
{
*(.sdata)
} > dcache

.sbss :
{
. = ALIGN(4);
*(.sbss)
. = ALIGN(4);
} > dcache
__sbss_start = ADDR(.sbss);
__sbss_end = ADDR(.sbss) + SIZEOF(.sbss);


/* small data area 2 (read only) */
.sdata2 :
{
*(.sdata2)
} > dcache

.bss :
{
. = ALIGN(4);
*(.bss)
*(COMMON)
. = ALIGN(4);
__bss_end = .;

/* add stack and align to 16 byte boundary */
. = . + _STACK_SIZE;
. = ALIGN(16);
__stack = .;

/* add heap and align to 16 byte boundary */
_heap_start = .;
. = . + _HEAP_SIZE;
. = ALIGN(16);
_heap_end = .;

} > dcache
__bss_start = ADDR(.bss);


/* .boot must be at the end and it must be mapped to the last
address in the instruction cache. Writing to the last address
triggers the tools (GDB, svf2elf) to commit the previous write
accesses.
*/

.boot :
{
*(.boot)
} > boot

}


次の PDF ファイルに、このフローが記述されています。
http://www.xilinx.com/txpatches/pub/documentation/misc/ppc405_cache.pdf


AR# 17151
日付 12/15/2012
ステータス アクティブ
種類 一般
このページをブックマークに追加