skyeye下開發s3c6410x程式:hello world的實現

來源:互聯網
上載者:User

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

本欄目更多精彩內容:http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.