Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apollo4x: build failure on kernel/cache/ Twister tests #72775

Open
pillo79 opened this issue May 14, 2024 · 3 comments
Open

apollo4x: build failure on kernel/cache/ Twister tests #72775

pillo79 opened this issue May 14, 2024 · 3 comments
Assignees
Labels
Enhancement Changes/Updates/Additions to existing features platform: Ambiq Ambiq

Comments

@pillo79
Copy link
Collaborator

pillo79 commented May 14, 2024

Describe the bug

The kernel/cache test suite fails on the apollo4p_evb and apollo4p_blue_kxr_evb boards due to missing symbols. It appears that (the HAL?) does not declare the SCB_* cache control functions that are used by arch/arm/core/cortex_m/cache.c when CONFIG_CACHE_MANAGEMENT is defined.

To Reproduce

Run west twister -c -T tests/kernel/cache/ -p apollo4p_evb.
On current Zephyr main (f5ce047, zephyrproject-rtos/hal_ambiq@f6858cb), tests fail to build with this error:

FAILED: zephyr/arch/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/cache.c.obj 
ccache zephyr-sdk-0.16.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DKERNEL -DK_HEAP_MEM_POOL_SIZE=0 -DTC_RUNID=c0f20f410652dfe4df7d454c06f392ed -D__PROGRAM_START -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -Izephyr/kernel/include -Izephyr/arch/arm/include -Izephyr/include -Izephyr/twister-out/apollo4p_evb/tests/kernel/cache/kernel.cache.api.minimallibc/zephyr/include/generated -Izephyr/soc/ambiq -Izephyr/soc/ambiq/apollo4x/. -Izephyr/soc/ambiq/. -Izephyr/subsys/testsuite/include -Izephyr/subsys/testsuite/ztest/include -Icore/include -Imodules/hal/cmsis/CMSIS/Core/Include -Izephyr/modules/cmsis/. -Imodules/hal/ambiq/CMSIS/AmbiqMicro/Include -Imodules/hal/ambiq/utils -Imodules/hal/ambiq/mcu/apollo4p -Imodules/hal/ambiq/mcu/apollo4p/hal -Imodules/hal/ambiq/components/bluetooth -isystem zephyr/lib/libc/minimal/include -isystem zephyr/lib/libc/common/include -isystem zephyr-sdk-0.16.4/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include -isystem zephyr-sdk-0.16.4/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include-fixed -Wshadow -fno-strict-aliasing -Werror -Os -imacros zephyr/twister-out/apollo4p_evb/tests/kernel/cache/kernel.cache.api.minimallibc/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=zephyr-sdk-0.16.4/arm-zephyr-eabi/arm-zephyr-eabi -imacros 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 -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=zephyr/tests/kernel/cache=CMAKE_SOURCE_DIR -fmacro-prefix-map=zephyr=ZEPHYR_BASE -fmacro-prefix-map=ZephyrCore=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/arch/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/cache.c.obj -MF zephyr/arch/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/cache.c.obj.d -o zephyr/arch/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/cache.c.obj -c zephyr/arch/arm/core/cortex_m/cache.c
zephyr/arch/arm/core/cortex_m/cache.c: In function 'arch_dcache_enable':
zephyr/arch/arm/core/cortex_m/cache.c:20:9: error: implicit declaration of function 'SCB_EnableDCache' [-Werror=implicit-function-declaration]
   20 |         SCB_EnableDCache();
      |         ^~~~~~~~~~~~~~~~

(and all other SCB_* functions).

Impact

CI failures (sample log) on recent LLEXT PRs (such as #72358).

@pillo79 pillo79 added bug The issue is a bug, or the PR is fixing a bug platform: Ambiq Ambiq labels May 14, 2024
@RichardSWheatley
Copy link
Contributor

RichardSWheatley commented May 14, 2024

I will take a look but we do not define CONFIG_CACHE_MANAGEMENT in our SOC and as such, this test is not compatible with our SOC at the moment.

This is planned for a future release but is not needed to run Zephyr.

@RichardSWheatley RichardSWheatley self-assigned this May 15, 2024
@RichardSWheatley RichardSWheatley added Enhancement Changes/Updates/Additions to existing features and removed bug The issue is a bug, or the PR is fixing a bug labels May 15, 2024
@pillo79
Copy link
Collaborator Author

pillo79 commented May 15, 2024

I see. Since we need that Kconfig in llext tests to ensure cache coherency, we will add an exclude to skip the Apollo targets for the time being. Thanks for looking into it!

@RichardSWheatley
Copy link
Contributor

RichardSWheatley commented May 15, 2024

I see. Since we need that Kconfig in llext tests to ensure cache coherency, we will add an exclude to skip the Apollo targets for the time being. Thanks for looking into it!

It's being fixed today/tomorrow but it may take a week to get approved locally and then will be in PR for Zephyr. I will not tie any other code changes to it so that it should be approved quickly.

When we publish our SDK we do put the header files with the SCB_ functions in the SDK but they were removed (not sure why) when pushing the HAL to Zephyr.

So it is not a huge thing to update the HAL and add to the Kconfig for SOC.

mathieuchopstm added a commit to mathieuchopstm/zephyr that referenced this issue May 22, 2024
Exclude the Apollo4 platform from LLEXT tests for now,
as they currently break CI due to zephyrproject-rtos#72775.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
mathieuchopstm added a commit to mathieuchopstm/zephyr that referenced this issue May 23, 2024
Exclude the Apollo4 platform from LLEXT tests for now,
as they currently break CI due to zephyrproject-rtos#72775.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
mathieuchopstm added a commit to mathieuchopstm/zephyr that referenced this issue May 23, 2024
Exclude the Apollo4 platform from LLEXT tests for now,
as they currently break CI due to zephyrproject-rtos#72775.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
mathieuchopstm added a commit to mathieuchopstm/zephyr that referenced this issue May 29, 2024
Exclude the Apollo4 platform from LLEXT tests for now,
as they currently break CI due to zephyrproject-rtos#72775.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
mathieuchopstm added a commit to mathieuchopstm/zephyr that referenced this issue May 29, 2024
Exclude the Apollo4 platform from LLEXT tests for now,
as they currently break CI due to zephyrproject-rtos#72775.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
pillo79 pushed a commit to pillo79/zephyr that referenced this issue May 30, 2024
Exclude the Apollo4 platform from LLEXT tests for now,
as they currently break CI due to zephyrproject-rtos#72775.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
fabiobaltieri pushed a commit that referenced this issue May 30, 2024
Exclude the Apollo4 platform from LLEXT tests for now,
as they currently break CI due to #72775.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Changes/Updates/Additions to existing features platform: Ambiq Ambiq
Projects
None yet
Development

No branches or pull requests

2 participants