赞
踩
examples | 示例工程,包括应用程序工程、内核模块工程、库工程 |
examples-bsp | 示例BSP工程 |
libraries | 开源库工程 |
operating-system | SylixOS操作系统工程、SylixOS Base工程 |
tools-patch | 工具与补丁等 |
virtual-machine | 虚拟机 |
cd /d/sylixos_workspace
git clone http://git.sylixos.com/repo/sylixos-base.git git clone http://git.sylixos.com/repo/bspmini2440.git git clone http://git.sylixos.com/repo/examples.git git clone http://git.sylixos.com/repo/tools.git git clone http://git.sylixos.com/repo/qemu-mini2440.git
cd sylixos-base git submodule init git submodule update
其他语言程序的开发工具。
到D:\SylixIDE\yagarto-tools-20121018目录,
D:\SylixIDE\arm-none-eabi-gcc\arm-none-eabi\include\sys目录替换原有的文件。
到D:\SylixIDE\eclipse目录,提示文件夹合并时,请点击“是”按钮。
然后点击OK按钮,Eclipse会切换工作空间到D:\sylixos_workspace目录,如下:
在弹出的对话框中选择General下的Existing Projects into Workspace,如下:
并且勾选bspmini2440和examples及sylixos-base工程,如下:
sylixos_preference.epf是我们配制的Eclipse代码样式文件,导入它来书写代码,我们就可以轻松地书写出符合SylixOS规范的代码,
这将有助于你未来向SylixOS组织提交代码,所以我们强烈建议你也导入该代码样式文件。
并且选中Import All,最后点击Finish按钮:
编译sylixos-base工程,编译耗费的时间视你的机器的性能而定,一般需要10分钟。
和xsiipc.ko、符号表文件symbol.c和symbol.h(位于D:\sylixos_workspace\sylixos-base\libsylixos\Debug目录)。
最后生成ELF文件bspmini2440.elf和二进制文件bspmini2440.bin(位于D:\sylixos_workspace\bspmini2440\Debug目录)。
(位于D:\sylixos_workspace\examples\hello_library\Debug目录)。
Qemu for mini2440虚拟机。
start qemu-system-arm.exe -M mini2440 -show-cursor -kernel ../bspmini2440/Debug/bspmini2440.bin -serial telnet:127.0.0.1:1200,server -mtdblock nand.bin -serial file:virtualkbd -net nic -net tap,ifname=virtual,vlan=1 start putty.exe telnet://127.0.0.1:1200/
指定了kernel镜像为../bspmini2440/Debug/bspmini2440.bin,指定了串口为telnet服务器:127.0.0.1:1200,
指定了网卡的接口名为virtual,指定了Nand Flash镜像文件为nand.bin。
ifconfig
FTP客户端向目标板传输文件,如应用程序可执行文件等。
可以看到该目录有我们之前编译应用程序示例工程hello_world生成的应用程序可执行文件hello_world,
将其拖动到右侧的SylixOS目标板文件列表的/apps目录,即可将其传输到SylixOS目标板的/apps目录。
将libvpmpdm.so拖动到右侧的SylixOS目标板文件列表的/lib目录,即可将其传输到SylixOS目标板的/lib目录。
[root@sylixos_station:/]# cd /apps/ [root@sylixos_station:/apps]# ./hello_world hello world (base on sylixos)!
可以看到该目录有我们之前编译内核模块示例工程hello_module生成内核模块文件hello_module.ko,
将其拖动到右侧的SylixOS目标板文件列表的/lib/modules目录,即可将其传输到SylixOS目标板的/lib/modules目录。
内核模块文件hello_module.ko进内核:
[root@sylixos_station:/apps]# cd /lib/modules/ [root@sylixos_station:/lib/modules]# modulereg hello_module.ko hello_module init! module hello_module.ko register ok, handle : 0x30c5da78
[root@sylixos_station:/lib/modules]# modules NAME HANDLE TYPE GLB BASE SIZE SYMCNT ------------------------------ -------- ------ --- -------- -------- -------- VPROCESS: kernel pid: 0 TOTAL MEMORY: 8192 + hello_module.ko 30c5da78 KERNEL YES c00d1000 c4 2 total modules : 1
arm-none-eabi-gdb
reset
target remote localhost:1234 load
start qemu-system-arm.exe -s -S -M mini2440 -show-cursor -serial telnet:127.0.0.1:1200,server -mtdblock nand.bin -serial file:virtualkbd -net nic -net tap,ifname=virtual start putty.exe telnet://127.0.0.1:1200/
target remote localhost:1234 Remote debugging using localhost:1234 0x00000000 in ?? () load Loading section .text, size 0x32f6fc lma 0x30000000 Loading section .ARM.exidx, size 0x8 lma 0x3032f6fc Loading section .ctors, size 0x8 lma 0x3032f704 Loading section .dtors, size 0x8 lma 0x3032f70c Loading section .data, size 0x282cc lma 0x3032f714 Start address 0x30000000, load size 3504608 Transfer rate: 497 KB/sec, 2028 bytes/write.
#connect to J-Link GDB Server target remote localhost:2331 #reset target monitor reset #select endian monitor endian little #initialize memory controler monitor long 0x53000000 = 0x00000000 monitor long 0x4a000008 = 0xFFFFFFFF monitor long 0x4a00001c = 0x00007FFF monitor long 0x4c000000 = 0x00FFFFFF monitor long 0x4c000014 = 0x00000005 monitor long 0x4c000004 = 0x0007F021 monitor long 0x48000000 = 0x12111110 monitor long 0x48000004 = 0x00000700 monitor long 0x48000008 = 0x00000700 monitor long 0x4800000c = 0x00000700 monitor long 0x48000010 = 0x00000700 monitor long 0x48000014 = 0x00000700 monitor long 0x48000018 = 0x00000700 monitor long 0x4800001c = 0x00018005 monitor long 0x48000020 = 0x00018005 monitor long 0x48000024 = 0x009804EC monitor long 0x48000028 = 0x000000B2 monitor long 0x4800002c = 0x00000030 monitor long 0x48000030 = 0x00000030 #wait for moment monitor sleep 20 #load the debug image load #set cpu to svc mode(on cpu reset) monitor reg cpsr = 0xd3 #debug in ram monitor reg pc = 0x30000000 #debug begin
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。