zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
11k stars 6.7k forks source link

nucleo_f767zi: sample.net.gptp build fails #49763

Closed stephanosio closed 2 years ago

stephanosio commented 2 years ago

Describe the bug

sample.net.gptp sample build fails for nucleo_f767zi due to missing ETH_PTPTSSR_TSSARFE and ETH_PTPTSSR_TSSSR definitions.

To Reproduce

scripts/twister -v -N -M -p nucleo_f767zi -s samples/net/gptp/sample.net.gptp

Expected behavior

Build succeeds

Logs and console output

[192/324] Building C object zephyr/drivers/ethernet/CMakeFiles/drivers__ethernet.dir/eth_stm32_hal.c.obj
FAILED: zephyr/drivers/ethernet/CMakeFiles/drivers__ethernet.dir/eth_stm32_hal.c.obj 
ccache /opt/toolchains/zephyr-sdk-0.15.0/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DCORE_CM7 -DHSE_VALUE=8000000 -DKERNEL -DSTM32F767xx -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -I../../../../../../include -Izephyr/include/generated -I../../../../../../soc/arm/st_stm32/stm32f7 -I../../../../../../lib/util/fnmatch/. -I../../../../../../drivers -I../../../../../../soc/arm/st_stm32/common -I../../../../../../subsys/net/l2 -I/__w/zephyr/modules/hal/cmsis/CMSIS/Core/Include -I/__w/zephyr/modules/hal/stm32/stm32cube/stm32f7xx/soc -I/__w/zephyr/modules/hal/stm32/stm32cube/stm32f7xx/drivers/include -I/__w/zephyr/modules/hal/stm32/stm32cube/stm32f7xx/drivers/include/Legacy -I/__w/zephyr/modules/hal/stm32/stm32cube/common_ll/include -isystem ../../../../../../lib/libc/minimal/include -isystem /opt/toolchains/zephyr-sdk-0.15.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include -isystem /opt/toolchains/zephyr-sdk-0.15.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include-fixed -fno-strict-aliasing -Os -imacros /__w/zephyr/zephyr/twister-out/nucleo_f767zi/samples/net/gptp/sample.net.gptp/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m7 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=/opt/toolchains/zephyr-sdk-0.15.0/arm-zephyr-eabi/arm-zephyr-eabi -imacros /__w/zephyr/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -Werror -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/__w/zephyr/zephyr/samples/net/gptp=CMAKE_SOURCE_DIR -fmacro-prefix-map=/__w/zephyr/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/__w/zephyr=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/drivers/ethernet/CMakeFiles/drivers__ethernet.dir/eth_stm32_hal.c.obj -MF zephyr/drivers/ethernet/CMakeFiles/drivers__ethernet.dir/eth_stm32_hal.c.obj.d -o zephyr/drivers/ethernet/CMakeFiles/drivers__ethernet.dir/eth_stm32_hal.c.obj -c /__w/zephyr/zephyr/drivers/ethernet/eth_stm32_hal.c
/__w/zephyr/zephyr/drivers/ethernet/eth_stm32_hal.c: In function 'eth_initialize':
/__w/zephyr/zephyr/drivers/ethernet/eth_stm32_hal.c:849:36: error: 'ETH_PTPTSSR_TSSARFE' undeclared (first use in this function); did you mean 'ETH_PTPTSCR_TSSARFE'?
  849 |         heth->Instance->PTPTSCR |= ETH_PTPTSSR_TSSARFE;
      |                                    ^~~~~~~~~~~~~~~~~~~
      |                                    ETH_PTPTSCR_TSSARFE
/__w/zephyr/zephyr/drivers/ethernet/eth_stm32_hal.c:849:36: note: each undeclared identifier is reported only once for each function it appears in
/__w/zephyr/zephyr/drivers/ethernet/eth_stm32_hal.c: In function 'ptp_stm32_init':
/__w/zephyr/zephyr/drivers/ethernet/eth_stm32_hal.c:1398:36: error: 'ETH_PTPTSSR_TSSSR' undeclared (first use in this function); did you mean 'ETH_PTPTSCR_TSSSR'?
 1398 |         heth->Instance->PTPTSCR |= ETH_PTPTSSR_TSSSR;
      |                                    ^~~~~~~~~~~~~~~~~
      |                                    ETH_PTPTSCR_TSSSR

Environment (please complete the following information):

stephanosio commented 2 years ago

cc @erwango @FRASTM