35 #include "tce_config.h"
60 addOption(outputFile);
69 return findOption(
"outputfile")->String();
73 return findOption(
"quiet")->isFlagOff();
77 std::cout <<
"tceasm - OpenASIP TTA parallel assembler "
83 int main(
int argc,
char *argv[]) {
93 std::cerr <<
"Error: Illegal commandline: "
100 std::cerr <<
"Error: Illegal number of parameters.\n\n";
115 std::cerr <<
"Error: " << adfFileName <<
" is not valid ADF file.\n\n";
121 std::cerr <<
"Error: cannot read " << asmFileName << std::endl;
128 std::string::size_type dotPosition = asmFileName.rfind(
'.');
129 std::string genOutputFileName;
133 if (dotPosition != std::string::npos) {
134 genOutputFileName = asmFileName.substr(0, dotPosition);
136 genOutputFileName = asmFileName;
139 genOutputFileName +=
".tpef";
152 bool failure =
false;
159 std::cerr << message.toString() << std::endl;
166 TPEFWriter::instance().writeBinary(tpefStream, compiledTPEF);
175 "Problems while writing Binary to file: " +
184 std::cerr <<
"Error while compiling file: " << asmFileName << std::endl
189 std::cerr <<
"Strange exception while compiling file: " << asmFileName << std::endl
194 std::cerr <<
"Unknown exception!\n";