关于git:使用cmd” ant run”在contiki中运行cooja

running cooja in contiki with cmd “ant run”

当我要在contiki-3.9 / tools / cooja中运行" ant run "时,我遇到以下错误:

BUILD FAILED /home/user/contiki-3.0/tools/cooja/build.xml:199: The
following error occurred while executing this line:
/home/user/contiki-3.0/tools/cooja/apps/mspsim/build.xml:29: -
Could not find the MSPSim build file. Did you run"git submodule update --init"?

但实际上我跑了

1
2
             git submodule init
             git submodule update

使用" ant run "之前。

请帮助我解决这个问题,我是contiki-os的新手,应将其用于我的硕士论文


以下内容对我有用:

  • 从此链接https://github.com/contiki-os/mspsim单独下载mspsim(检查您的home / contiki / tools / mspsim和home / contiki-3.0 / tools / mspsim目录,两者可能都为空)。
  • 从两个地方删除空的mspsim目录
  • 解压缩mspsim-master后,将解压缩的mspsim-master目录粘贴到两个位置
  • 在两个位置上,将目录从mspsim-master重命名为mspsim。
  • 转到终端(user @ instant-contiki:?/ contiki-3.0 / tools / cooja $)并运行此命令ant run
  • 无需使用sudo
  • 享受!


    请注意最后一次交战。如果您的英语不好,请使用Goolge翻译。
    只需在运行" ant run"之前运行" git submodule update --init"。


    然后当我,ant跑相同时再次出现

    1
    2
    3
    4
    5
    6
    7
    BUILD FAILED
    /home/user/contiki-3.0/tools/cooja/build.xml:199: The following error
    occurred while executing this line:
    /home/user/contiki-3.0/tools/cooja/apps/mspsim/build.xml:29: -
    ----------------
    Could not find the MSPSim build file. Did you run"git submodule update
    --init"?

    我的解决方案:

    1
    2
    3
    4
    cd tools/cooja
    rm -rf .git
    cd ..
    sudo git submodule update --init

    享受Cooja:)


    Instant Contiki VM的另一种解决方案是:

    1
    2
    3
    4
    5
    mkdir ~/Downloads/contiki_clone

    cd ~/Downloads/contiki_clone

    git clone https://github.com/contiki-os/contiki.git

    当它克隆Contiki时,只需:

    1
    2
    3
    4
    5
    cd contiki/tools/cooja

    git submodule update --init

    ant run

    这些命令将使您在即时的Contiki VM上拥有全新的Contiki。您只需在主目录中删除较旧的contiki文件,然后使用此文件即可。如果您想克隆旧版本,请:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    mkdir ~/Downloads/contiki_clone

    cd ~/Downloads/contiki_clone

    git clone https://github.com/contiki-os/contiki.git

    cd contiki

    git checkout hash_of_the_older_version

    cd tools/cooja

    git submodule update --init

    • 转到:contiki/tools/cooja
    • 在终端中运行:git submodule update --init
    • 现在,尝试:ant run

    在VMware Player中下载并启动即时contiki 3.0之后,以下步骤为我工作。

    1
    2
    3
    4
    5
    6
    7
    cd contiki

    git submodule update --init

    cd tools/cooja/

    ant run

    从此处下载即时contiki 3.0。

    其余说明在这里。