⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compile.pl

📁 无线通信的主要编程软件,是无线通信工作人员的必备工具,关天相关教程我会在后续传上.
💻 PL
字号:
#!/usr/bin/perl -w# Script to compile an TinyOS app with CPU profiling support.  # Must be run from the base directory of the project (where the main # makefile is)# The 'make pc' and 'make mica2' commands should behave the same as with # the TinyOS sample apps: create app.c and main.exe in the build/{platform} # directories.# cilly must be in your path.use Cwd;if($ARGV[0] eq "--nomake") {    $make = 0;} else {    $make = 1;}$ROOT = $ENV{"TOSDIR"}."/../tools/scripts/PowerTOSSIM";$SCRIPTDIR="$ROOT";$BASEDIR = getcwd();$CYCLECOUNTS = "$ROOT/cycle_counts.txt";$CILLY = "$SCRIPTDIR/cilly.asm.exe";# system() returns 0 on success, hence the &&sif($make) {    system("make pc") && die "Can't compile base app for pc!\n";    system("make mica2") && die "Can't compile base app for mica2!\n";}system("cd build/pc && $CILLY --doCounter --out app.cil.c app.c > bb_line_tmp") && die "cilly error\n"; # print "cwd = ", getcwd(), "\n";system("$SCRIPTDIR/fixnames.pl build/pc/bb_line_tmp > build/pc/bb_linenum_map") && die "fixnames.pl error\n";chdir("build/pc") || die "Can't chdir: $!\n";system("$SCRIPTDIR/mypp.pl app.cil.c") && die "mypp.pl error\n";print "****************************\n";print "$SCRIPTDIR/bb2asm.pl $BASEDIR  $CYCLECOUNTS bb_linenum_map ../mica2/main.exe bb_cycle_map\n";print "****************************\n";system("$SCRIPTDIR/bb2asm.pl $BASEDIR  $CYCLECOUNTS bb_linenum_map ../mica2/main.exe bb_cycle_map") && die "bb2asm.pl error\n"; system("gcc -O3 -o a.out app.cil.mypp.c -lpthread");# Clean upsystem("rm bb_line_tmp") && die "rm failed\n";

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -