blackfin ulinux中添加應用程序

以HELLO WORLD爲例:hello.c和Makefile文件可以自己編寫。

1.在/home/zxg/uClinux-dist/user/目錄下建立test文件夾,並把hello.c和Makefile文件拷貝到文件夾下。

2.進入/home/zxg/uClinux-dist/user/目錄,在Makefile文件中增加一行語句

dir_$(CONFIG_USER_HELLO_WORLD)              += test

3.進入/home/zxg/uClinux-dist/config目錄,在Configure.help目錄中增加

CONFIG_USER_HELLO_WORLD

  A simple hello world program      這行僅僅是說明,可以隨意寫

4.在上面目錄中修改config.in文件,增加

#############################################################################

mainmenu_option next_comment

comment 'My Applications'

bool 'test'                     CONFIG_USER_HELLO_WORLD

comment 'My Applications'

endmenu

#############################################################################

5.  然後make menuconfig進入目錄

a.按實際選取Vendor/Product Selection

       b.進入Kernel/Library/Defaults Selection目錄,選取Customize Vendor/User Settings。一定要選中這一項。

       c.然後退出,選Yes…………..

       d.再彈出對話框時進入My hello,選中hello,然後退出,選Yes…………..

6.  make

7.  編譯完成之後,/home/zxg/uClinux-dist/image/uImage即爲內核鏡像文件。

8.  通過串口下載到SDRAM:loadb 0x01000000(注意:使用的是kermit協議)。

9.  啓動內核:bootm。用戶的應用程序在/bin/目錄下。

 

                                                                                                                  zxg623

                                                                                                                2007-10-19

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章