VxWorks6.6动态创建RTP例程

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

VxWorks6.6动态创建RTP例程
VxWorks6.6中的RTP程序与WINDOWS的exe程序类似,我们可以使⽤操作系统的进程创建函数API,在程序中动态创建和调⽤。

下⾯主要通过Download Kernel moudle来测试该API使⽤,整个调试过程与Tornado2.2基本相似,具体操作流程如下⾯描述。

1、创建Downloadable Kernel module⼯程
2、新建main.cpp⽂件
3、main.cpp代码如下
24.
4、编译⼯程
Build Started in Project 'testvxe': 2011-09-23 17:05:40
Generation of makefiles started.
Generation of makefiles finished (Elapsed Time: 00:00).
Platform: Wind River VxWorks 6.6
Command: make --no-print-directory BUILD_SPEC=SIMNTdiab DEBUG_MODE=1 TRACE=1
Working Directory: C:/openSUSE3000/fep/code/test_sys/testvxe/SIMNTdiab
if [ ! -d "`dirname "testvxe_partialImage/Debug/Objects/testvxe/main.o"`" ]; then mkdir -p "`dirname
"testvxe_partialImage/Debug/Objects/testvxe/main.o"`"; fi;echo "building
testvxe_partialImage/Debug/Objects/testvxe/main.o"; dcc -g -tX86LH:vxworks66 -W:c:,-Xclib-optim-off -Xansi -Xlocal-data-area-static-only -Xforce-declarations -Xmake-dependency=0xd -IC:/WindRiver3.6/vxworks-6.6/target/h -
IC:/WindRiver3.6/vxworks-6.6/target/h/wrn/coreip -DCPU=SIMNT -DTOOL_FAMILY=diab -DTOOL=diab -
D_WRS_KERNEL -o "testvxe_partialImage/Debug/Objects/testvxe/main.o" -c
"C:/openSUSE3000/fep/code/test_sys/testvxe/main.cpp"
building testvxe_partialImage/Debug/Objects/testvxe/main.o
if [ ! -d "`dirname "testvxe_partialImage/Debug/testvxe_partialImage.o"`" ]; then mkdir -p "`dirname
"testvxe_partialImage/Debug/testvxe_partialImage.o"`"; fi;echo "building
testvxe_partialImage/Debug/testvxe_partialImage.o"; dld -tX86LH:vxworks66 -X -r5 -f 0x90,1,1 -o
"testvxe_partialImage/Debug/testvxe_partialImage.o" testvxe_partialImage/Debug/Objects/testvxe/main.o && if [ "0" = "1" ]; then plink "testvxe_partialImage/Debug/testvxe_partialImage.o";fi
building testvxe_partialImage/Debug/testvxe_partialImage.o
if [ ! -d "`dirname "testvxe/Debug/testvxe.out"`" ]; then mkdir -p "`dirname "testvxe/Debug/testvxe.out"`"; fi;echo "building testvxe/Debug/testvxe.out";rm -f "testvxe/Debug/testvxe.out";ddump -Ng
testvxe_partialImage/Debug/testvxe_partialImage.o | tclsh C:/WindRiver3.6/vxworks-
6.6/host/resource/hutils/tcl/munch.tcl -c pentium > testvxe/Debug/ctdt.c; dcc -g -tX86LH:vxworks66 -Xdollar-in-ident -Xforce-declarations -IC:/WindRiver3.6/vxworks-6.6/target/h -IC:/WindRiver3.6/vxworks-6.6/target/h/wrn/coreip -DCPU=SIMNT -DTOOL_FAMILY=diab -DTOOL=diab -D_WRS_KERNEL -o testvxe/Debug/ctdt.o -c testvxe/Debug/ctdt.c; dld -tX86LH:vxworks66 -X -r5 -f 0x90,1,1 -r4 -o "testvxe/Debug/testvxe.out" testvxe/Debug/ctdt.o
testvxe_partialImage/Debug/testvxe_partialImage.o && if [ "0" = "1" ]; then plink "testvxe/Debug/testvxe.out";fi
building testvxe/Debug/testvxe.out
make: built targets of C:/openSUSE3000/fep/code/test_sys/testvxe/SIMNTdiab
Build Finished in Project 'testvxe': 2011-09-23 17:05:44 (Elapsed Time: 00:04)
5、启动仿真器
6、下载⼆进制⽂件
从左边⼯程树⽬录中的testvxe->Binaries找到testvxe.out⽂件,⿏标右键时从弹出的菜单中选择下载“Download”即可。

7、调试设置
在main.cpp中的11⾏(…const char *argv[]…)处设置断点,⿏标右键时从弹出的菜单中选择“Debug kernel task”,在Entry Point 填⼊main函数。

执⾏“Debug”按钮即进⼊调试状态。

8、调试过程
9、vxsim0执⾏效果。

相关文档
最新文档