zDarkBlue 2022-04-06 21:47
浏览 88
已结题

git bash无法执行make

需求:
在windows上编译RISC的code:

操作方法:

  1. 安装git bash, 因为git bash可以执行解析linux命令行;可以解析make指令;
  2. 安装risc-v的gcc工具链:gnu-mcu-eclipse-riscv-none-gcc-8.2.0-2.2-20190521-0004-centos64.tgz,解压到D:\software\gcc\路径下面:bin文件的完整路径: D:\software\gcc\gnu-mcu-eclipse\riscv-none-gcc\8.2.0-2.2-20190521-0004\bin;并将bin文件的路径配置环境变量;
  3. 代码放在E:\Porject\firmware路径下面;
  4. 通过git bash 切到 firmware 路径下,执行make 出现以下问题:
zDarkBlue@Host MINGW64 /e/Porject/firmware
$ make
/d/software/gcc/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.2-20190521-0004/bin/riscv-none-embed-gcc -c -march=rv32imac -mabi=ilp32  -fno-builtin-printf -Wall -Werror -fno-common  -DHW_DATA32 -D__BYTE_ORDER=__LITTLE_ENDIAN -D__USE_INLINES__ -DAML_CFG_SELECT_LEVEL=3 -DBUILD_TYPE=FLASH_BUILD -DAML_CFG_ProjBT_VERSION=AML_HW_ProjBT_VERSION_T2_0_0 -DHW_RADIO=HWradio_W2 -DSLIP_HCI=1 -DSLIP_NO_ENABLE=1 -DBT_HCI_INTERFACE=1  -Ihost_if -Ihw_dep -Ilink_ctrl -Ilink_mngt -Isystem -Itest_ctrl -Ile_ctrl -Icoex -Iram -Ii2c -Ipatch -Ibt_rf/aml_rf_w2 -Iproj_dep/w2 -Ihal -Iriscv_bsp   -DRISCV_CPU_ENABLE -DRISCV_INTR_MODIFY  riscv_bsp/entry.s -o riscv_bsp/entry.o
/usr/bin/sh: /d/software/gcc/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.2-20190521-0004/bin/riscv-none-embed-gcc: cannot execute binary file: Exec format error
make: *** [makefile_riscV:426: riscv_bsp/entry.o] Error 126

另外,make 的版本如下:

zDarkBlue@Host MINGW64 /e/Porject/firmware
$ make -v
GNU Make 4.3
This program is built by Equation Solution <http://www.Equation.com>.
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 4月14日
    • 创建了问题 4月6日

    悬赏问题

    • ¥15 is not in the mmseg::model registry。报错,模型注册表找不到自定义模块。
    • ¥15 安装quartus II18.1时弹出此error,怎么解决?
    • ¥15 keil官网下载psn序列号在哪
    • ¥15 想用adb命令做一个通话软件,播放录音
    • ¥30 Pytorch深度学习服务器跑不通问题解决?
    • ¥15 部分客户订单定位有误的问题
    • ¥15 如何在maya程序中利用python编写领子和褶裥的模型的方法
    • ¥15 Bug traq 数据包 大概什么价
    • ¥15 在anaconda上pytorch和paddle paddle下载报错
    • ¥25 自动填写QQ腾讯文档收集表