RTEMS yield_flash on MINI2440 QEMU

发现很多事情是不能理解的,我今天重新编译了一下我的MINI2440,发现其实多任务是可以用的,唯独那个hello world让程序死掉。

问题还会继续找,先把用qemu调试的方法告诉大家:

 

(原创文章,欢迎转载,请注明出处,谢谢。)


1. 编译MINI2440BSP(bug解决点以后我会发上来)

 

重新生成configuration

 

cd /rtems/rtems-4.9.5/rtems-4.9

./bootstrap -c

./bootstrap

 

编译BSP

 

cd ~/rtems/rtems-4.9.5/rtems-build

 

~/rtems/rtems-4.9.5/rtems-4.9/configure --target=arm-rtems4.9 --disable-posix --disable-itron --disable-cxx --enable-networking --enable-rtemsbsp="mini2440" --enable-tests=samples --prefix=/opt/rtems-4.9

 

make

sudo PATH=/opt/rtems-4.9/bin:$PATH make install

 

2.编译yield_flash

 

export PATH=/opt/rtems-4.9/bin:$PATH

export RTEMS_MAKEFILE_PATH=/opt/rtems-4.9/arm-rtems4.9/mini2440

 

cd ~/rtems/rtems-4.9.5/examples-4.9.5/yield_flash

make clean

make

 

3.用MINI2440的QEMU 开启gdb stub

 

./qemu-system-arm -S -s -M mini2440 -m 128M -kernel o-optimize/test.exe -show-cursor -serial stdio

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/test.exe at 0x30000000
4.用arm-rtems4.9-gdb 加载yield_flash 的test.exe

 

arm-rtems4.9-gdb o-optimize/test.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 0xe650 lma 0x30000100

Loading section .init, size 0x20 lma 0x3000e750

Loading section .jcr, size 0x4 lma 0x3000e770

Loading section .fini, size 0x1c lma 0x3000e774

Loading section .rodata, size 0xb20 lma 0x3000e790

Loading section .ctors, size 0x8 lma 0x3000f2b0

Loading section .dtors, size 0x8 lma 0x3000f2b8

Loading section .eh_frame, size 0x4 lma 0x3000f2c0

Loading section .data, size 0xb30 lma 0x3000f2c4

Start address 0x30000100, load size 64756

Transfer rate: 12647 KB/sec, 1618 bytes/write.

(gdb) c

Continuing.

 

5. 去qemu的那个终端中看运行结果
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/test.exe at 0x30000000
S3C: CLK=240 HCLK=60 PCLK=30 UCLK=57
S3C: CLK=400 HCLK=100 PCLK=50 UCLK=5
Task1 is generating lots of output
Task2 is generating lots of output
Task1 is generating lots of output
Task2 is generating lots of output
Task1 is generating lots of output
Task2 is generating lots of output
Task1 is generating lots of output
Task2 is generating lots of output
Task1 is generating lots of output
Task2 is generating lots of output
Task1 is generating lots of output
Task2 is generating lots of output
Task1 is generating lots of output
Task2 is generating lots of output
Task1 is generating lots of output
Task2 is generating lots of output
Task1 is generating lots of output
Task2 is generating lots of output
Task1 is generating lots of output
Task2 is generating lots of output
Task1 is generating lots of output
Task2 is generating lots of output
Task1 is generating lots of output
Task2 is generating lots of output

 

最后,增加真相,贴个图


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值