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

最后,增加真相,贴个图


相关内容