diff options
Diffstat (limited to 'src/tools/pic30')
-rw-r--r-- | src/tools/pic30/gui/pic30_ui.cpp | 2 | ||||
-rw-r--r-- | src/tools/pic30/gui/pic30_ui.h | 1 | ||||
-rw-r--r-- | src/tools/pic30/pic30.cpp | 24 | ||||
-rw-r--r-- | src/tools/pic30/pic30.h | 14 | ||||
-rw-r--r-- | src/tools/pic30/pic30_compile.cpp | 80 | ||||
-rw-r--r-- | src/tools/pic30/pic30_compile.h | 64 | ||||
-rw-r--r-- | src/tools/pic30/pic30_generator.cpp | 8 |
7 files changed, 103 insertions, 90 deletions
diff --git a/src/tools/pic30/gui/pic30_ui.cpp b/src/tools/pic30/gui/pic30_ui.cpp index 9d1b2c4..b4760dc 100644 --- a/src/tools/pic30/gui/pic30_ui.cpp +++ b/src/tools/pic30/gui/pic30_ui.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "pic30_ui.h" -#include <qlabel.h> +#include <tqlabel.h> #include "common/gui/purl_gui.h" #include "tools/pic30/pic30_config.h" diff --git a/src/tools/pic30/gui/pic30_ui.h b/src/tools/pic30/gui/pic30_ui.h index d9890e7..85f798c 100644 --- a/src/tools/pic30/gui/pic30_ui.h +++ b/src/tools/pic30/gui/pic30_ui.h @@ -19,6 +19,7 @@ namespace PIC30 class ConfigWidget : public ToolConfigWidget { Q_OBJECT + TQ_OBJECT public: ConfigWidget(Project *project); virtual void initEntries(); diff --git a/src/tools/pic30/pic30.cpp b/src/tools/pic30/pic30.cpp index 45b9270..e846719 100644 --- a/src/tools/pic30/pic30.cpp +++ b/src/tools/pic30/pic30.cpp @@ -17,9 +17,9 @@ #include "pic30_generator.h" //---------------------------------------------------------------------------- -QString PIC30::Base::baseExecutable(bool, Tool::OutputExecutableType type) const +TQString PIC30::Base::baseExecutable(bool, Tool::OutputExecutableType type) const { - QString s = "pic30-"; + TQString s = "pic30-"; if ( type==Tool::OutputExecutableType::Coff ) s += "coff"; else s += "elf"; s += "-"; @@ -32,16 +32,16 @@ QString PIC30::Base::baseExecutable(bool, Tool::OutputExecutableType type) const case Tool::Category::Nb_Types: break; } Q_ASSERT(false); - return QString::null; + return TQString(); } -QStringList PIC30::Base::checkExecutableOptions(bool) const +TQStringList PIC30::Base::checkExecutableOptions(bool) const { if ( _category!=Tool::Category::BinToHex ) return "--version"; - return QStringList(); + return TQStringList(); } -bool PIC30::Base::checkExecutableResult(bool, QStringList &lines) const +bool PIC30::Base::checkExecutableResult(bool, TQStringList &lines) const { if ( lines.count()==0 ) return false; lines[0] = lines[0].stripWhiteSpace(); @@ -49,7 +49,7 @@ bool PIC30::Base::checkExecutableResult(bool, QStringList &lines) const case Tool::Category::Compiler: return lines[0].startsWith("pic30"); case Tool::Category::Assembler: return lines[0].startsWith("GNU assembler"); case Tool::Category::Linker: return lines[0].startsWith("GNU ld"); - case Tool::Category::BinToHex: return lines.join(" ").contains("Microchip "); + case Tool::Category::BinToHex: return lines.join(" ").tqcontains("Microchip "); case Tool::Category::Librarian: return lines[0].startsWith("GNU ar"); case Tool::Category::Nb_Types: break; } @@ -58,9 +58,9 @@ bool PIC30::Base::checkExecutableResult(bool, QStringList &lines) const } //---------------------------------------------------------------------------- -QString PIC30::Group::informationText() const +TQString PIC30::Group::informationText() const { - return i18n("The <a href=\"%1\">PIC30 ToolChain</a> is a toolsuite for 16-bit PICs available from Microchip. Most of it is available under the GNU Public License.").arg("http://microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010065&part=SW006012"); + return i18n("The <a href=\"%1\">PIC30 ToolChain</a> is a toolsuite for 16-bit PICs available from Microchip. Most of it is available under the GNU Public License.").tqarg("http://microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010065&part=SW006012"); } Tool::Group::BaseData PIC30::Group::baseFactory(Tool::Category category) const @@ -71,10 +71,10 @@ Tool::Group::BaseData PIC30::Group::baseFactory(Tool::Category category) const return BaseData(); } -QValueList<const Device::Data *> PIC30::Group::getSupportedDevices(const QString &) const +TQValueList<const Device::Data *> PIC30::Group::getSupportedDevices(const TQString &) const { - QValueList<const Device::Data *> list; - QValueVector<QString> devices = Device::lister().group("pic")->supportedDevices(); + TQValueList<const Device::Data *> list; + TQValueVector<TQString> devices = Device::lister().group("pic")->supportedDevices(); for (uint i=0; i<devices.count(); i++) { const Device::Data *data = Device::lister().data(devices[i]); if ( static_cast<const Pic::Data *>(data)->is16bitFamily() ) list.append(data); diff --git a/src/tools/pic30/pic30.h b/src/tools/pic30/pic30.h index a490ed0..93e54c7 100644 --- a/src/tools/pic30/pic30.h +++ b/src/tools/pic30/pic30.h @@ -18,20 +18,20 @@ namespace PIC30 class Base : public Tool::Base { public: - virtual QString baseExecutable(bool withWine, Tool::OutputExecutableType type) const; + virtual TQString baseExecutable(bool withWine, Tool::OutputExecutableType type) const; private: - virtual QStringList checkExecutableOptions(bool withWine) const; - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const; + virtual TQStringList checkExecutableOptions(bool withWine) const; + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const; }; //---------------------------------------------------------------------------- class Group : public Tool::Group { public: - virtual QString name() const { return "pic30"; } - virtual QString label() const { return i18n("PIC30 Toolchain"); } - virtual QString informationText() const; + virtual TQString name() const { return "pic30"; } + virtual TQString label() const { return i18n("PIC30 Toolchain"); } + virtual TQString informationText() const; virtual bool hasDirectory(Compile::DirectoryType type) const { return type==Compile::DirectoryType::Header || type==Compile::DirectoryType::LinkerScript || type==Compile::DirectoryType::Library; } virtual PURL::Directory autodetectDirectory(Compile::DirectoryType type, const PURL::Directory &execDir, bool withWine) const; virtual bool hasOutputExecutableType(Tool::OutputExecutableType type) const { return ( type==Tool::OutputExecutableType::Coff || type==Tool::OutputExecutableType::Elf ); } @@ -43,7 +43,7 @@ public: private: virtual BaseData baseFactory(Tool::Category category) const; - virtual QValueList<const Device::Data *> getSupportedDevices(const QString &s) const; + virtual TQValueList<const Device::Data *> getSupportedDevices(const TQString &s) const; virtual Compile::Process *processFactory(const Compile::Data &data) const; virtual Compile::Config *configFactory(::Project *project) const; virtual Tool::SourceGenerator *sourceGeneratorFactory() const; diff --git a/src/tools/pic30/pic30_compile.cpp b/src/tools/pic30/pic30_compile.cpp index 02cbb35..3674e4b 100644 --- a/src/tools/pic30/pic30_compile.cpp +++ b/src/tools/pic30/pic30_compile.cpp @@ -13,9 +13,9 @@ #include "devices/list/device_list.h" //----------------------------------------------------------------------------- -QStringList PIC30::CompileFile::genericArguments(const Compile::Config &config) const +TQStringList PIC30::CompileFile::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += "-S"; // compile only args += "$NO_AUTO_DEVICE(-mcpu=%DEVICE)"; args += config.includeDirs(Tool::Category::Compiler, "-I"); @@ -25,43 +25,43 @@ QStringList PIC30::CompileFile::genericArguments(const Compile::Config &config) return args; } -QString PIC30::CompileFile::outputFiles() const +TQString PIC30::CompileFile::outputFiles() const { return "PURL::AsmPIC30"; } -void PIC30::CompileFile::logStderrLine(const QString &line) +void PIC30::CompileFile::logStderrLine(const TQString &line) { // #### TODO - doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized + doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized } //----------------------------------------------------------------------------- -QStringList PIC30::CompileStandaloneFile::genericArguments(const Compile::Config &config) const +TQStringList PIC30::CompileStandaloneFile::genericArguments(const Compile::Config &config) const { - QStringList args = CompileFile::genericArguments(config); + TQStringList args = CompileFile::genericArguments(config); args += "%I"; return args; } -QString PIC30::CompileStandaloneFile::outputFiles() const +TQString PIC30::CompileStandaloneFile::outputFiles() const { return CompileFile::outputFiles() + " PURL::Object PURL::Elf"; } //----------------------------------------------------------------------------- -QStringList PIC30::CompileProjectFile::genericArguments(const Compile::Config &config) const +TQStringList PIC30::CompileProjectFile::genericArguments(const Compile::Config &config) const { - QStringList args = CompileFile::genericArguments(config); + TQStringList args = CompileFile::genericArguments(config); args += "-g"; args += "%I"; return args; } //----------------------------------------------------------------------------- -QStringList PIC30::AssembleFile::genericArguments(const Compile::Config &config) const +TQStringList PIC30::AssembleFile::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += "-g"; args += "-a=%LIST"; // listing args += "-o%O"; @@ -70,45 +70,45 @@ QStringList PIC30::AssembleFile::genericArguments(const Compile::Config &config) return args; } -QString PIC30::AssembleFile::outputFiles() const +TQString PIC30::AssembleFile::outputFiles() const { return "PURL::Object PURL::Lst"; } -void PIC30::AssembleFile::logStderrLine(const QString &line) +void PIC30::AssembleFile::logStderrLine(const TQString &line) { // #### TODO - doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized + doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized } //----------------------------------------------------------------------------- -QStringList PIC30::AssembleStandaloneFile::genericArguments(const Compile::Config &config) const +TQStringList PIC30::AssembleStandaloneFile::genericArguments(const Compile::Config &config) const { - QStringList args = AssembleFile::genericArguments(config); + TQStringList args = AssembleFile::genericArguments(config); args += "$NO_AUTO_DEVICE(-p%DEVICE)"; args += "%I"; return args; } //----------------------------------------------------------------------------- -QStringList PIC30::AssembleProjectFile::genericArguments(const Compile::Config &config) const +TQStringList PIC30::AssembleProjectFile::genericArguments(const Compile::Config &config) const { - QStringList args = AssembleFile::genericArguments(config); + TQStringList args = AssembleFile::genericArguments(config); if ( !_data.items[0].generated ) args += "-p%DEVICE"; args += "%I"; return args; } //----------------------------------------------------------------------------- -QString PIC30::Link::outputFilepath() const +TQString PIC30::Link::outputFilepath() const { PURL::FileType type = Compile::Config::outputExecutableType(group()).data().type; return filepath(type); } -QStringList PIC30::Link::genericArguments(const Compile::Config &config) const +TQStringList PIC30::Link::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += "-Map"; args += "%MAP"; args += "-o%O"; @@ -121,39 +121,39 @@ QStringList PIC30::Link::genericArguments(const Compile::Config &config) const return args; } -QString PIC30::Link::outputFiles() const +TQString PIC30::Link::outputFiles() const { PURL::FileType type = Compile::Config::outputExecutableType(group()).data().type; - return QString("PURL::Map PURL::") + type.key(); + return TQString("PURL::Map PURL::") + type.key(); } -void PIC30::Link::logStderrLine(const QString &line) +void PIC30::Link::logStderrLine(const TQString &line) { // #### TODO - doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized + doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized } //----------------------------------------------------------------------------- -QStringList PIC30::LinkStandalone::genericArguments(const Compile::Config &config) const +TQStringList PIC30::LinkStandalone::genericArguments(const Compile::Config &config) const { - QStringList args = Link::genericArguments(config); + TQStringList args = Link::genericArguments(config); args += config.customLibraries(Tool::Category::Linker); return args; } //----------------------------------------------------------------------------- -QStringList PIC30::LinkProject::genericArguments(const Compile::Config &config) const +TQStringList PIC30::LinkProject::genericArguments(const Compile::Config &config) const { - QStringList args = Link::genericArguments(config); + TQStringList args = Link::genericArguments(config); args += "%LIBS"; args += config.customLibraries(Tool::Category::Linker); return args; } //----------------------------------------------------------------------------- -QStringList PIC30::LibraryProject::genericArguments(const Compile::Config &) const +TQStringList PIC30::LibraryProject::genericArguments(const Compile::Config &) const { - QStringList args; + TQStringList args; args += "-rc"; // insert new + do not warn if creating library args += "%O"; args += "%LIBS"; @@ -161,36 +161,36 @@ QStringList PIC30::LibraryProject::genericArguments(const Compile::Config &) con return args; } -void PIC30::LibraryProject::logStderrLine(const QString &line) +void PIC30::LibraryProject::logStderrLine(const TQString &line) { // #### TODO - doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized + doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized } -QString PIC30::LibraryProject::outputFiles() const +TQString PIC30::LibraryProject::outputFiles() const { return "PURL::Library"; } //----------------------------------------------------------------------------- -QString PIC30::BinToHex::inputFilepath(uint) const +TQString PIC30::BinToHex::inputFilepath(uint) const { PURL::FileType type = Compile::Config::outputExecutableType(group()).data().type; return filepath(type); } -QStringList PIC30::BinToHex::genericArguments(const Compile::Config &) const +TQStringList PIC30::BinToHex::genericArguments(const Compile::Config &) const { return "%I"; } -QString PIC30::BinToHex::outputFiles() const +TQString PIC30::BinToHex::outputFiles() const { return "PURL::Hex"; } -void PIC30::BinToHex::logStderrLine(const QString &line) +void PIC30::BinToHex::logStderrLine(const TQString &line) { // #### TODO - doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized + doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized } diff --git a/src/tools/pic30/pic30_compile.h b/src/tools/pic30/pic30_compile.h index c298eac..39bc243 100644 --- a/src/tools/pic30/pic30_compile.h +++ b/src/tools/pic30/pic30_compile.h @@ -17,110 +17,122 @@ namespace PIC30 class Process : public Compile::Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString deviceName() const { return _data.device; } + virtual TQString deviceName() const { return _data.device; } }; //----------------------------------------------------------------------------- class CompileFile : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; - virtual void logStderrLine(const QString &line); + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual void logStderrLine(const TQString &line); }; //----------------------------------------------------------------------------- class CompileStandaloneFile : public CompileFile { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; }; //----------------------------------------------------------------------------- class CompileProjectFile : public CompileFile { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class AssembleFile : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString outputFilepath() const { return filepath(PURL::Object); } - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; - virtual void logStderrLine(const QString &line); + virtual TQString outputFilepath() const { return filepath(PURL::Object); } + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual void logStderrLine(const TQString &line); }; //----------------------------------------------------------------------------- class AssembleStandaloneFile : public AssembleFile { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class AssembleProjectFile : public AssembleFile { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class Link : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString outputFilepath() const; - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; - virtual void logStderrLine(const QString &line); + virtual TQString outputFilepath() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual void logStderrLine(const TQString &line); }; //----------------------------------------------------------------------------- class LinkStandalone : public Link { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class LinkProject : public Link { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class LibraryProject : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; - virtual void logStderrLine(const QString &line); + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual void logStderrLine(const TQString &line); }; //----------------------------------------------------------------------------- class BinToHex : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString inputFilepath(uint i) const; - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; - virtual void logStderrLine(const QString &line); + virtual TQString inputFilepath(uint i) const; + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual void logStderrLine(const TQString &line); }; } // namespace diff --git a/src/tools/pic30/pic30_generator.cpp b/src/tools/pic30/pic30_generator.cpp index fe874e3..119c466 100644 --- a/src/tools/pic30/pic30_generator.cpp +++ b/src/tools/pic30/pic30_generator.cpp @@ -18,9 +18,9 @@ SourceLine::List PIC30::SourceGenerator::configLines(PURL::ToolType type, const SourceLine::List lines; for (uint i=0; i<data.nbWords(Pic::MemoryRangeType::Config); i++) { const Pic::Config::Word &cword = config._words[i]; - QStringList cnames = SourceLine::configNames(Pic::ConfigNameType::Default, pmemory, i, ok); + TQStringList cnames = SourceLine::configNames(Pic::ConfigNameType::Default, pmemory, i, ok); if ( cnames.isEmpty() ) continue; - QString code; + TQString code; if ( type==PURL::ToolType::Assembler ) code += "config __" + cword.name + ", "; else code += "_" + cword.name + "("; code += cnames.join(" & "); @@ -76,7 +76,7 @@ SourceLine::List PIC30::SourceGenerator::sourceFileContent(PURL::ToolType type, lines.appendIndentedCode("NOP", i18n("nop after SPLIM initialization")); lines.appendIndentedCode("CALL _wreg_init", i18n("call _wreg_init subroutine")); lines.appendEmpty(); - lines.appendIndentedCode(QString::null, "<<" + i18n("insert code") + ">>"); + lines.appendIndentedCode(TQString(), "<<" + i18n("insert code") + ">>"); lines.appendEmpty(); lines.appendNotIndentedCode("done:"); lines.appendIndentedCode("BRA done", i18n("loop forever")); @@ -95,7 +95,7 @@ SourceLine::List PIC30::SourceGenerator::sourceFileContent(PURL::ToolType type, lines.appendTitle(i18n("Timer1 interrupt service routine")); lines.appendNotIndentedCode("__T1Interrupt:"); lines.appendIndentedCode("PUSH.D W4", i18n("example of context saving (push W4 and W5)")); - lines.appendIndentedCode(QString::null, "<<" + i18n("insert interrupt code") + ">>"); + lines.appendIndentedCode(TQString(), "<<" + i18n("insert interrupt code") + ">>"); lines.appendIndentedCode("BCLR IFS0, #T1IF", i18n("clear Timer1 interrupt flag status bit")); lines.appendIndentedCode("POP.D W4", i18n("restore context from stack")); lines.appendIndentedCode("RETFIE"); |