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

Endless build loop after adding pinctrl dtsi #29235

Closed
Delsian opened this issue Oct 15, 2020 · 5 comments · Fixed by #29243
Closed

Endless build loop after adding pinctrl dtsi #29235

Delsian opened this issue Oct 15, 2020 · 5 comments · Fixed by #29243
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32

Comments

@Delsian
Copy link
Contributor

Delsian commented Oct 15, 2020

Describe the bug

After adding include with pinctrl definitions, build continuously restarts:

[0/1] "C:\Program Files\CMake\bin\cmake.exe" --regenerate-during-build -SC:\Eug\zephyrproject\locinox\relayboxz -BC:\Eug\zephyrproject\locinox\relayboxz\build
-- Application: C:/Eug/zephyrproject/locinox/relayboxz
-- Zephyr version: 2.4.99 (C:/Eug/zephyrproject/zephyr)
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
-- Board: relaybox
-- Cache files will be written to: C:/Eug/zephyrproject/zephyr/.cache
-- Found dtc: C:/ProgramData/chocolatey/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/Program Files (x86)/GNUARM)
-- Found BOARD.dts: C:/Eug/zephyrproject/locinox/commonz/boards/arm/relaybox/relaybox.dts
-- Generated zephyr.dts: C:/Eug/zephyrproject/locinox/relayboxz/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/Eug/zephyrproject/locinox/relayboxz/build/zephyr/include/generated/devicetree_unfixed.h
Parsing C:/Eug/zephyrproject/locinox/relayboxz/Kconfig
Loaded configuration 'C:/Eug/zephyrproject/locinox/relayboxz/build/zephyr/.config'
No change to configuration in 'C:/Eug/zephyrproject/locinox/relayboxz/build/zephyr/.config'
No change to Kconfig header in 'C:/Eug/zephyrproject/locinox/relayboxz/build/zephyr/include/generated/autoconf.h'
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Eug/zephyrproject/locinox/relayboxz/build
[0/1] "C:\Program Files\CMake\bin\cmake.exe" --regenerate-during-build -SC:\Eug\zephyrproject\locinox\relayboxz -BC:\Eug\zephyrproject\locinox\relayboxz\build
-- Application: C:/Eug/zephyrproject/locinox/relayboxz
-- Zephyr version: 2.4.99 (C:/Eug/zephyrproject/zephyr)
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
-- Board: relaybox
-- Cache files will be written to: C:/Eug/zephyrproject/zephyr/.cache
-- Found dtc: C:/ProgramData/chocolatey/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/Program Files (x86)/GNUARM)
-- Found BOARD.dts: C:/Eug/zephyrproject/locinox/commonz/boards/arm/relaybox/relaybox.dts
-- Generated zephyr.dts: C:/Eug/zephyrproject/locinox/relayboxz/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/Eug/zephyrproject/locinox/relayboxz/build/zephyr/include/generated/devicetree_unfixed.h
Parsing C:/Eug/zephyrproject/locinox/relayboxz/Kconfig
Loaded configuration 'C:/Eug/zephyrproject/locinox/relayboxz/build/zephyr/.config'
No change to configuration in 'C:/Eug/zephyrproject/locinox/relayboxz/build/zephyr/.config'
No change to Kconfig header in 'C:/Eug/zephyrproject/locinox/relayboxz/build/zephyr/include/generated/autoconf.h'
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Eug/zephyrproject/locinox/relayboxz/build
[0/1] "C:\Program Files\CMake\bin\cmake.exe" --regenerate-during-build -SC:\Eug\zephyrproject\locinox\relayboxz -BC:\Eug\zephyrproject\locinox\relayboxz\build
-- Application: C:/Eug/zephyrproject/locinox/relayboxz

To Reproduce

Adding line

#include <st/f4/stm32f412r(e-g)tx-pinctrl.dtsi>

into custom board DTS file
Removing this line returns build back to normal behavior

Impact
showstopper

Environment (please complete the following information):

  • OS: Windows10
  • Toolchain Zephyr SDK, GCC
  • Commit SHA 2837ac4
@Delsian Delsian added the bug The issue is a bug, or the PR is fixing a bug label Oct 15, 2020
@Delsian
Copy link
Contributor Author

Delsian commented Oct 15, 2020

The same behavior with sample files:

-- west build: generating a build system
-- Application: C:/Eug/zephyrproject/zephyr/samples/basic/blinky
-- Zephyr version: 2.4.99 (C:/Eug/zephyrproject/zephyr)
-- Found Python3: C:/Python/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
-- Board: nucleo_f412zg
-- Cache files will be written to: C:/Eug/zephyrproject/zephyr/.cache
-- Found dtc: C:/ProgramData/chocolatey/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/Program Files (x86)/GNUARM)
-- Found BOARD.dts: C:/Eug/zephyrproject/zephyr/boards/arm/nucleo_f412zg/nucleo_f412zg.dts
-- Generated zephyr.dts: C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/include/generated/devicetree_unfixed.h
Parsing C:/Eug/zephyrproject/zephyr/Kconfig
Loaded configuration 'C:/Eug/zephyrproject/zephyr/boards/arm/nucleo_f412zg/nucleo_f412zg_defconfig'
Merged configuration 'C:/Eug/zephyrproject/zephyr/samples/basic/blinky/prj.conf'
Configuration saved to 'C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/.config'
Kconfig header saved to 'C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: C:/Program Files (x86)/GNUARM/bin/arm-none-eabi-gcc.exe
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build
-- west build: building application
[0/1] Re-running CMake...
-- Application: C:/Eug/zephyrproject/zephyr/samples/basic/blinky
-- Zephyr version: 2.4.99 (C:/Eug/zephyrproject/zephyr)
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
-- Board: nucleo_f412zg
-- Cache files will be written to: C:/Eug/zephyrproject/zephyr/.cache
-- Found dtc: C:/ProgramData/chocolatey/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/Program Files (x86)/GNUARM)
-- Found BOARD.dts: C:/Eug/zephyrproject/zephyr/boards/arm/nucleo_f412zg/nucleo_f412zg.dts
-- Generated zephyr.dts: C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/include/generated/devicetree_unfixed.h
Parsing C:/Eug/zephyrproject/zephyr/Kconfig
Loaded configuration 'C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/.config'
No change to configuration in 'C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/.config'
No change to Kconfig header in 'C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/include/generated/autoconf.h'
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build
[0/1] Re-running CMake...
-- Application: C:/Eug/zephyrproject/zephyr/samples/basic/blinky
-- Zephyr version: 2.4.99 (C:/Eug/zephyrproject/zephyr)
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
-- Board: nucleo_f412zg
-- Cache files will be written to: C:/Eug/zephyrproject/zephyr/.cache
-- Found dtc: C:/ProgramData/chocolatey/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/Program Files (x86)/GNUARM)
-- Found BOARD.dts: C:/Eug/zephyrproject/zephyr/boards/arm/nucleo_f412zg/nucleo_f412zg.dts
-- Generated zephyr.dts: C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/include/generated/devicetree_unfixed.h
Parsing C:/Eug/zephyrproject/zephyr/Kconfig

After switching to 2.4 release (7a3b253) everything works fine.

-- west build: generating a build system
-- Application: C:/Eug/zephyrproject/zephyr/samples/basic/blinky
-- Zephyr version: 2.4.0 (C:/Eug/zephyrproject/zephyr)
-- Found Python3: C:/Python/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
-- Board: nucleo_f412zg
-- Cache files will be written to: C:/Eug/zephyrproject/zephyr/.cache
-- Found dtc: C:/ProgramData/chocolatey/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/Program Files (x86)/GNUARM)
-- Found BOARD.dts: C:/Eug/zephyrproject/zephyr/boards/arm/nucleo_f412zg/nucleo_f412zg.dts
-- Generated zephyr.dts: C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/include/generated/devicetree_unfixed.h
Parsing C:/Eug/zephyrproject/zephyr/Kconfig
Loaded configuration 'C:/Eug/zephyrproject/zephyr/boards/arm/nucleo_f412zg/nucleo_f412zg_defconfig'
Merged configuration 'C:/Eug/zephyrproject/zephyr/samples/basic/blinky/prj.conf'
Configuration saved to 'C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/.config'
Kconfig header saved to 'C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: C:/Program Files (x86)/GNUARM/bin/arm-none-eabi-gcc.exe
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Eug/zephyrproject/zephyr/samples/basic/blinky/build
-- west build: building application
[1/129] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
[2/129] Generating include/generated/driver-validation.h
[3/129] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h
...

@Delsian
Copy link
Contributor Author

Delsian commented Oct 15, 2020

The same with samples:
Commit db89bb7 builds successfully;
Next commit dda6396 (adding include ) goes to endless loop.

@galak galak added the platform: STM32 ST Micro STM32 label Oct 15, 2020
@tejlmand
Copy link
Collaborator

Sounds related to this:
#26112

I did a check on the generated dependency file that will be used by Ninja, and on Linux it contains:

/projects/github/ncs/modules/hal/stm32/dts/st/f4/stm32f412z(e-g)tx-pinctrl.dtsi \

but in windows I get:

C:\projects\github\ncs\modules\hal\stm32/dts/st/f4/stm32f412z(e-g)tx-pinctrl.dtsi \

Looking into why it uses \ on windows for the module path, as that is a known source of error.

tejlmand added a commit to tejlmand/zephyr that referenced this issue Oct 15, 2020
Fixes: zephyrproject-rtos#29235

This commit ensures that roots are being converted to posix paths.
This fixes the issue where windows style path (containing `\`) would
result in DTS dependency file to contain mixed style path separator and
thus causing Ninja to re-invoke CMake in an endless loop.

Signed-off-by: Torsten Rasmussen <[email protected]>
@tejlmand
Copy link
Collaborator

tejlmand commented Oct 15, 2020

@Delsian Fixed here: #29243

nashif pushed a commit that referenced this issue Oct 16, 2020
Fixes: #29235

This commit ensures that roots are being converted to posix paths.
This fixes the issue where windows style path (containing `\`) would
result in DTS dependency file to contain mixed style path separator and
thus causing Ninja to re-invoke CMake in an endless loop.

Signed-off-by: Torsten Rasmussen <[email protected]>
@Delsian
Copy link
Contributor Author

Delsian commented Oct 16, 2020

@tejlmand Thank you!

tejlmand added a commit to tejlmand/zephyr that referenced this issue Oct 27, 2020
Fixes: zephyrproject-rtos#29235

This commit ensures that roots are being converted to posix paths.
This fixes the issue where windows style path (containing `\`) would
result in DTS dependency file to contain mixed style path separator and
thus causing Ninja to re-invoke CMake in an endless loop.

Signed-off-by: Torsten Rasmussen <[email protected]>
ryanjh pushed a commit to ryanjh/zephyr that referenced this issue Oct 27, 2020
Fixes: zephyrproject-rtos#29235

This commit ensures that roots are being converted to posix paths.
This fixes the issue where windows style path (containing `\`) would
result in DTS dependency file to contain mixed style path separator and
thus causing Ninja to re-invoke CMake in an endless loop.

Signed-off-by: Torsten Rasmussen <[email protected]>
(cherry picked from commit 41c37f4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32
Projects
None yet
4 participants