forked from qt-creator/qt-creator
BareMetal: Auto-detect IAR EW toolchain for MSP430 architecture
Also we introduce the new 'msp430' architecture in ProjectExplorer::Abi. Change-Id: Ifb857abb29d78396b0d55a4604511951597f4415 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -71,8 +71,10 @@ static QString cppLanguageOption(const FilePath &compiler)
|
||||
const QString baseName = compiler.toFileInfo().baseName();
|
||||
if (baseName == "iccarm")
|
||||
return QString("--c++");
|
||||
if (baseName == "icc8051" || baseName == "iccavr" || baseName == "iccstm8")
|
||||
if (baseName == "icc8051" || baseName == "iccavr"
|
||||
|| baseName == "iccstm8" || baseName == "icc430") {
|
||||
return QString("--ec++");
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -191,6 +193,8 @@ static Abi::Architecture guessArchitecture(const Macros ¯os)
|
||||
return Abi::Architecture::AvrArchitecture;
|
||||
if (macro.key == "__ICCSTM8__")
|
||||
return Abi::Architecture::Stm8Architecture;
|
||||
if (macro.key == "__ICC430__")
|
||||
return Abi::Architecture::Msp430Architecture;
|
||||
}
|
||||
return Abi::Architecture::UnknownArchitecture;
|
||||
}
|
||||
@@ -212,7 +216,8 @@ static Abi::BinaryFormat guessFormat(Abi::Architecture arch)
|
||||
return Abi::BinaryFormat::ElfFormat;
|
||||
}
|
||||
if (arch == Abi::Architecture::Mcs51Architecture
|
||||
|| arch == Abi::Architecture::AvrArchitecture) {
|
||||
|| arch == Abi::Architecture::AvrArchitecture
|
||||
|| arch == Abi::Architecture::Msp430Architecture) {
|
||||
return Abi::BinaryFormat::UbrofFormat;
|
||||
}
|
||||
return Abi::BinaryFormat::UnknownFormat;
|
||||
@@ -431,6 +436,7 @@ QList<ToolChain *> IarToolChainFactory::autoDetect(const QList<ToolChain *> &alr
|
||||
{{"EWAVR"}, {"\\avr\\bin\\iccavr.exe"}},
|
||||
{{"EW8051"}, {"\\8051\\bin\\icc8051.exe"}},
|
||||
{{"EWSTM8"}, {"\\stm8\\bin\\iccstm8.exe"}},
|
||||
{{"EW430"}, {"\\430\\bin\\icc430.exe"}},
|
||||
};
|
||||
|
||||
QSettings registry(kRegistryNode, QSettings::NativeFormat);
|
||||
|
@@ -693,6 +693,8 @@ QString Abi::toString(const Architecture &a)
|
||||
return QLatin1String("asmjs");
|
||||
case Stm8Architecture:
|
||||
return QLatin1String("stm8");
|
||||
case Msp430Architecture:
|
||||
return QLatin1String("msp430");
|
||||
case UnknownArchitecture:
|
||||
Q_FALLTHROUGH();
|
||||
default:
|
||||
@@ -831,6 +833,8 @@ Abi::Architecture Abi::architectureFromString(const QStringRef &a)
|
||||
return ShArchitecture;
|
||||
if (a == "stm8")
|
||||
return Stm8Architecture;
|
||||
if (a == "msp430")
|
||||
return Msp430Architecture;
|
||||
else if (a == "xtensa")
|
||||
return XtensaArchitecture;
|
||||
if (a == "asmjs")
|
||||
|
@@ -60,6 +60,7 @@ public:
|
||||
Mcs51Architecture,
|
||||
AsmJsArchitecture,
|
||||
Stm8Architecture,
|
||||
Msp430Architecture,
|
||||
UnknownArchitecture
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user