本文主要是介绍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 <http://gnu.org/licenses/gpl.html>
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 ***
这篇关于RTEMS 的 MINI2440 QEMU 移植之bsp_libc_init与 rtems_libio_init的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!