U_BOOT移植时出现相关错误时解决办法
2011-11-21 10:45
465 查看
1.board.c:127: error: inline function 'coloured_LED_init' cannot be declared weak
board.c:129: error: inline function 'red_LED_on' cannot be declared weak
board.c:131: error: inline function 'red_LED_off' cannot be declared weak
board.c:133: error: inline function 'green_LED_on' cannot be declared weak
board.c:135: error: inline function 'green_LED_off' cannot be declared weak
board.c:137: error: inline function 'yellow_LED_on' cannot be declared weak
board.c:139: error: inline function 'yellow_LED_off' cannot be declared weak
board.c:141: error: inline function 'blue_LED_on' cannot be declared weak
board.c:143: error: inline function 'blue_LED_off' cannot be declared weak
make[1]: *** [board.o] 错误 1
make[1]: Leaving directory `/root/workspace/u-boot-2009.08/lib_arm'
make: *** [lib_arm/libarm.a] 错误 2
出现错误,内嵌函数不能被声明为weak属性,打开lib_arm/board.c,定位到127行开始,将其注释掉,修改后结果如下:
void inline __coloured_LED_init (void) {}
//void inline coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init")));
void inline __red_LED_on (void) {}
//void inline red_LED_on (void) __attribute__((weak, alias("__red_LED_on")));
void inline __red_LED_off(void) {}
//void inline red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
void inline __green_LED_on(void) {}
//void inline green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
void inline __green_LED_off(void) {}
//void inline green_LED_off(void)__attribute__((weak, alias("__green_LED_off")));
void inline __yellow_LED_on(void) {}
//void inline yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on")));
void inline __yellow_LED_off(void) {}
//void inline yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off")));
void inline __blue_LED_on(void) {}
//void inline blue_LED_on(void)__attribute__((weak, alias("__blue_LED_on")));
void inline __blue_LED_off(void) {}
//void inline blue_LED_off(void)__attribute__((weak, alias("__blue_LED_off")));
2.
cpu/arm920t/start.o: In function `start_code':
/root/workspace/u-boot-2009.08/cpu/arm920t/start.S:117: undefined reference to `coloured_LED_init'
/root/workspace/u-boot-2009.08/cpu/arm920t/start.S:118: undefined reference to `red_LED_on'
make: *** [u-boot] 错误 1
出现错误coloured_LED_init'未定义。打开cpu/arm920t/start.S,搜索“coloured_LED_init”定位到117行,找到如下代码:
bl coloured_LED_init
bl red_LED_on
将其注释掉
//这两行是AT91RM9200DK开发板的LED初始化,注释掉
//bl coloured_LED_init
//bl red_LED_on
然后执行清除、编译命令
board.c:129: error: inline function 'red_LED_on' cannot be declared weak
board.c:131: error: inline function 'red_LED_off' cannot be declared weak
board.c:133: error: inline function 'green_LED_on' cannot be declared weak
board.c:135: error: inline function 'green_LED_off' cannot be declared weak
board.c:137: error: inline function 'yellow_LED_on' cannot be declared weak
board.c:139: error: inline function 'yellow_LED_off' cannot be declared weak
board.c:141: error: inline function 'blue_LED_on' cannot be declared weak
board.c:143: error: inline function 'blue_LED_off' cannot be declared weak
make[1]: *** [board.o] 错误 1
make[1]: Leaving directory `/root/workspace/u-boot-2009.08/lib_arm'
make: *** [lib_arm/libarm.a] 错误 2
出现错误,内嵌函数不能被声明为weak属性,打开lib_arm/board.c,定位到127行开始,将其注释掉,修改后结果如下:
void inline __coloured_LED_init (void) {}
//void inline coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init")));
void inline __red_LED_on (void) {}
//void inline red_LED_on (void) __attribute__((weak, alias("__red_LED_on")));
void inline __red_LED_off(void) {}
//void inline red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
void inline __green_LED_on(void) {}
//void inline green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
void inline __green_LED_off(void) {}
//void inline green_LED_off(void)__attribute__((weak, alias("__green_LED_off")));
void inline __yellow_LED_on(void) {}
//void inline yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on")));
void inline __yellow_LED_off(void) {}
//void inline yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off")));
void inline __blue_LED_on(void) {}
//void inline blue_LED_on(void)__attribute__((weak, alias("__blue_LED_on")));
void inline __blue_LED_off(void) {}
//void inline blue_LED_off(void)__attribute__((weak, alias("__blue_LED_off")));
2.
cpu/arm920t/start.o: In function `start_code':
/root/workspace/u-boot-2009.08/cpu/arm920t/start.S:117: undefined reference to `coloured_LED_init'
/root/workspace/u-boot-2009.08/cpu/arm920t/start.S:118: undefined reference to `red_LED_on'
make: *** [u-boot] 错误 1
出现错误coloured_LED_init'未定义。打开cpu/arm920t/start.S,搜索“coloured_LED_init”定位到117行,找到如下代码:
bl coloured_LED_init
bl red_LED_on
将其注释掉
//这两行是AT91RM9200DK开发板的LED初始化,注释掉
//bl coloured_LED_init
//bl red_LED_on
然后执行清除、编译命令
相关文章推荐
- u-boot移植时出现inline function 'coloured_LED_init' cannot be declared weak及相关错误时的解决办法
- u-boot移植时出现inline function 'coloured_LED_init' cannot be declared weak及相关错误时的解决办法!
- u-boot移植时出现inline function 'coloured_LED_init' cannot be declared weak及相关错误时的解决办法!
- GCC编译uboot出现(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'错误的解决办法
- cygwin下git出现ca-bundle.crt相关错误的解决办法
- cygwin下git出现ca-bundle.crt相关错误的解决办法
- 用vs2010MVC2项目中创建数据库时报建立连接时出现与网络相关的或特定于实例的错误的解决办法
- Windows出现BOOT\BCD错误的解决办法
- SQL Server 2008建立连接时出现与网络相关的或特定于实例的错误的解决办法
- MTK8127源码编译出现的错误及相关解决办法
- MTK8127源码编译出现的错误及相关解决办法
- 安装VC++.6.0.with.SP6出现acmboot.exe错误的解决办法
- 编译linux内核时出现"mkimage" command not found - U-Boot images will not be built错误的解决办法
- cygwin下git出现ca-bundle.crt相关错误的解决办法
- 使用APMServ时出现“1、Apache启动失败,请检查相关配置。√MySQL5.1已启动。”错误的终极解决办法:
- SQL Server 2008建立连接时出现与网络相关的或特定于实例的错误的解决办法
- 移植uip-0.9到u-boot中出现undefined reference to `strstr'错误的解决过程
- SqlMetal 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误 (error: 26 - 定位指定的服务器/实例时出错) SQL SERVER 2008解决办法
- 附加数据库时出现,“错误5173:不能使文件与不同的数据库相关。”解决办法
- U-boot移植步骤详解_附:bin文件和所需文件(代码+流程图+遇到的错误及解决办法)