Make/touch工具在MSYS、Powershell、VSCode中异常问题求助
跨终端工具使用异常求助
MSYS终端执行make命令报错
在MSYS中运行make时出现以下错误:
$ make arm-none-eabi-gcc main.c -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion -Wformat-truncation -fno-common -Wconversion -g3 -Os -ffunction-sections -fdata-sections -I. -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Tlink.ld -nostartfiles -nostdlib --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=firmware.elf.map -o firmware.elf make: arm-none-eabi-gcc: No such file or directory make: *** [Makefile:11: firmware.elf] Error 127
但arm-none-eabi-gcc和make在PowerShell或VSCode终端中可以正常使用。
PowerShell/VSCode终端执行touch命令报错
在这两个终端中运行touch命令时出现以下错误:
touch main.c touch : The term 'touch' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1
补充信息
- 本人是编程新手,环境变量配置混乱,正在学习裸机编程内容
- 尝试过缩短PATH目录长度,但问题未解决
内容的提问来源于stack exchange,提问作者Jeff V.
相关产品推荐
相关产品推荐

