Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6384390
  • 博文数量: 579
  • 博客积分: 1548
  • 博客等级: 上尉
  • 技术积分: 16634
  • 用 户 组: 普通用户
  • 注册时间: 2012-12-12 15:29
个人简介

http://www.csdn.net/ http://www.arm.com/zh/ https://www.kernel.org/ http://www.linuxpk.com/ http://www.51develop.net/ http://linux.chinaitlab.com/ http://www.embeddedlinux.org.cn http://bbs.pediy.com/

文章分类

全部博文(579)

文章存档

2018年(18)

2015年(91)

2014年(159)

2013年(231)

2012年(80)

分类: 嵌入式

2014-03-10 11:18:47

uboot版本:uboot-1.1.6


以linux为例:
    Armlinux.c (u-boot-1.1.6\lib_arm) 中,

点击(此处)折叠或打开

  1. #include <common.h>
  2. #include <command.h>
  3. #include <image.h>
  4. #include <zlib.h>
  5. #include <asm/byteorder.h>
  6. #ifdef CONFIG_HAS_DATAFLASH
  7. #include <dataflash.h>
  8. #endif

  9. DECLARE_GLOBAL_DATA_PTR;

DECLARE_GLOBAL_DATA_PTR的定义如下:
    Global_data.h (u-boot-1.1.6\include\asm-arm) 

点击(此处)折叠或打开

  1. #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r8")
含义:定义了一个结构体 gd_t类型的指针gd变量,并把该变量的地址存储在寄存器 r8 中



阅读(4455) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~