




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、arm s3c44b0x vxworks 底層 bsp 開發(fā)yeahkai2006.08.31主要內(nèi)容arm 體系結(jié)構(gòu) vxworks bsp bsp 開發(fā)過程調(diào)試經(jīng)驗開發(fā)工具hitool for armtornado 2.2 for armads 1.2 / gnu tool chain 串口調(diào)試助手ida 反編譯工具開發(fā)文檔 samsung s3c44b0x datasheet micetek ev44b0-ii 開發(fā)板硬件電路圖tornado 幫助文檔網(wǎng)卡 flash 、 ram 等 datasheet參考 bsp : wind river sbc arm7 bsp for samsun
2、gs ks32c50100 (s3c4510b)amine 思創(chuàng)黃金開發(fā)板 s3c44b0x vxworks bsp 移植筆記什么是 bspbsp board support package為vxworks提供與硬件環(huán)境的主要接口bsp 職責:上電硬件初始化為vxworks訪問硬件提供支持在vxworks中集成與硬件相關(guān)以及硬件無關(guān)的軟件bsp構(gòu)成源文件、頭文件、makefile文件派生文件二進制驅(qū)動模塊文件vxworks bsp目錄結(jié)構(gòu)寄存器與主板配置: s3c44b0x.h wrsbcarm.h 時鐘:sngks32ctimer.c中斷: sngks32cintrctl.c串口:sysse
3、rial.c sngks32csio.c 系統(tǒng)庫函數(shù): syslib.c啟動與初始化rominit.s (rominit()函數(shù),上電后運行的第一個函數(shù))bootinit.c (romstart(),完成從rom到ram的復制) 等網(wǎng)絡(luò):confignet.h lan91c111.c flash及tffs文件系統(tǒng): systffs.c mbm29lv160te.c硬件環(huán)境ev44b0-ii 功能模塊地址分配samsung 8m sdram8 段 led ( 0x6000000h )pdiusbd12lan91c113 10m/100m 網(wǎng)卡 s3c44b0x 內(nèi)部寄存器mbm29lv160te
4、70 16m(1m*16)bit如何入手從最簡單的程序開始跑馬燈共陽極地址 0x6000000 mov r0,#0x600000 mov r1,#leddata str r1,r0; led_roll.s; roll led arm asm code for ads 1.2area led, code ;str led addr to r0ldr r0, =0x06000000loop;led show 0ldr r1, =0x12000000 str r1, r0; delay for some time ldr r1, =0x0000ffffdelay1subr1, r1, #1cmp r
5、1, #0bnedelay1;led offldr r1, =0xff000000str r1, r0;delay for some time ldr r1, =0x0000ffffdelay2subr1, r1, #1cmpr1, #0bnedelay2b loopendmakefile# makefile - test led project and show how to use makefile#*# display a hint of how to make first targetall:echo hint: you can type make led to build first
6、 target #*# compile and link led_out.s, then convert .axf - .bin file led:armasm led_roll.s -o led_roll.oarmlink -ro-base 0x0 -entry 0x0 led_roll.o -o led_roll.axf fromelf led_roll.axf -bin -output led_roll.bin#*# clean up all temp file except source file clean:rm -f *.o rm -f *.axf rm -f *.bin rm -
7、f *.elfmakefile 使用更詳細的makefilerules說明請參考相關(guān)文檔在 ads 里開發(fā) arm 程序用 hitool 燒寫入 flash單步調(diào)試逐漸深入arm 系統(tǒng)寄存器配置配置目的寄存器設(shè)置值禁止看門狗s3c44b0xwtcon0禁止中斷s3c44b0x_intmsk0x07ffffff等待pll穩(wěn)定時間 sbcarm7locktime0xffffin=10mhz fout=66mhzsbcarm7pllcon(m_div12)+(p_divfout = (8+ m_div)*fout/(2+p_div)*24)+s_div) pllset.exe所有單元時鐘使能sbca
8、rm7clkcon0x7ff8存儲器控制器 13個寄存器 stmia r0, r1-r13存儲器控制器配置rom and ram configurationldr r0, =smrdataldmia r0, r1-r13ldr r0, =0x01c80000 ; bwscon addressstmia r0, r1-r13smrdata datadcd 0x11110090 ; bwscon;bank0=om1:0 bank1,47=16bit bank2,3=8bitdcd 0x00000600 ; gcs0;romdcd 0x00007ffc ; gcs1;lan91c113dcd 0x0
9、0007ffc ; gcs2;usbdcd 0x00007ffc ; gcs3;leddcd 0x00007ffc ; gcs4dcd 0x00007ffc ; gcs5dcd 0x00018000; gcs6, sdram(trcd=2,scan=8)dcd 0x00018000 ; gcs7,sdram(trcd=2,scan=8)dcd 0x00860000 + 1019 ; refresh(refen=1, trefmd=0, trp=2, trc=5, tchr=3,refcnt = 2048 + 1 - mclk(mhz) * 15.6*/)dcd 0x16 ;sclk power
10、 mode, bank6/7 memory map, 8mb/8mbdcd 0x20 ; mrsr 6(cl=2)dcd 0x20 ; mrsr 7(cl=2)開發(fā)順序指導1.最基本的vxworks運行環(huán)境時鐘、中斷、串口2.修改makefile與config.h,不要牽涉過多的外圍硬件3.依照datasheet定義cpu寄存器及系統(tǒng)配置參數(shù)頭文件4.*從rominit開始按照vxworks啟動順序進行修改5.*修改時鐘、中斷、串口6.在tsfs加載啟動后,在vxworks環(huán)境中調(diào)試其它硬件makefilecpu tool= armarch4= diabconfig_all = $(tgt_d
11、ir)configmicetek_s3c44b0xalltarget_dir = micetek_s3c44b0xvendor board= ioe_no1= s3c44b0xrom_text_adrs = 00000000 # rom entry addressrom_warm_adrs= 00000004 # rom warm entry addressrom_size = 00080000 # number of bytes of rom spaceram_low_adrs= 0c001000 #ram text/data address(bootrom)ram_high_adrs= 0
12、c500000 #ram text/data address(bootrom)mach_extra=#mach_extra= mbm29lv160te.o lan91c111end.oconfig.h#define default_boot_line tsfs(0,0) host:vxworks h=09 tn=micetek#define console_tty0#define console_baud_rate 38400#define include_tsfs_boot#define wdb_comm_type wdb_comm_serial#define wdb_
13、tty_baud38400#define wdb_tty_channel1#define wdb_tty_dev_name/tyco/1#undef include_flash #undef include_lcd #undef include_led #undef include_network #undef include_endvxworks啟動順序幾個映像的概念vxworksvxworksbootimageimage(boot code)loadable imagesvxworksrom images“burned” intoram rom-based imagesrom or loa
14、ded- compressed/uncompressed. rom-resident o flash.vxwork啟動順序(1)與vxworks映像類型相關(guān)上電后最初的初始化步驟都是相同同的,與vxworks映像類型無關(guān)上電后,處理器跳到rom或flash中的啟動代碼入口啟動代碼完成:禁止中斷配置目標機存儲器裝載適當?shù)膙xworks映像數(shù)據(jù)段運行初始化代碼,使目標機處于靜止狀態(tài)vxwork啟動順序(2)loadable vxworks image bootstrap code executes and loads text and data segments of boot
15、 code (from rom or flash) into ram.scenarios are: boot code compressed - decompression during copy boot code uncompressed - copy boot code is rom-resident - copy data segment only boot program executes and loads vxworks image into ram. jumps to vxworks load point. system initialization code statical
16、ly linked into loaded vxworks image executes and completes initialization.啟動過程圖示vxworks system memory layout (arm)啟動各步驟對應(yīng)的文件非壓縮壓縮基本模塊的編寫時鐘中斷串口使用tsfs方式啟動vxworks為后續(xù)硬件添加支持網(wǎng)卡實現(xiàn)網(wǎng)絡(luò)下載與調(diào)試flashtffs文件系統(tǒng),vxworks存儲,cfiled鍵盤lcdbsp添加對led的支持config.h#define include_ledsysled.c sysled.c完成led的驅(qū)動接口#define led_address
17、0x06000000extern void led_display(unsigned char data);syslib.c#ifdef include_led #include “sysled.c” #endif /* include_lcd */網(wǎng)卡與bsp的接口#ifdef include_lan91c111_end#define end_lan91c111_load_func lan91c111load #define end_lan91c111_buff_loan 1 /*:*/ #define end_lan91c111_load_string 0x2000300:0x18:0x1
18、8:0x2:0x3100:0x08:0x01:0x3e:0x21:0xc7:0xf8 import end_obj * end_lan91c111_load_func (char *, void*); #endif /* include_lan91c111_end */end_tbl_entry enddevtbl =#ifdef include_lan91c111_end0, end_lan91c111_load_func, end_lan91c111_load_string, end_lan91c111_buff_loan, null, false, #endif 0, end_tbl_end, null, 0, null, false, ;makefile添加 mach_extra = lan91c111end.o調(diào)試經(jīng)驗iceida,objdumparm最基本的vxworks在vxworks下調(diào)試外圍硬件中斷的調(diào)試中斷調(diào)試技巧學習vxworks的方法vxsim、vmware一臺普通的x86計算機(完整的
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- T-ZNZ 264.2-2024 重金屬中度污染農(nóng)田土壤修復和安全利用技術(shù)規(guī)范 第2部分:超積累東南景天與中稻輪作
- T-ZZB 3744-2024 制革用陰離子型磺化油
- T-ZMDS 20008-2024 醫(yī)療器械嵌入式軟件漏洞評估方法
- 2025年度解除農(nóng)業(yè)合作項目的聲明書
- 二零二五年度綠化苗木購銷與城市綠化養(yǎng)護服務(wù)合同
- 二零二五年度實習教師與教育機構(gòu)教育咨詢服務(wù)合同
- 二零二五年度共享住宅租賃正規(guī)協(xié)議書范本及環(huán)保要求
- 二零二五年度勞動合同主體變更及培訓交接服務(wù)合同
- 2025年度水產(chǎn)養(yǎng)殖水質(zhì)改良與養(yǎng)魚合同
- 二零二五年度人社部員工勞動合同勞動合同電子簽名與認證合同
- 4.城軌工程項目勞務(wù)分包指導價(車站.盾構(gòu).鋪軌)4
- 2024年安全生產(chǎn)網(wǎng)絡(luò)知識競賽題庫及答案(共五套)
- 普通工安全技術(shù)操作規(guī)程交底注意事項(8篇)
- 2025屆江蘇省十三大市高三沖刺模擬歷史試卷含解析
- DataOps 實踐指南 2.0白皮書
- 供電所班組建設(shè)方案
- 委托處置不良資產(chǎn)協(xié)議(三篇)
- 中鐵建新員工培訓
- 2024年02月國家鐵路局事業(yè)單位招考聘用27人筆試歷年(2016-2023年)真題薈萃帶答案解析
- 機加工安全教育培訓
- 星巴克運營管理手冊
評論
0/150
提交評論