首页 / 操作系统 / Linux / 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 makesudo PATH=/opt/rtems-4.9/bin:$PATH make install 2.编译yield_flash export PATH=/opt/rtems-4.9/bin:$PATHexport RTEMS_MAKEFILE_PATH=/opt/rtems-4.9/arm-rtems4.9/mini2440 cd ~/rtems/rtems-4.9.5/examples-4.9.5/yield_flashmake cleanmake 3.用MINI2440的QEMU 开启gdb stub ./qemu-system-arm -S -s -M mini2440 -m 128M -kernel o-optimize/test.exe -show-cursor -serial stdioS3C: CLK=240 HCLK=240 PCLK=240 UCLK=57QEMU: ee24c08_initDM9000: INIT QEMU MAC : 52:54:00:12:34:56QEMU mini2440_reset: loaded kernel o-optimize/test.exe at 0x300000004.用arm-rtems4.9-gdb 加载yield_flash 的test.exe arm-rtems4.9-gdb o-optimize/test.exe GNU gdb 6.8Copyright (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:1234Remote debugging using :1234[New Thread 1]0x30000000 in arm_reset_vect ()(gdb) loadLoading section .text, size 0xe650 lma 0x30000100Loading section .init, size 0x20 lma 0x3000e750Loading section .jcr, size 0x4 lma 0x3000e770Loading section .fini, size 0x1c lma 0x3000e774Loading section .rodata, size 0xb20 lma 0x3000e790Loading section .ctors, size 0x8 lma 0x3000f2b0Loading section .dtors, size 0x8 lma 0x3000f2b8Loading section .eh_frame, size 0x4 lma 0x3000f2c0Loading section .data, size 0xb30 lma 0x3000f2c4Start address 0x30000100, load size 64756Transfer rate: 12647 KB/sec, 1618 bytes/write.(gdb) cContinuing. 5. 去qemu的那个终端中看运行结果S3C: CLK=240 HCLK=240 PCLK=240 UCLK=57QEMU: ee24c08_initDM9000: INIT QEMU MAC : 52:54:00:12:34:56QEMU mini2440_reset: loaded kernel o-optimize/test.exe at 0x30000000S3C: CLK=240 HCLK=60 PCLK=30 UCLK=57S3C: CLK=400 HCLK=100 PCLK=50 UCLK=5Task1 is generating lots of outputTask2 is generating lots of outputTask1 is generating lots of outputTask2 is generating lots of outputTask1 is generating lots of outputTask2 is generating lots of outputTask1 is generating lots of outputTask2 is generating lots of outputTask1 is generating lots of outputTask2 is generating lots of outputTask1 is generating lots of outputTask2 is generating lots of outputTask1 is generating lots of outputTask2 is generating lots of outputTask1 is generating lots of outputTask2 is generating lots of outputTask1 is generating lots of outputTask2 is generating lots of outputTask1 is generating lots of outputTask2 is generating lots of outputTask1 is generating lots of outputTask2 is generating lots of outputTask1 is generating lots of outputTask2 is generating lots of output最后,增加真相,贴个图