设为首页 加入收藏

TOP

skyeye下开发s3c6410x程序之----编写helloworld
2014-11-24 08:24:42 来源: 作者: 【 】 浏览:1
Tags:skyeye 开发 s3c6410x 程序 ---- 编写 helloworld

helloworld.c文件如下:


根据s3c6410x的硬件信息可知uart0的发送寄存器地址为0x7f005020


/*************************************************************************
>File Name: helloworld.c
>Author: muge0913
>Mail: muge0913@sina.com
>Created Time: 2013年02月12日星期二 15时33分11秒
************************************************************************/
#defineUTXH0 ((volatile unsigned int *)(0x7f005020))
voidhelloworld(){
constchar * p = "helloworld--muge0913\n";
while(*p){
*UTXH0= *p++;
}
while(1);
}


skyeye.conf:


#skyeyeconfig file for s3c6410,os_test
arch:arm
cpu:arm11
mach:s3c6410x
#physicalmemory
mem_bank:map=M,type=RW,addr = 0x00000000,size =0x00800000,file=./helloworld.bin
#allperiherals IO mapping area
mem_bank:map=I,type=RW,addr = 0x70000000,size = 0x10000000
uart:mod= term


注:把内存的只是从0x00处开始是因为arm处理器上电后从0x00处开始运行。file=表示预先加载到这片内存的镜像文件。boot=yes表示默认从此处启动


编译:


arm-elf-gcc-O2 -c helloworld.c
arm-elf-ld-e helloworld -Ttext 0x00 helloword.o helloword
arm-elf-objcopy-O binary helloworld helloword.bin


运行测试


$skyeye-main.py
$start
$run



】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Android--框架布局 下一篇C语言产生随机数

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·如何理解c语言指针和 (2025-12-27 01:19:11)
·为什么C标准库没有链 (2025-12-27 01:19:08)
·玩转C语言和数据结构 (2025-12-27 01:19:05)
·MySQL 基础入门视频 (2025-12-26 23:20:22)
·小白入门:MySQL超详 (2025-12-26 23:20:19)