- 易迪拓培训,专注于微波、射频、天线设计工程师的培养
同一套代码实现不同的项目使用不同的客制化分区表
录入:edatop.com 点击:
[DESCRIPTION]
同一个平台上,有的客户需要内置存储,有的要去掉内置存储; 这样分区表不能共用。
[SOLUTION]
此功能在72平台有实现,其他平台若需要,可以参考72的/mediatek/build/tools/ptgen/MT65**/ptgen.pl进行修改;
对应的分区表在\mediatek\config\${project}\partition_table_MT65**.xls;
主要修改为添加
my $PROJECT_PART_TABLE_FILENAME = "mediatek/config/$PROJECT/partition_table_${PLATFORM}.xls";
my $FULL_PROJECT_PART_TABLE_FILENAME = "mediatek/config/$FULL_PROJECT/partition_table_${PLATFORM}.xls";
注释
#$PartitonBook = SpreADSheet: : ParseExcel->new()- > Parse($PART_TABLE_FILENAME);
修改
sub ReadExcelFile()
{
my $sheet = load_partition_info($SHEET_NAME);
添加
#****************************************************************************************
# subroutine: get_partition_sheet
# return: Excel worksheet no matter it's in merge area or not, and in windows or not
# input: Specified Excel Sheetname
# input: Excel filename
#****************************************************************************************
sub get_partition_sheet {
my ($sheetName, $fileName) = @_;
my $parser = Spreadsheet:: ParseExcel->new();
my $workbook = $parser- > Parse($fileName);
my $sheet;
if(!defined $workbook) {
print "get workbook fROM $fileName failed, error: ", $parser->error, ".\n";
return undef;
} else {
$sheet = get_sheet($sheetName, $workbook);
if(!defined $sheet) {
print "get $sheetName sheet failed.\n";
return undef;
}
return $sheet;
}
}
#****************************************************************************************
# subroutine: load_partition_info
# return: Excel worksheet no matter it's in merge area or not, and in windows or not
# input: Specified Excel Sheetname
#****************************************************************************************
sub load_partition_info {
my ($sheetName) = @_;
my $sheet;
# get from full project path first
$sheet = get_partition_sheet($sheetName, $FULL_PROJECT_PART_TABLE_FILENAME);
if(!defined $sheet) {
print "get partition sheet from $FULL_PROJECT_PART_TABLE_FILENAME failed, try
$PROJECT_PART_TABLE_FILENAME...\n";
# get from project path
$sheet = get_partition_sheet($sheetName, $PROJECT_PART_TABLE_FILENAME);
if(!defined $sheet) {
print "get partition sheet from $PROJECT_PART_TABLE_FILENAME failed, try $PART_TABLE_FILENAME...\n";
# get from default platform path
$sheet = get_partition_sheet($sheetName, $PART_TABLE_FILENAME);
if(!defined $sheet) {
my $error_msg = " Ptgen CAN NOT find sheet=$SHEET_NAME in $PART_TABLE_FILENAME\n";
print $error_msg;
die $error_msg;
}
}
}
return $sheet;
}
同一个平台上,有的客户需要内置存储,有的要去掉内置存储; 这样分区表不能共用。
[SOLUTION]
此功能在72平台有实现,其他平台若需要,可以参考72的/mediatek/build/tools/ptgen/MT65**/ptgen.pl进行修改;
对应的分区表在\mediatek\config\${project}\partition_table_MT65**.xls;
主要修改为添加
my $PROJECT_PART_TABLE_FILENAME = "mediatek/config/$PROJECT/partition_table_${PLATFORM}.xls";
my $FULL_PROJECT_PART_TABLE_FILENAME = "mediatek/config/$FULL_PROJECT/partition_table_${PLATFORM}.xls";
注释
#$PartitonBook = SpreADSheet: : ParseExcel->new()- > Parse($PART_TABLE_FILENAME);
修改
sub ReadExcelFile()
{
my $sheet = load_partition_info($SHEET_NAME);
添加
#****************************************************************************************
# subroutine: get_partition_sheet
# return: Excel worksheet no matter it's in merge area or not, and in windows or not
# input: Specified Excel Sheetname
# input: Excel filename
#****************************************************************************************
sub get_partition_sheet {
my ($sheetName, $fileName) = @_;
my $parser = Spreadsheet:: ParseExcel->new();
my $workbook = $parser- > Parse($fileName);
my $sheet;
if(!defined $workbook) {
print "get workbook fROM $fileName failed, error: ", $parser->error, ".\n";
return undef;
} else {
$sheet = get_sheet($sheetName, $workbook);
if(!defined $sheet) {
print "get $sheetName sheet failed.\n";
return undef;
}
return $sheet;
}
}
#****************************************************************************************
# subroutine: load_partition_info
# return: Excel worksheet no matter it's in merge area or not, and in windows or not
# input: Specified Excel Sheetname
#****************************************************************************************
sub load_partition_info {
my ($sheetName) = @_;
my $sheet;
# get from full project path first
$sheet = get_partition_sheet($sheetName, $FULL_PROJECT_PART_TABLE_FILENAME);
if(!defined $sheet) {
print "get partition sheet from $FULL_PROJECT_PART_TABLE_FILENAME failed, try
$PROJECT_PART_TABLE_FILENAME...\n";
# get from project path
$sheet = get_partition_sheet($sheetName, $PROJECT_PART_TABLE_FILENAME);
if(!defined $sheet) {
print "get partition sheet from $PROJECT_PART_TABLE_FILENAME failed, try $PART_TABLE_FILENAME...\n";
# get from default platform path
$sheet = get_partition_sheet($sheetName, $PART_TABLE_FILENAME);
if(!defined $sheet) {
my $error_msg = " Ptgen CAN NOT find sheet=$SHEET_NAME in $PART_TABLE_FILENAME\n";
print $error_msg;
die $error_msg;
}
}
}
return $sheet;
}
占位。。
学习学习
路过,学习了。
申明:网友回复良莠不齐,仅供参考。如需专业帮助,请学习易迪拓培训专家讲授的ADS视频培训课程。
ADS培训课程推荐详情>>
国内最全面、最专业的Agilent ADS培训课程,可以帮助您从零开始,全面系统学习ADS设计应用【More..】
- Agilent ADS教学培训课程套装
- 两周学会ADS2011、ADS2013视频教程
- ADS2012、ADS2013射频电路设计详解
- ADS高低阻抗线微带滤波器设计培训教程
- ADS混频器仿真分析实例视频培训课程
- ADS Momentum电磁仿真设计视频课程
- ADS射频电路与通信系统设计高级培训
- ADS Layout和电磁仿真设计培训视频
- ADS Workspace and Simulators Training Course
- ADS Circuit Simulation Training Course
- ADS Layout and EM Simulation Training Course
- Agilent ADS 内部原版培训教材合集