Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1336671
  • 博文数量: 198
  • 博客积分: 1629
  • 博客等级: 上尉
  • 技术积分: 2743
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-01 15:41
文章分类
文章存档

2023年(6)

2022年(20)

2021年(8)

2020年(3)

2018年(17)

2017年(3)

2016年(3)

2015年(9)

2014年(13)

2013年(17)

2012年(77)

2011年(22)

分类: 嵌入式

2013-09-18 16:17:55

问题:
undefined reference to `get_ticks'
undefined reference to `get_tbclk'
undefined reference to `get_ticks'

解决:
diff --git a/arch/microblaze/cpu/timer.c b/arch/microblaze/cpu/timer.c
index a167755..1952804 100644
--- a/arch/microblaze/cpu/timer.c
+++ b/arch/microblaze/cpu/timer.c
@@ -62,3 +62,21 @@  int timer_init (void)
 }
 #endif
 #endif
+
+/*
+ * This function is derived from PowerPC code (read timebase as long long).
+ * On Microblaze it just returns the timer value.
+ */
+unsigned long long get_ticks(void)
+{
+ return get_timer(0);
+}
+
+/*
+ * This function is derived from PowerPC code (timebase clock frequency).
+ * On Microblaze it returns the number of timer ticks per second.
+ */
+ulong get_tbclk(void)
+{
+ return CONFIG_SYS_HZ;
+}

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