12.07.2015 Views

RealView - ARM Information Center

RealView - ARM Information Center

RealView - ARM Information Center

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

使 用 分 散 加 载 描 述 文 件示 例 5-12 放 置 节FLASH 0x24000000 0x4000000{... ; rest of code}ADDER 0x08000000{adder.o (foo)}; select section foo from adder.o使 用 __at 节 将 节 放 在 特 定 地 址 中可 以 为 节 指 定 一 个 特 殊 名 称 , 以 编 码 必 须 将 其 放 置 到 的 地 址 。 您 可 以 按 以 下 方式 指 定 名 称 :.<strong>ARM</strong>.__at_address其 中 :address是 所 需 的 节 地 址 。 可 以 按 十 六 进 制 或 十 进 制 指 定 此 地 址 。 采 用.<strong>ARM</strong>.__at_address 格 式 的 节 是 由 缩 写 __at 引 用 的 。在 编 译 器 中 , 通 过 使 用 属 性 section() 显 式 地 命 名 __at 节 , 或 者 使 用 属 性 __at 设置 节 名 称 , 可 以 将 变 量 分 配 给 这 些 节 。 例 如 , 以 下 语 句 将 变 量 放 在 名 为.<strong>ARM</strong>.__at_0x8000 的 节 中 :int variable __attribute__((section(".<strong>ARM</strong>.__at_0x8000"))) = 10;int variable __attribute__((__at(0x8000))) = 10;请 参 阅 《 编 译 器 参 考 指 南 》 中 的 第 4-40 页 的 变 量 属 性 。限 制• __at 节 地 址 范 围 不 能 重 叠 , 除 非 将 重 叠 节 放 在 不 同 的 重 叠 区 中• 不 允 许 在 与 位 置 无 关 的 执 行 区 中 使 用 __at 节• 不 能 引 用 __at 节 的 链 接 器 定 义 的 符 号 $$Base、$$Limit 和 $$Length• 不 能 在 System V 和 BPABI 可 执 行 文 件 和 BPABI DLL 中 使 用 __at 节• __at 节 地 址 必 须 是 其 对 齐 边 界 的 倍 数• __at 节 忽 略 任 何 +FIRST 或 +LAST 排 序 约 束 。5-36 版 权 所 有 © 2007 <strong>ARM</strong> 公 司 。 保 留 所 有 权 利 。 <strong>ARM</strong> DUI 0349AC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!