设为首页 加入收藏

TOP

RTEMS 的 MINI2440 QEMU 移植之bsp_libc_init与 rtems_libio_init
2014-11-24 11:17:49 来源: 作者: 【 】 浏览:0
Tags:RTEMS MINI2440 QEMU 移植 bsp_libc_init rtems_libio_init

这段时间疯子一样的做RTEMS的移植,一直未果,遇到如下问题。


1. bsp_libc_init 问题,执行之前


gdb 调试信息


ricky@ricky-laptop:~/rtems/rtems-4.9.5/examples-4.9.5/hello_world_c$ arm-rtems4.9-gdb o-optimize/hello.exe


GNU gdb 6.8


Copyright (C) 2008 Free Software Foundation, Inc.


License GPLv3+: GNU GPL version 3 or later


This is free software: you are free to change and redistribute it.


There is NO WARRANTY, to the extent permitted by law. Type "show copying"


and "show warranty" for details.


This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=arm-rtems4.9"...


(gdb) target remote :1234


Remote debugging using :1234


[New Thread 1]


0x30000000 in arm_reset_vect ()


(gdb) load


Loading section .text, size 0xe1d0 lma 0x30000100


Loading section .init, size 0x20 lma 0x3000e2d0


Loading section .jcr, size 0x4 lma 0x3000e2f0


Loading section .fini, size 0x1c lma 0x3000e2f4


Loading section .rodata, size 0xb08 lma 0x3000e310


Loading section .ctors, size 0x8 lma 0x3000ee18


Loading section .dtors, size 0x8 lma 0x3000ee20


Loading section .eh_frame, size 0x4 lma 0x3000ee28


Loading section .data, size 0xb18 lma 0x3000ee2c


Start address 0x30000100, load size 63556


Transfer rate: 12413 KB/sec, 1629 bytes/write.


(gdb) b bsp_libc_init


Breakpoint 1 at 0x30001104: file /home/ricky/rtems/rtems-4.9.5/rtems-4.9/c/src/lib/libbsp/arm/mini2440/../../shared/bsplibc.c, line 20.


(gdb) c


Continuing.



Breakpoint 1, bsp_libc_init (heap_start=0x3001bfa0, heap_size=66994272, sbrk_amount=0) at /home/ricky/rtems/rtems-4.9.5/rtems-4.9/c/src/lib/libbsp/arm/mini2440/../../shared/bsplibc.c:20


20 RTEMS_Malloc_Initialize( heap_start, heap_size, sbrk_amount );


(gdb)


执行结果



ricky@ricky-laptop:~/rtems/rtems-4.9.5/examples-4.9.5/hello_world_c$ sh qemu.sh


S3C: CLK=240 HCLK=240 PCLK=240 UCLK=57


QEMU: ee24c08_init


DM9000: INIT QEMU MAC : 52:54:00:12:34:56


QEMU mini2440_reset: loaded kernel o-optimize/hello.exe at 0x30000000


S3C: CLK=240 HCLK=60 PCLK=30 UCLK=57


S3C: CLK=400 HCLK=100 PCLK=50 UCLK=57




3. 只有simple_main是可以用的,说明了什么呢。





有做了些测试,发现 disable itron以后,可以用simple_main, 能说明什么问题呢?



ricky@ricky-laptop:~/rtems/rtems-4.9.5/examples-4.9.5/simple_main$ sh qemu.sh


S3C: CLK=240 HCLK=240 PCLK=240 UCLK=57


QEMU: ee24c08_init


DM9000: INIT QEMU MAC : 52:54:00:12:34:56


QEMU mini2440_reset: loaded kernel o-optimize/simple_main.exe at 0x30000000


S3C: CLK=240 HCLK=60 PCLK=30 UCLK=57


S3C: CLK=400 HCLK=100 PCLK=50 UCLK=57




*** HELLO WORLD TEST ***


Hello World


*** END OF HELLO WORLD TEST ***


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇ecos on QEMU for mini2440 编译.. 下一篇RTEMS Hello World for MINI2440 ..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Redis on AWS:Elast (2025-12-27 04:19:30)
·在 Spring Boot 项目 (2025-12-27 04:19:27)
·使用华为开发者空间 (2025-12-27 04:19:24)
·Getting Started wit (2025-12-27 03:49:24)
·Ubuntu 上最好用的中 (2025-12-27 03:49:20)