-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Open
Labels
area: ToolchainsToolchainsToolchainsbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug
Description
Describe the bug
Compiling blinky with GCC works fine, but the same app compiled with ARM Compiler 6 fails with the below described error when linking.
C:\WINDOWS\system32\cmd.exe /C "cd . && C:\workspace\ArmCompilers\bin\armlink.exe --cpu=cortex-m4 --via=CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf && C:\WINDOWS\system32\cmd.exe /C "cd /D C:\workspace\gitlab\zephyrproject-rtos\zephyr\build\zephyr && "C:\Program Files\CMake\bin\cmake.exe" -E true""
Error: L6384E: No Load Execution Region of name bss seen yet at line 11.
Error: L6384E: No Load Execution Region of name bss seen yet at line 15.
The errors seems to be from the below lines (not able to find __bss_start
symbol) in the cmake\linker_script\arm\linker.cmake. I am able to work-around the errors by hardcoding instead of using __bss_start
zephyr_linker_symbol(SYMBOL __kernel_ram_start EXPR "(@__bss_start@)")
zephyr_linker_symbol(SYMBOL __kernel_ram_end EXPR "(${RAM_ADDR} + ${RAM_SIZE})")
zephyr_linker_symbol(SYMBOL __kernel_ram_size EXPR "(@__kernel_ram_end@ - @__bss_start@)")
To Reproduce
Steps to reproduce the behavior:
$Env:ZEPHYR_TOOLCHAIN_VARIANT="armclang"
west build -p always -b cy8cproto_063_ble .\samples\basic\blinky\
Expected behavior
blinky should compile and link successfully with ARM compiler as well
Impact
Unable to use ARM Compiler for our platforms
Logs and console output
west build -p always -b cy8cproto_063_ble .\samples\basic\blinky\
-- west build: making build dir C:\workspace\gitlab\zephyrproject-rtos\zephyr\build pristine
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: C:/workspace/gitlab/zephyrproject-rtos/zephyr/samples/basic/blinky
-- CMake version: 3.29.0
-- Found Python3: C:/workspace/gitlab/zephyrproject-rtos/.venv/Scripts/python.exe (found suitable version "3.11.0", minimum required is "3.8") found components: Interpreter
-- Cache files will be written to: C:/workspace/gitlab/zephyrproject-rtos/zephyr/.cache
-- Zephyr version: 3.6.99 (C:/workspace/gitlab/zephyrproject-rtos/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: cy8cproto_063_ble, qualifiers: cyble_416045_02
-- Found armclang: C:/workspace/ArmCompilers/bin/armclang.exe (found suitable version "6.17", minimum required is "6.17")
-- Found Dtc: C:/ProgramData/chocolatey/bin/dtc.exe (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found BOARD.dts: C:/workspace/gitlab/zephyrproject-rtos/zephyr/boards/cypress/cy8cproto_063_ble/cy8cproto_063_ble.dts
-- Generated zephyr.dts: C:/workspace/gitlab/zephyrproject-rtos/zephyr/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/workspace/gitlab/zephyrproject-rtos/zephyr/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: C:/workspace/gitlab/zephyrproject-rtos/zephyr/build/zephyr/dts.cmake
C:/workspace/gitlab/zephyrproject-rtos/zephyr/build/zephyr/zephyr.dts:231.20-235.5: Warning (simple_bus_reg): /soc/bless: missing or empty reg/ranges property
C:/workspace/gitlab/zephyrproject-rtos/zephyr/build/zephyr/zephyr.dts:39.29-54.5: Warning (avoid_unnecessary_addr_size): /soc/pinctrl@40310000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
Parsing C:/workspace/gitlab/zephyrproject-rtos/zephyr/Kconfig
Loaded configuration 'C:/workspace/gitlab/zephyrproject-rtos/zephyr/boards/cypress/cy8cproto_063_ble/cy8cproto_063_ble_defconfig'
Merged configuration 'C:/workspace/gitlab/zephyrproject-rtos/zephyr/samples/basic/blinky/prj.conf'
Configuration saved to 'C:/workspace/gitlab/zephyrproject-rtos/zephyr/build/zephyr/.config'
Kconfig header saved to 'C:/workspace/gitlab/zephyrproject-rtos/zephyr/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is ARMClang 6.17.0
-- The CXX compiler identification is ARMClang 6.17.0
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.29/Modules/Compiler/ARMClang.cmake:91 (message):
Policy CMP0123 is not set: ARMClang cpu/arch compile and link flags must be
set explicitly. Run "cmake --help-policy CMP0123" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
For compatibility, CMake will automatically add cpu/arch flags based on the
CMAKE_SYSTEM_PROCESSOR and/or CMAKE_SYSTEM_ARCH variables.
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.29/Modules/Compiler/ARMClang-C.cmake:3 (__compiler_armclang)
C:/Program Files/CMake/share/cmake-3.29/Modules/CMakeCInformation.cmake:25 (include)
C:/workspace/gitlab/zephyrproject-rtos/zephyr/cmake/modules/kernel.cmake:128 (project)
C:/workspace/gitlab/zephyrproject-rtos/zephyr/cmake/modules/zephyr_default.cmake:141 (include)
C:/workspace/gitlab/zephyrproject-rtos/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
C:/workspace/gitlab/zephyrproject-rtos/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:4 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.29/Modules/Compiler/ARMClang.cmake:91 (message):
Policy CMP0123 is not set: ARMClang cpu/arch compile and link flags must be
set explicitly. Run "cmake --help-policy CMP0123" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
For compatibility, CMake will automatically add cpu/arch flags based on the
CMAKE_SYSTEM_PROCESSOR and/or CMAKE_SYSTEM_ARCH variables.
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.29/Modules/Compiler/ARMClang-CXX.cmake:3 (__compiler_armclang)
C:/Program Files/CMake/share/cmake-3.29/Modules/CMakeCXXInformation.cmake:25 (include)
C:/workspace/gitlab/zephyrproject-rtos/zephyr/cmake/modules/kernel.cmake:128 (project)
C:/workspace/gitlab/zephyrproject-rtos/zephyr/cmake/modules/zephyr_default.cmake:141 (include)
C:/workspace/gitlab/zephyrproject-rtos/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
C:/workspace/gitlab/zephyrproject-rtos/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:4 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- The ASM compiler identification is ARMClang
-- Found assembler: C:/workspace/ArmCompilers/bin/armclang.exe
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.29/Modules/Compiler/ARMClang.cmake:91 (message):
Policy CMP0123 is not set: ARMClang cpu/arch compile and link flags must be
set explicitly. Run "cmake --help-policy CMP0123" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
For compatibility, CMake will automatically add cpu/arch flags based on the
CMAKE_SYSTEM_PROCESSOR and/or CMAKE_SYSTEM_ARCH variables.
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.29/Modules/Compiler/ARMClang-ASM.cmake:9 (__compiler_armclang)
C:/Program Files/CMake/share/cmake-3.29/Modules/CMakeASMInformation.cmake:22 (include)
C:/workspace/gitlab/zephyrproject-rtos/zephyr/cmake/modules/kernel.cmake:134 (enable_language)
C:/workspace/gitlab/zephyrproject-rtos/zephyr/cmake/modules/zephyr_default.cmake:141 (include)
C:/workspace/gitlab/zephyrproject-rtos/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
C:/workspace/gitlab/zephyrproject-rtos/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:4 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.29/Modules/Compiler/ARMClang.cmake:91 (message):
Policy CMP0123 is not set: ARMClang cpu/arch compile and link flags must be
set explicitly. Run "cmake --help-policy CMP0123" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
For compatibility, CMake will automatically add cpu/arch flags based on the
CMAKE_SYSTEM_PROCESSOR and/or CMAKE_SYSTEM_ARCH variables.
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.29/Modules/Compiler/ARMClang-ASM.cmake:9 (__compiler_armclang)
C:/Program Files/CMake/share/cmake-3.29/Modules/CMakeASMInformation.cmake:22 (include)
C:/workspace/gitlab/zephyrproject-rtos/modules/lib/picolibc/CMakeLists.txt:38 (project)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done (27.9s)
-- Generating done (0.4s)
-- Build files have been written to: C:/workspace/gitlab/zephyrproject-rtos/zephyr/build
←[92m-- west build: building application
[2/150] Generating include/generated/version.h
-- Zephyr version: 3.6.99 (C:/workspace/gitlab/zephyrproject-rtos/zephyr), build: v3.6.0-2462-g17081222e2e7
[146/150] Linking C executable zephyr\zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map C:/workspace/gitlab/zephyrproject-rtos/zephyr/build/zephyr/zephyr_pre0.map
C:\WINDOWS\system32\cmd.exe /C "cd . && C:\workspace\ArmCompilers\bin\armlink.exe --cpu=cortex-m4 --via=CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf && C:\WINDOWS\system32\cmd.exe /C "cd /D C:\workspace\gitlab\zephyrproject-rtos\zephyr\build\zephyr && "C:\Program Files\CMake\bin\cmake.exe" -E true""
Error: L6384E: No Load Execution Region of name bss seen yet at line 11.
Error: L6384E: No Load Execution Region of name bss seen yet at line 15.
Not enough information to list the image map.
Finished: 1 information, 0 warning and 2 error messages.
ninja: build stopped: subcommand failed.
Environment (please complete the following information):
- OS: Windows
- Toolchain: ARM Compiler 6
- Commit SHA or Version used : 1708122
Metadata
Metadata
Assignees
Labels
area: ToolchainsToolchainsToolchainsbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug
Type
Projects
Status
Done