[root@centos7 hello_world_c]# qemu-system-aarch64 -no-reboot -serial null -serial mon:stdio -net none -nographic -M xilinx-zynq-a9 -m 256M -kernel o-optimize/hello.exe qemu-system-aarch64: GLib: g_mapped_file_unref: assertion 'file != NULL' failed
改成低版本rtems
[root@centos7 rtems]# git checkout 5 Branch 5 set up to track remote branch 5 from origin. Switched to a new branch '5' [root@centos7 rtems]# ./waf bsp_list -bash: ./waf: No such file or directory [root@centos7 rtems]# ls acinclude.m4 bootstrap c config.ini config.sub depcomp INSTALL LICENSE.BSD-2-Clause LICENSE.JFFS2 MAINTAINERS Makefile.maint README rtemslogo.png aclocal bsps compile config.ini.bak configure.ac Doxyfile install-sh LICENSE.CC-BY-SA-4.0 LICENSE.NET make mdate-sh rtems-bootstrap testsuites automake build config.guess config-ml.in cpukit gccdeps.pyc LICENSE LICENSE.GPL-2.0 LICENSE.RPCXDR Makefile.am missing rtems-bsps [root@centos7 rtems]#
[root@centos7 rtems]# ./bootstrap -c removing automake generated Makefile.in files removing configure files removing aclocal.m4 files [root@centos7 rtems]# ./rtems-bootstrap RTEMS Bootstrap, 1.0 1/121: autoreconf: configure.ac 2/121: autoreconf: c/configure.ac 3/121: autoreconf: c/src/configure.ac 4/121: autoreconf: c/src/lib/libbsp/arm/configure.ac 5/121: autoreconf: c/src/lib/libbsp/arm/altera-cyclone-v/configure.ac 6/121: autoreconf: c/src/lib/libbsp/arm/atsam/configure.ac 7/121: autoreconf: c/src/lib/libbsp/arm/beagle/configure.ac 8/121: autoreconf: c/src/lib/libbsp/arm/csb336/configure.ac 9/121: autoreconf: c/src/lib/libbsp/arm/csb337/configure.ac 10/121: autoreconf: c/src/lib/libbsp/arm/edb7312/configure.ac 11/121: autoreconf: c/src/lib/libbsp/arm/gumstix/configure.ac 12/121: autoreconf: c/src/lib/libbsp/arm/imx/configure.ac 13/121: autoreconf: c/src/lib/libbsp/arm/lm3s69xx/configure.ac 14/121: autoreconf: c/src/lib/libbsp/arm/lpc176x/configure.ac 15/121: autoreconf: c/src/lib/libbsp/arm/lpc24xx/configure.ac 16/121: autoreconf: c/src/lib/libbsp/arm/lpc32xx/configure.ac
[root@centos7 xilinx_zynq_a9_qemu]# $HOME/development/rtems/kernel/rtems/configure --prefix=$HOME/development/rtems/compiler/6 --enable-maintainer-mode --target=rtems-aarch64 --enable-rtemsbsp=xilinx_zynq_a9_qemu --enable-tests --enable-posix --disable-networking --enable-cxx
checking for gmake... gmake
checking for RTEMS Version... 5.0.0
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking target system type... Invalid configuration `rtems-aarch64': machine `rtems' not recognized
configure: error: /bin/sh /root/development/rtems/kernel/rtems/./config.sub rtems-aarch64 failed
[root@centos7 xilinx_zynq_a9_qemu]#
改成
[root@centos7 xilinx_zynq_a9_qemu]# $HOME/development/rtems/kernel/rtems/configure --prefix=$HOME/development/rtems/compiler/6 --enable-maintainer-mode --target=aarch64-rtems --enable-rtemsbsp=xilinx_zynq_a9_qemu --enable-tests --enable-posix --disable-networking --enable-cxx checking for gmake... gmake checking for RTEMS Version... 5.0.0 checking build system type... aarch64-unknown-linux-gnu checking host system type... aarch64-unknown-linux-gnu checking target system type... aarch64-unknown-rtems checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether gmake sets $(MAKE)... yes checking whether gmake supports nested variables... yes checking whether to enable maintainer-specific portions of Makefiles... yes configure: error: BSP 'xilinx_zynq_a9_qemu' architecture does not match the --target architecture, run 'rtems-bsps' (in the top of the source tree) for a valid BSP list [root@centos7 xilinx_zynq_a9_qemu]#
[root@centos7 xilinx_zynq_a9_qemu]# ls arm-rtems5 config.log config.status Makefile [root@centos7 xilinx_zynq_a9_qemu]#
[root@centos7 rtems]# ./rtems-bsps -P arm/altcycv_devkit arm/atsamv arm/bbxm arm/beagleboardorig arm/beagleboardxm arm/beagleboneblack arm/beaglebonewhite arm/csb336 arm/csb337 arm/csb637 arm/kit637_v6 arm/edb7312 arm/gumstix arm/imx7 arm/lm3s3749 arm/lm3s6965 arm/lm3s6965_qemu arm/lm4f120 arm/lpc1768_mbed arm/lpc1768_mbed_ahb_ram arm/lpc1768_mbed_ahb_ram_eth arm/lpc17xx_ea_ram arm/lpc17xx_ea_rom_int arm/lpc17xx_plx800_ram arm/lpc17xx_plx800_rom_int arm/lpc2362 arm/lpc23xx_tli800 arm/lpc24xx_ea arm/lpc24xx_ncs_ram arm/lpc24xx_ncs_rom_ext arm/lpc24xx_ncs_rom_int arm/lpc24xx_plx800_ram arm/lpc24xx_plx800_rom_int arm/lpc40xx_ea_ram arm/lpc40xx_ea_rom_int arm/lpc32xx_mzx arm/lpc32xx_mzx_stage_1 arm/lpc32xx_mzx_stage_2 arm/lpc32xx_phycore arm/raspberrypi arm/raspberrypi2 arm/realview_pbx_a9_qemu arm/rtl22xx arm/rtl22xx_t arm/smdk2410 arm/stm32f105rc arm/stm32f4 arm/tms570ls3137_hdk arm/tms570ls3137_hdk_intram arm/tms570ls3137_hdk_sdram arm/tms570ls3137_hdk_with_loader arm/xen_virtual arm/xilinx_zynq_a9_qemu arm/xilinx_zynq_zc702 arm/xilinx_zynq_zc706 arm/xilinx_zynq_zedboard arm/xilinx_zynqmp_ultra96 bfin/TLL6527M bfin/bf537Stamp bfin/eZKit533
改成master支持aarch64
参考https://docs.rtems.org/branches/master/user/bsps/bsps-aarch64.html
[root@centos7 rtems]# git branch --all * 5 master remotes/origin/4.10 remotes/origin/4.11 remotes/origin/4.8 remotes/origin/4.9 remotes/origin/5 remotes/origin/HEAD -> origin/master remotes/origin/master [root@centos7 rtems]# git checkout master Switched to branch 'master' [root@centos7 rtems]# ./waf bsp_list Regenerate build specification cache (needs a couple of seconds)... aarch64/a53_ilp32_qemu aarch64/a53_lp64_qemu aarch64/a72_ilp32_qemu aarch64/a72_lp64_qemu aarch64/xilinx_versal_ilp32_qemu aarch64/xilinx_versal_ilp32_vck190 aarch64/xilinx_versal_lp64_qemu aarch64/xilinx_versal_lp64_vck190 aarch64/xilinx_zynqmp_ilp32_qemu aarch64/xilinx_zynqmp_ilp32_zu3eg aarch64/xilinx_zynqmp_lp64_qemu aarch64/xilinx_zynqmp_lp64_zu3eg
[root@centos7 rtems]# ./waf bsp_defaults --rtems-bsps=aarch64/a53_lp64_qemu > config.ini [root@centos7 rtems]# ./waf configure --prefix=$HOME/development/rtems/compiler/6 Setting top to : /root/development/rtems/kernel/rtems Setting out to : /root/development/rtems/kernel/rtems/build Configure board support package (BSP) : aarch64/a53_lp64_qemu Checking for program 'aarch64-rtems6-gcc' : /root/development/rtems/compiler/6/bin/aarch64-rtems6-gcc Checking for program 'aarch64-rtems6-g++' : /root/development/rtems/compiler/6/bin/aarch64-rtems6-g++ Checking for program 'aarch64-rtems6-ar' : /root/development/rtems/compiler/6/bin/aarch64-rtems6-ar Checking for program 'aarch64-rtems6-ld' : /root/development/rtems/compiler/6/bin/aarch64-rtems6-ld Checking for program 'ar' : /root/development/rtems/compiler/6/bin/aarch64-rtems6-ar Checking for program 'g++, c++' : /root/development/rtems/compiler/6/bin/aarch64-rtems6-g++ Checking for program 'ar' : /root/development/rtems/compiler/6/bin/aarch64-rtems6-ar Checking for program 'gas, gcc' : /root/development/rtems/compiler/6/bin/aarch64-rtems6-gcc Checking for program 'ar' : /root/development/rtems/compiler/6/bin/aarch64-rtems6-ar Checking for program 'gcc, cc' : /root/development/rtems/compiler/6/bin/aarch64-rtems6-gcc Checking for program 'ar' : /root/development/rtems/compiler/6/bin/aarch64-rtems6-ar Checking for asm flags '-MMD' : yes Checking for c flags '-MMD' : yes Checking for cxx flags '-MMD' : yes 'configure' finished successfully (0.652s) [root@centos7 rtems]# ./waf
[1378/1391] Linking build/aarch64/a53_lp64_qemu/testsuites/samples/base_sp.exe [1379/1391] Linking build/aarch64/a53_lp64_qemu/testsuites/samples/capture.exe [1380/1391] Linking build/aarch64/a53_lp64_qemu/testsuites/samples/cdtest.exe [1381/1391] Linking build/aarch64/a53_lp64_qemu/testsuites/samples/fileio.exe [1382/1391] Linking build/aarch64/a53_lp64_qemu/testsuites/samples/hello.exe [1383/1391] Linking build/aarch64/a53_lp64_qemu/testsuites/samples/iostream.exe [1384/1391] Linking build/aarch64/a53_lp64_qemu/testsuites/samples/nsecs.exe [1385/1391] Linking build/aarch64/a53_lp64_qemu/testsuites/samples/ticker.exe [1386/1391] Linking build/aarch64/a53_lp64_qemu/testsuites/samples/unlimited.exe [1387/1391] Linking build/aarch64/a53_lp64_qemu/libz.a [1388/1391] Linking build/aarch64/a53_lp64_qemu/libdebugger.a [1389/1391] Linking build/aarch64/a53_lp64_qemu/librtemscxx.a [1390/1391] Linking build/aarch64/a53_lp64_qemu/testsuites/samples/paranoia.exe [1391/1391] Linking build/aarch64/a53_lp64_qemu/libmghttpd.a Waf: Leaving directory `/root/development/rtems/kernel/rtems/build/aarch64/a53_lp64_qemu' 'build_aarch64/a53_lp64_qemu' finished successfully (6.474s) [root@centos7 rtems]# ls /root/development/rtems/kernel/rtems/build/aarch64/a53_lp64_qemu a53_lp64_qemu.cfg bsp.cfg cpukit libftpd.a libjffs2.a librtemsbsp.a librtemscxx.a librtemstest.a libtftpfs.a linkcmds start.d target.cfg aarch64-rtems6-a53_lp64_qemu.pc bsps libdebugger.a libftpfs.a libmghttpd.a librtemscpu.a librtemsdefaultconfig.a libtelnetd.a libz.a Makefile.inc start.o testsuites [root@centos7 rtems]# ls /root/development/rtems/compiler/6/ aarch64-rtems6/ bin/ include/ lib/ libexec/ make/ share/ [root@centos7 rtems]#
[root@centos7 rtems]# ./waf install Waf: Entering directory `/root/development/rtems/kernel/rtems/build' Waf: Leaving directory `/root/development/rtems/kernel/rtems/build' 'install' finished successfully (0.501s) Waf: Entering directory `/root/development/rtems/kernel/rtems/build/aarch64/a53_lp64_qemu' + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/linkcmds.base (from bsps/aarch64/shared/start/linkcmds.base) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/bsp/linker-symbols.h (from bsps/aarch64/include/bsp/linker-symbols.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/start.o (from build/aarch64/a53_lp64_qemu/start.o) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/dev/clock/arm-generic-timer.h (from bsps/include/dev/clock/arm-generic-timer.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/dev/irq/arm-gic-arch.h (from bsps/aarch64/include/dev/irq/arm-gic-arch.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/bsp.h (from bsps/aarch64/a53/include/bsp.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/bsp/irq.h (from bsps/aarch64/a53/include/bsp/irq.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/bsp/start.h (from bsps/aarch64/include/bsp/start.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/libchip/am29lv160.h (from bsps/include/libchip/am29lv160.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/bsp/bootcard.h (from bsps/include/bsp/bootcard.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/tm27.h (from bsps/aarch64/a53/include/tm27.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/ofw/ofw.h (from bsps/include/ofw/ofw.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/dev/irq/arm-gic-irq.h (from bsps/include/dev/irq/arm-gic-irq.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/dev/serial/arm-pl011-regs.h (from bsps/include/dev/serial/arm-pl011-regs.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/libchip/ata.h (from bsps/include/libchip/ata.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/libchip/mc146818a.h (from bsps/include/libchip/mc146818a.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/rtems/zilog/z8036.h (from bsps/include/rtems/zilog/z8036.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/bsp/console-polled.h (from bsps/include/bsp/console-polled.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/ofw/ofw_compat.h (from bsps/include/ofw/ofw_compat.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/dev/irq/arm-gic-regs.h (from bsps/include/dev/irq/arm-gic-regs.h) + install /root/development/rtems/compiler/6/lib/pkgconfig/aarch64-rtems6-a53_lp64_qemu.pc (from build/aarch64/a53_lp64_qemu/aarch64-rtems6-a53_lp64_qemu.pc) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/dev/serial/arm-pl011.h (from bsps/include/dev/serial/arm-pl011.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/make/bsp.cfg (from build/aarch64/a53_lp64_qemu/bsp.cfg) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/arm/ti/ti_pinmux.h (from bsps/include/arm/ti/ti_pinmux.h) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/libchip/mc68681.h (from bsps/include/libchip/mc68681.h) + install /root/development/rtems/compiler/6/make/custom/a53_lp64_qemu.cfg (from build/aarch64/a53_lp64_qemu/a53_lp64_qemu.cfg) + install /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include/rtems/zilog/z8530.h (from bsps/include/rtems/zilog/z8530.h)
[root@centos7 rtems]# ls /root/development/rtems/compiler/6/aarch64-rtems6/ a53_lp64_qemu bin include lib xilinx_zynqmp_lp64_qemu [root@centos7 rtems]# ls /root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/ lib make Makefile.inc [root@centos7 rtems]#
编译hello
[root@centos7 hello_world_c]# export RTEMS_MAKEFILE_PATH=/root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu [root@centos7 hello_world_c]# make make: Nothing to be done for `default_target'. [root@centos7 hello_world_c]# make clean rm -f a.out core mon.out gmon.out rm -f -r rm -f -r a.out *.o *.BAK Depends-o-optimize.tmp rm -f -r o-optimize o-debug [root@centos7 hello_world_c]# make test -d o-optimize || mkdir o-optimize aarch64-rtems6-gcc --pipe -Wall -O2 -g -fdata-sections -ffunction-sections -I/root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include -mcpu=cortex-a53 -c -o o-optimize/test.o test.c aarch64-rtems6-gcc --pipe -Wall -O2 -g -fdata-sections -ffunction-sections -I/root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib/include -mcpu=cortex-a53 -B/root/development/rtems/compiler/6/aarch64-rtems6/a53_lp64_qemu/lib -qrtems -Wl,--gc-sections -mcpu=cortex-a53 -o o-optimize/hello.exe o-optimize/test.o aarch64-rtems6-nm -g -n o-optimize/hello.exe > o-optimize/hello.num aarch64-rtems6-size o-optimize/hello.exe text data bss dec hex filename 76144 1856 134105400 134183400 7ff79e8 o-optimize/hello.exe cp o-optimize/hello.exe o-optimize/hello.ralf [root@centos7 hello_world_c]#
gdb
[root@centos7 hello_world_c]# qemu-system-aarch64 -no-reboot -nographic -serial mon:stdio -machine virt,gic-version=3 -cpu cortex-a53 -m 4096 -kernel o-optimize/hello.exe *** FATAL *** fatal source: 6 (RTEMS_FATAL_SOURCE_BSP) fatal code: 11 (0x0000000b) RTEMS version: 6.0.0.822ebb4cae2bb8bc9fe55915bd4acc4942fcd8ce RTEMS tools: 10.3.1 20210409 (RTEMS 6, RSB 889cf95db0122bd1a6b21598569620c40ff2069d, Newlib eb03ac1) executing thread ID: 0x089010001 executing thread name: IDLE [root@centos7 hello_world_c]# qemu-system-aarch64 -no-reboot -nographic -serial mon:stdio -machine virt,gic-version=3 -cpu cortex-a53 -m 4096 -kernel o-optimize/hello.exe -S -gdb tcp::8889
[root@centos7 rtems]# cat profile export PATH=$HOME/development/rtems/compiler/6/bin:$PATH [root@centos7 rtems]# ls $HOME/development/rtems/compiler/6/bin aarch64-rtems6-addr2line aarch64-rtems6-cpp aarch64-rtems6-gcc-ar aarch64-rtems6-gcov-tool aarch64-rtems6-ld.bfd aarch64-rtems6-readelf mkimage.py rtems-exeinfo rtems-run rtems-tld aarch64-rtems6-ar aarch64-rtems6-elfedit aarch64-rtems6-gcc-nm aarch64-rtems6-gdb aarch64-rtems6-nm aarch64-rtems6-run rtems-addr2line rtems-ld rtems-syms trace-converter aarch64-rtems6-as aarch64-rtems6-g++ aarch64-rtems6-gcc-ranlib aarch64-rtems6-gdb-add-index aarch64-rtems6-objcopy aarch64-rtems6-size rtems-bin2c rtems-ra rtems-test xmlwf aarch64-rtems6-c++ aarch64-rtems6-gcc aarch64-rtems6-gcov aarch64-rtems6-gprof aarch64-rtems6-objdump aarch64-rtems6-strings rtems-boot-image rtems-rap rtems-tftp-proxy aarch64-rtems6-c++filt aarch64-rtems6-gcc-10.3.1 aarch64-rtems6-gcov-dump aarch64-rtems6-ld aarch64-rtems6-ranlib aarch64-rtems6-strip rtems-bsp-builder rtems-record-lttng rtems-tftp-server [root@centos7 rtems]# ls compiler kernel profile rtems-examples rtems-source-builder [root@centos7 rtems]# cd rtems-examples/hello/ both_hello/ hello_world_c/ Makefile posix_hello_world/ wscript [root@centos7 rtems]# cd rtems-examples/hello/hello_world_c/ [root@centos7 hello_world_c]# ls Makefile o-optimize test.c wscript [root@centos7 hello_world_c]# cd o-optimize/ [root@centos7 o-optimize]# ls hello.exe hello.num hello.ralf test.o [root@centos7 o-optimize]# aarch64-rtems6-gdb hello.exe GNU gdb (GDB) 10.1.90.20210409-git Copyright (C) 2021 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=aarch64-linux-gnu --target=aarch64-rtems6". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from hello.exe... (gdb) target remote :8889 Remote debugging using :8889 bsp_vector_table_begin () at ../../../bsps/aarch64/shared/start/start.S:55 55 mov x5, x1 /* machine type number or ~0 for DT boot */ (gdb) break start_kernel Function "start_kernel" not defined. Make breakpoint pending on future shared library load? (y or [n]) n (gdb)
(gdb) load Loading section .start, size 0x1fc lma 0x40008000 Loading section .text, size 0x10220 lma 0x40008800 Loading section .init, size 0x34 lma 0x40018a20 Loading section .fini, size 0x34 lma 0x40018a54 Loading section .rodata, size 0x2450 lma 0x40018a88 Loading section .eh_frame, size 0x4 lma 0x4001aed8 Loading section .init_array, size 0x8 lma 0x4001aee0 Loading section .fini_array, size 0x8 lma 0x4001aee8 Loading section .rtemsroset, size 0x98 lma 0x4001aef0 Loading section .data, size 0x730 lma 0x40100000 Start address 0x0000000040008000, load size 78000 Transfer rate: 8463 KB/sec, 1695 bytes/write. (gdb)
[root@centos7 o-optimize]# aarch64-rtems6-gdb hello.exe GNU gdb (GDB) 10.1.90.20210409-git Copyright (C) 2021 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=aarch64-linux-gnu --target=aarch64-rtems6". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from hello.exe... (gdb) load You can't do that when your target is `exec' (gdb) r Don't know how to run. Try "help target". (gdb) target remote :8889 Remote debugging using :8889 bsp_vector_table_begin () at ../../../bsps/aarch64/shared/start/start.S:55 55 mov x5, x1 /* machine type number or ~0 for DT boot */ (gdb) load Loading section .start, size 0x1fc lma 0x40008000 Loading section .text, size 0x10220 lma 0x40008800 Loading section .init, size 0x34 lma 0x40018a20 Loading section .fini, size 0x34 lma 0x40018a54 Loading section .rodata, size 0x2450 lma 0x40018a88 Loading section .eh_frame, size 0x4 lma 0x4001aed8 Loading section .init_array, size 0x8 lma 0x4001aee0 Loading section .fini_array, size 0x8 lma 0x4001aee8 Loading section .rtemsroset, size 0x98 lma 0x4001aef0 Loading section .data, size 0x730 lma 0x40100000 Start address 0x0000000040008000, load size 78000 Transfer rate: 8463 KB/sec, 1695 bytes/write. (gdb) r The "remote" target does not support "run". Try "help target" or "continue". (gdb) continue Continuing. [Inferior 1 (process 1) exited normally] (gdb) bt No stack. (gdb)
https://gitlab.com/c-mauderer/rtems-libbsd
Set up RTEMS ARM BSP on Host OS QEMU搭建arm64 Linux调试环境