git 使用 cmd“ant run”在 contiki 中运行 cooja

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32814364/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 11:25:04  来源:igfitidea点击:

running cooja in contiki with cmd "ant run"

gitantgit-submodulescontiki

提问by niousha

When I want to run "ant run" in contiki-3.9/tools/cooja, I am facing following error:

当我想在 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"?

BUILD FAILED /home/user/contiki-3.0/tools/cooja/build.xml:199: 执行此行时出现以下错误:/home/user/contiki-3.0/tools/cooja/apps/mspsim/build.xml :29: - 找不到 MSPSim 构建文件。您是否运行了“git submodule update --init”?

but actually I ran

但实际上我跑了

             git submodule init
             git submodule update

before using "ant run".

在使用“蚂蚁跑”之前。

Please help me on this problem, I'm new to contiki-os and should use it for my master thesis

请帮我解决这个问题,我是 contiki-os 的新手,应该在我的硕士论文中使用它

回答by Renan

The following worked for me:

以下对我有用:

  1. Download the mspsimseparately from this link https://github.com/contiki-os/mspsim(check your home/contiki/tools/mspsimand home/contiki-3.0/tools/mspsimdirectories, both are probably empty).
  2. Remove the empty mspsimdirectory from both places
  3. After unzip mspsim-master, paste the unzipped mspsim-masterdirectory on both places
  4. Rename the directory from mspsim-masterto mspsimon both palces.
  5. Go to terminal (user@instant-contiki:~/contiki-3.0/tools/cooja$) and run this command ant run
  6. No need to use sudo
  1. 从此链接https://github.com/contiki-os/mspsim单独下载mspsim(检查您的home/contiki/tools/mspsimhome/contiki-3.0/tools/mspsim目录,两者可能都是空的)。
  2. 从两个地方删除空的mspsim目录
  3. 解压mspsim-master 后,将解压后的mspsim-master目录粘贴到两处
  4. 在两个地方将目录从mspsim-master重命名为mspsim
  5. 转到终端 (user@instant-contiki:~/contiki-3.0/tools/cooja$) 并运行此命令ant run
  6. 无需使用 sudo

Enjoy!

享受!

回答by u5821294

Please notice the last warring. If your English is not good, use Goolge Translate please. Just run "git submodule update --init" before run "ant run".

请注意最后的交战。如果你的英语不好,请使用谷歌翻译。只需在运行“ant run”之前运行“git submodule update --init”。

回答by Homayoon Homaei

Then when I, ant run same appears again

然后当我,蚂蚁跑的时候又出现了

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"?

My solution:

我的解决方案:

cd tools/cooja
rm -rf .git
cd ..
sudo git submodule update --init

Enjoy Cooja :)

享受 Cooja :)

回答by Tlos

Another solution for the Instant Contiki VMs would be:

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

mkdir ~/Downloads/contiki_clone

cd ~/Downloads/contiki_clone

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

When it clones the Contiki, simply:

当它克隆 Contiki 时,只需:

cd contiki/tools/cooja

git submodule update --init

ant run

These commands will let you have a brand new Contiki on your instant Contiki VM. You can simply delete the older contiki files in home directory and use this one. If you like to clone an older version, then:

这些命令将使您在即时 Contiki VM 上拥有一个全新的 Contiki。您可以简单地删除主目录中较旧的 contiki 文件并使用此文件。如果您想克隆旧版本,则:

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

回答by Ashwin Kannan

  • go to: contiki/tools/cooja
  • run: git submodule update --initin the terminal
  • now, try: ant run
  • 去: contiki/tools/cooja
  • 运行:git submodule update --init在终端中
  • 现在,尝试: ant run

回答by Shadaksharayya H A

Below steps worked for me after downloading and booting instant contiki 3.0 in VMware player.

在 VMware 播放器中下载并启动即时 contiki 3.0 后,以下步骤对我有用。

cd contiki

git submodule update --init

cd tools/cooja/

ant run

Instant contiki 3.0 downloaded from here.

这里下载即时 contiki 3.0 。

Remaining instructions are here.

其余说明在此处