4ms / stm32mp1-baremetal

Baremetal framework and example projects for the STM32MP15x Cortex-A7 based MPU
Other
148 stars 28 forks source link

Makefile errors under windows 11 with MSys #24

Closed codewitch-honey-crisis closed 4 months ago

codewitch-honey-crisis commented 4 months ago

I'm not able to build u-boot using the scripts under the scripts folder. I'm syntax errors and such when running make.

I was hoping you could help clear this up.

Pardon all the spew.

make[1]: Leaving directory '/home/gazto/stm32mp1-baremetal/third-party/u-boot/build'
make[1]: Entering directory '/home/gazto/stm32mp1-baremetal/third-party/u-boot/build'
/bin/sh: command substitution: line 1: syntax error near unexpected token `('
/bin/sh: command substitution: line 1: `arm-none-eabi-gcc -Wall -Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding -std=gnu11 -fshort-wchar -fno-strict-aliasing -O2 -g -D__KERNEL__ -D__UBOOT__  -Iinclude  -I/home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/include  -I/home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/arch//include -include /home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/include/linux/kconfig.h -nostdinc -isystem C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/13.2 Rel1/bin/../lib/gcc/arm-none-eabi/13.2.1/include -print-libgcc-file-name'
dirname: missing operand
Try 'dirname --help' for more information.
  GEN     ./Makefile
scripts/kconfig/conf  --syncconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
/bin/sh: -c: line 1: syntax error near unexpected token `('
/bin/sh: -c: line 1: `echo '  CFG     u-boot.cfg'; arm-none-eabi-gcc -E -Wall -Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding -std=gnu11 -fshort-wchar -fno-strict-aliasing -O2 -g -D__KERNEL__ -D__UBOOT__ -D__ARM__ -Wa,-mimplicit-it=always           -ffunction-sections -fdata-sections -fno-common -ffixed-r9     -pipe -Iinclude  -I/home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/include -I/home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/arch/arm/include -include /home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/include/linux/kconfig.h -nostdinc -isystem C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/13.2 Rel1/bin/../lib/gcc/arm-none-eabi/13.2.1/include  -DDO_DEPS_ONLY -dM /home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/include/common.h > u-boot.cfg.tmp && { grep 'define CONFIG_' u-boot.cfg.tmp > u-boot.cfg; rm u-boot.cfg.tmp; } || { rm u-boot.cfg.tmp; false; }'
make[2]: *** [/home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/scripts/Makefile.autoconf:77: u-boot.cfg] Error 2
make[2]: *** Waiting for unfinished jobs....
/bin/sh: -c: line 1: syntax error near unexpected token `('
/bin/sh: -c: line 1: `echo '  GEN     include/autoconf.mk.dep'; arm-none-eabi-gcc -x c -DDO_DEPS_ONLY -M -MP -Wall -Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding -std=gnu11 -fshort-wchar -fno-strict-aliasing -O2 -g -D__KERNEL__ -D__UBOOT__ -D__ARM__ -Wa,-mimplicit-it=always           -ffunction-sections -fdata-sections -fno-common -ffixed-r9     -pipe -Iinclude  -I/home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/include -I/home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/arch/arm/include -include /home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/include/linux/kconfig.h -nostdinc -isystem C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/13.2 Rel1/bin/../lib/gcc/arm-none-eabi/13.2.1/include -MQ include/config/auto.conf /home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/include/common.h > include/autoconf.mk.dep || { rm include/autoconf.mk.dep; false; }'
make[2]: *** [/home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/scripts/Makefile.autoconf:48: include/autoconf.mk.dep] Error 2
/bin/sh: -c: line 1: syntax error near unexpected token `('
/bin/sh: -c: line 1: `echo '  CFG     spl/u-boot.cfg'; arm-none-eabi-gcc -E -Wall -Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding -std=gnu11 -fshort-wchar -fno-strict-aliasing -O2 -g -D__KERNEL__ -D__UBOOT__ -D__ARM__ -Wa,-mimplicit-it=always           -ffunction-sections -fdata-sections -fno-common -ffixed-r9     -pipe -Iinclude  -I/home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/include -I/home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/arch/arm/include -include /home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/include/linux/kconfig.h -nostdinc -isystem C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/13.2 Rel1/bin/../lib/gcc/arm-none-eabi/13.2.1/include -DCONFIG_SPL_BUILD -DDO_DEPS_ONLY -dM /home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/include/common.h > spl/u-boot.cfg.tmp && { grep 'define CONFIG_' spl/u-boot.cfg.tmp > spl/u-boot.cfg; rm spl/u-boot.cfg.tmp; } || { rm spl/u-boot.cfg.tmp; false; }'
make[2]: *** [/home/gazto/stm32mp1-baremetal/third-party/u-boot/u-boot-stm32mp1-baremetal/scripts/Makefile.autoconf:81: spl/u-boot.cfg] Error 2
make[1]: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.
make[1]: Leaving directory '/home/gazto/stm32mp1-baremetal/third-party/u-boot/build'
make: *** [Makefile:167: sub-make] Error 2
danngreen commented 4 months ago

From the error message it mentions an unexpected "(". Looking at the command in the next line of the error messages, there is a "(" in the path to the arm-none-eabi-gcc

Try installing arm-none-eabi toolchain to a path that doesn't have spaces or parentheses. I don't use Windows/MSYS but I think I've seen this come up before

codewitch-honey-crisis commented 4 months ago

Thanks. I eventually solved it by building for linux but I'm running into another issue now