Skip to content

Conversation

@ycsin
Copy link
Member

@ycsin ycsin commented Jul 23, 2024

See each commit for details

Log:

$ west build -b qemu_cortex_a9 -p auto zephyr/tests/subsys/debug/gdbstub/
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/ycsin/zephyrproject/zephyr/tests/subsys/debug/gdbstub
-- CMake version: 3.27.7
-- Found Python3: /home/ycsin/zephyrproject/.venv/bin/python3 (found suitable version "3.10.12", minimum required is "3.8") found components: Interpreter 
-- Cache files will be written to: /home/ycsin/.cache/zephyr
-- Zephyr version: 3.7.0-rc3 (/home/ycsin/zephyrproject/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: qemu_cortex_a9, qualifiers: xc7z007s
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.16.8 (/home/ycsin/zephyr-sdk-0.16.8)
-- Found toolchain: zephyr 0.16.8 (/home/ycsin/zephyr-sdk-0.16.8)
-- Found Dtc: /home/ycsin/zephyr-sdk-0.16.8/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6") 
-- Found BOARD.dts: /home/ycsin/zephyrproject/zephyr/boards/qemu/cortex_a9/qemu_cortex_a9.dts
-- Found devicetree overlay: /home/ycsin/zephyrproject/zephyr/tests/subsys/debug/gdbstub/boards/qemu_cortex_a9.overlay
-- Generated zephyr.dts: /home/ycsin/zephyrproject/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/ycsin/zephyrproject/build/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /home/ycsin/zephyrproject/build/zephyr/dts.cmake

warning: KOBJECT_TEXT_AREA (defined at arch/arm64/core/Kconfig:128, arch/Kconfig:320) was assigned
the value '4096' but got the value ''. Check these unsatisfied dependencies: (ARM64 ||
ARCH_HAS_USERSPACE) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_KOBJECT_TEXT_AREA and/or look up
KOBJECT_TEXT_AREA in the menuconfig/guiconfig interface. The Application Development Primer, Setting
Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
too.


warning: USERSPACE (defined at arch/Kconfig:289) was assigned the value 'y' but got the value 'n'.
Check these unsatisfied dependencies: ARCH_HAS_USERSPACE (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_USERSPACE and/or look up USERSPACE in the
menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values,
and Kconfig - Tips and Best Practices sections of the manual might be helpful too.

Parsing /home/ycsin/zephyrproject/zephyr/Kconfig
Loaded configuration '/home/ycsin/zephyrproject/zephyr/boards/qemu/cortex_a9/qemu_cortex_a9_defconfig'
Merged configuration '/home/ycsin/zephyrproject/zephyr/tests/subsys/debug/gdbstub/prj.conf'
Configuration saved to '/home/ycsin/zephyrproject/build/zephyr/.config'
Kconfig header saved to '/home/ycsin/zephyrproject/build/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: /home/ycsin/zephyr-sdk-0.16.8/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (found version "2.38") 
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/ycsin/zephyr-sdk-0.16.8/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Using ccache: /usr/bin/ccache
-- Configuring done (10.3s)
-- Generating done (0.1s)
-- Build files have been written to: /home/ycsin/zephyrproject/build
-- west build: building application
[1/117] Preparing syscall dependency handling

[2/117] Generating include/generated/zephyr/version.h
-- Zephyr version: 3.7.0-rc3 (/home/ycsin/zephyrproject/zephyr), build: v3.7.0-rc3-98-g5681d422fe49
[8/117] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
FAILED: zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj 
ccache /home/ycsin/zephyr-sdk-0.16.8/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DKERNEL -DK_HEAP_MEM_POOL_SIZE=0 -DPICOLIBC_LONG_LONG_PRINTF_SCANF -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/ycsin/zephyrproject/zephyr/kernel/include -I/home/ycsin/zephyrproject/zephyr/arch/arm/include -I/home/ycsin/zephyrproject/build/zephyr/include/generated/zephyr -I/home/ycsin/zephyrproject/zephyr/include -I/home/ycsin/zephyrproject/build/zephyr/include/generated -I/home/ycsin/zephyrproject/zephyr/soc/xlnx/zynq7000 -I/home/ycsin/zephyrproject/zephyr/soc/xlnx/zynq7000/xc7zxxxs/. -I/home/ycsin/zephyrproject/zephyr/soc/xlnx/zynq7000/common -I/home/ycsin/zephyrproject/modules/hal/cmsis/CMSIS/Core_A/Include -I/home/ycsin/zephyrproject/zephyr/modules/cmsis/. -isystem /home/ycsin/zephyrproject/zephyr/lib/libc/common/include -fno-strict-aliasing -O0 -imacros /home/ycsin/zephyrproject/build/zephyr/include/generated/zephyr/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-a9 -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=/home/ycsin/zephyr-sdk-0.16.8/arm-zephyr-eabi/arm-zephyr-eabi -imacros /home/ycsin/zephyrproject/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/home/ycsin/zephyrproject/zephyr/tests/subsys/debug/gdbstub=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/ycsin/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/ycsin/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -fno-lto -MD -MT zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj -MF zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj.d -o zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj -c /home/ycsin/zephyrproject/zephyr/arch/arm/core/offsets/offsets.c
In file included from /home/ycsin/zephyrproject/zephyr/include/zephyr/arch/arm/arch.h:36,
                 from /home/ycsin/zephyrproject/zephyr/include/zephyr/arch/cpu.h:19,
                 from /home/ycsin/zephyrproject/zephyr/include/zephyr/kernel_includes.h:36,
                 from /home/ycsin/zephyrproject/zephyr/include/zephyr/kernel.h:17,
                 from /home/ycsin/zephyrproject/zephyr/arch/arm/core/offsets/offsets_aarch32.c:28,
                 from /home/ycsin/zephyrproject/zephyr/arch/arm/core/offsets/offsets.c:9:
/home/ycsin/zephyrproject/zephyr/include/zephyr/arch/arm/gdbstub.h:10:10: fatal error: zephyr/arch/arm/exc.h: No such file or directory
   10 | #include <zephyr/arch/arm/exc.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/ycsin/zephyrproject/build

ycsin added 3 commits July 23, 2024 12:50
`exc.h` should be `exception.h` now, fix  it.

Signed-off-by: Yong Cong Sin <[email protected]>
Signed-off-by: Yong Cong Sin <[email protected]>
Change the `platform_allow` to multi-line format so that newly
supported archs/boards can be added as a new line.

Refactor the tags out to `common`, and add
`CONFIG_ARCH_HAS_GDBSTUB` filter

Signed-off-by: Yong Cong Sin <[email protected]>
Signed-off-by: Yong Cong Sin <[email protected]>
Add build-only test for existing boards.

Signed-off-by: Yong Cong Sin <[email protected]>
Signed-off-by: Yong Cong Sin <[email protected]>
@ycsin ycsin requested review from dcpleung, golowanow and nashif July 23, 2024 05:18
@ycsin ycsin added the bug The issue is a bug, or the PR is fixing a bug label Jul 23, 2024
@ycsin ycsin added this to the v3.7.0 milestone Jul 23, 2024
@ycsin
Copy link
Member Author

ycsin commented Jul 23, 2024

Added to v3.7.0 milestone as I expect ARM applications that had GDB enabled on a version before #66325 to fail the compilation when they are migrated to v3.7, but feel free to edit

@nashif nashif added the backport v3.7-branch Request backport to the v3.7-branch label Jul 23, 2024
@ycsin ycsin linked an issue Jul 29, 2024 that may be closed by this pull request
@ycsin ycsin deleted the pr/fix_arm_gdbstub branch July 30, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Architectures area: ARM ARM (32-bit) Architecture area: Debugging backport v3.7-branch Request backport to the v3.7-branch bug The issue is a bug, or the PR is fixing a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gdbstub: compilation error on ARM

6 participants