Commit Graph

171 Commits

Author SHA1 Message Date
Denis Shienkov
b86375ad5d BareMetal: Add support for RISC-V architecture in GCC toolchain
This commit adds support for the RISC-V atchitecture:

 * https://riscv.org/

using GCC toolchains.

Tested auto-detection on Windows using the GCC v7.7.1 toolchain
provided from the following URL:

 * https://gnutoolchains.com/risc-v/

Change-Id: Ice10469ebda8af9cf7bf32299bb38e548b30b315
Reviewed-by: hjk <hjk@qt.io>
2020-05-15 15:17:31 +00:00
Denis Shienkov
005b943ad5 ProjectExplorer: Add support for new RISC-V architecture
This commit adds new ProjectExplorer::Abi::RiscVArchitecture
entry for the RISC-V architecture:

 * https://riscv.org/

Change-Id: I0cd73cca22a2852203372efbccc51d74581d8f50
Reviewed-by: hjk <hjk@qt.io>
2020-05-15 15:17:03 +00:00
Denis Shienkov
c21f2b4286 BareMetal: Add support for V850 architecture in GCC toolchain
This commit adds support for the Renesas V850 atchitecture:

* https://www.renesas.com/us/en/products/microcontrollers-microprocessors/v850.html

using GCC toolchains.

Change-Id: I2224b3241040c02196b39ff013659d2b8c692208
Reviewed-by: hjk <hjk@qt.io>
2020-05-15 15:16:37 +00:00
Denis Shienkov
e35f945758 BareMetal: Add AVR32 architecture to the ProjectExplorer::Abi
Change-Id: I2d70dda8d91bccc34b6e1c16c70bc5b3e0ca1b1f
Reviewed-by: hjk <hjk@qt.io>
2020-05-14 07:40:53 +00:00
Denis Shienkov
02b9d9b7a2 BareMetal: Auto-detect IAR toolchain for Renesas 78K architecture
This patch implements auto-detection for the 78K toolchain,
provided by IAR Systems:

 * https://www.iar.com/iar-embedded-workbench/#!?architecture=78K

Change-Id: Idef5e8982984c0cf24c120d31af0f6cee210694b
Reviewed-by: hjk <hjk@qt.io>
2020-04-29 08:05:27 +00:00
Denis Shienkov
e4b889802e BareMetal: Auto-detect IAR toolchain for Renesas RX architecture
This patch implements auto-detection for the RX toolchain,
provided by IAR Systems:

 * https://www.iar.com/iar-embedded-workbench/#!?architecture=RX

Change-Id: I3f00ca525fef8b0ce989f1e0f97857446d04449c
Reviewed-by: hjk <hjk@qt.io>
2020-04-29 08:05:10 +00:00
Denis Shienkov
d5f107bb54 BareMetal: Auto-detect IAR toolchain for Renesas RH850 architecture
This patch implements auto-detection for the RH850 toolchain,
provided by IAR Systems:

 * https://www.iar.com/iar-embedded-workbench/#!?architecture=RH850

Change-Id: I15f54026b052be7b84a96f9c43a32b83ea499f38
Reviewed-by: hjk <hjk@qt.io>
2020-04-29 08:04:47 +00:00
Denis Shienkov
96934b9eeb BareMetal: Auto-detect IAR toolchain for Renesas V850 architecture
This patch implements auto-detection for the V850 toolchain,
provided by IAR Systems:

 * https://www.iar.com/iar-embedded-workbench/#!?architecture=V850

Change-Id: I89c2b2ab87f0b32af4e25e77b8a3b6381481c4cc
Reviewed-by: hjk <hjk@qt.io>
2020-04-28 14:04:00 +00:00
Denis Shienkov
4672aff903 BareMetal: Add support for Keil C166 toolchain on Windows
This commit provides support for the C166 compiler provided by Keil:

* http://www.keil.com/c166/

Now QtC auto-detect installed C166 compiler, its ABI's, headers,
and pre-defined macros. Additionally, we have added the new 'c166'
architecture to the ABI.

Change-Id: I63bd39aff48d19e430b2e58b8b4531c33eaa0e4a
Reviewed-by: hjk <hjk@qt.io>
2020-04-14 18:30:17 +00:00
Denis Shienkov
83d2271ec6 BareMetal: Add support for Keil C251 toolchain
This patch adds support for the C251 toolchain, provided by KEIL:

 * http://www.keil.com/c251/

Now the auto-detected C251 compiler will be displayed with an
appropriate ABI on the "Options->Kits->Compilers" page.

Change-Id: I40cf2b82117420b2eddb09cad902c9f264bac062
Reviewed-by: hjk <hjk@qt.io>
2020-03-20 07:40:34 +00:00
Christian Kandeler
c8e560b3bd ProjectExplorer: Fix MSVC compatibility check
Amends bd03041428.

Fixes: QTCREATORBUG-23706
Change-Id: I2ebf4c350cd0ff6b95535f614eec2379a704a0d4
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-03-16 15:23:03 +00:00
Christian Kandeler
bd03041428 QtSupport: Prevent misleading message about ABI mismatch
MSVC 2015/17/19 are ABI compatible, but BaseQtVersion::validateKit()
would emit a warning when using e.g. a Qt MSVC 2017 build with an MSVC
2019 toolchain.

Change-Id: I50ba026ae7b55e052b26826076ef962f369a05a1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-02-27 14:21:06 +00:00
Alessandro Portale
24a25eed14 Use isEmpty() instead of count() or size()
Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-20 20:56:57 +00:00
Denis Shienkov
439f479c6d ProjectExplorer: Add new RL78 architecture
This architecture provided by Renesas:

* https://en.wikipedia.org/wiki/RL78

... and are used in the bare-metal programming.

Change-Id: Iec56192e756aa475b1cdfce1aa1ff9c24feb00cd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-05 13:01:50 +00:00
Nikolai Kosjar
6c1b11dd3e ProjectExplorer: Simplify
bugprone-branch-clone
readability-simplify-boolean-expr

Change-Id: Iaaac21e96a3e9db6b9819d77fdae623ede373e59
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-01 09:31:32 +00:00
BogDan Vatra
6b31f9cf23 Android multi arch support
[ChangeLog][Android] Android multi arch support for qmake

Change-Id: Ib8b1874604a3392130c96fbc00b26713b3d788ae
Reviewed-by: hjk <hjk@qt.io>
2019-09-16 07:34:54 +00:00
Denis Shienkov
7c7201c56c ProjectExplorer: Detect ABI for GCC MSP430 compiler
This GCC compiler provides by Texas Instruments
for the MSP430 architecture.

Change-Id: I3ce330d0a14bd338f9350291242dcc434bb0d19e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-16 06:06:12 +00:00
Denis Shienkov
88c91b0586 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>
2019-08-16 06:05:59 +00:00
hjk
678793675b ProjectExplorer: Remove stray semicolons
Change-Id: I2fc02ee07daa28609f39e4e78f3860bb768ea6e9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-08-05 15:35:51 +00:00
Denis Shienkov
936e53ceff ProjectExplorer: Introduce new STM8 architecture
This architecture is useful in programming of a bare-metal
devices, based on 8-bit microcontrollers from STMicroelectronics:

* https://en.wikipedia.org/wiki/STM8

Change-Id: Ie5d28a29aaa36e65a29bb96f988e6ee4327e1e9e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-26 14:09:47 +00:00
Alessandro Portale
b89ad81293 WebAssembly: Initial commit
This change adds WebAssembly support in the shape of a plugin.

- Auto-detection of the emsdk toolchain
- Handling of "asmjs-unknown-emscripten" Abi
- Binary detection of WebAssembly libraries
- Auto-creation of a "WebAssembly runtime" device (with icon)
- Runconfiguration that launches the application via the "emrun"
  tool which spawns a local web server and runs the application on
  the chosen web browser.

Limitations:
- So far only tested on Windows/MinGW and Linux
- Not yet tested with Qt WebAssembly installation form the installer
  Only tested with self-built Qt and manually added kit
- The attempt to launch an application via emrun, while a previous
  application is still running, will fail. The reason is that the
  web servers spawned by emrun listen to the same default port but
  serve only the content of one application.
  Possible solutions: We could either spawn the different web servers
  with different ports, or we could use one single web server instance
  which serves the whole default project location (home directory).

Task-number: QTCREATORBUG-21068
Task-number: QTCREATORBUG-22249
Change-Id: I1a16fbe52382d45c37e9bc624a943a6ca475fa09
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-07-25 13:17:51 +00:00
Denis Shienkov
6e1595c1b3 ProjectExplorer: Interpret 'none' compiler part as BareMetalOS
Usually, the GCC compilers with a names like "arm-none-eabi-gcc"
are used for a bare-metal devices.

Change-Id: I30acd554b44ae625383ec615454d258361e78074
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-11 14:10:10 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
hjk
2ac89cba92 ProjectExplorer: Use an alias for QList<Abi>
Change-Id: I69231c5974620ae30296bfc4e0ab41c900d95a3c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-27 09:35:53 +00:00
BogDan Vatra
dd9086530f Android: Nuke mips[64] support
There is no mips[64] support in Android anymore.

Change-Id: Ia7829e06c8e5658fb6ee9d20ea34d621a9651f37
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-05-07 15:08:03 +00:00
Christian Kandeler
e94f5b496e Improve kit auto-detection
The old code was too simplistic: Basically, we just took a random
toolchain, slapped a random Qt onto it and made that the default kit.
Instead, we now go through all toolchains, try to find a matching Qt
version, debugger etc and create a kit for that combination unless there
is a better one.

Fixes: QTCREATORBUG-22138
Change-Id: Ib57ca4453a93ee9253c75398328c3bca33087dc6
Reviewed-by: hjk <hjk@qt.io>
2019-03-19 17:19:38 +00:00
Denis Shienkov
a4b9d57824 bare-metal: Add support for KEIL toolchain
This patch adds support for the toolchains, provided by
KEIL:

 * http://www.keil.com/c51/
 * http://www2.keil.com/mdk5/

Now QtC's compiler page have additional 'KEIL' selector
which allows to user to choose a desired C/C++ compiler
from set of the KEIL toolchains.

In this case the QtC will tries to detect the compiler ABI,
in which was added the additional OMF binary format type
which is produced by C51 compiler:

 * http://www.keil.com/support/docs/93.htm

Currently are supported the following architectures:

 * ARM
 * 8051 (aka MCS51)

In addition, were added changes to the QBS Project Manager
plugin to make it work with QBS 1.13 (where previously were
added support for KEIL toolchain).

So, now do not need to do an additional 'hacks' into the
'qbs.toolchain' property of QtC KEIL kit.

Following features are not implemented yet:

* Debugger integration.
* Compile output parsers.
* Toolchains auto-detection.
* Support for C251, C166 architectures.

Change-Id: If0cc18d22b7dc0e5ce9096bdb3dc699ee3edde66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-11 13:47:36 +00:00
Christian Kandeler
9606e240f7 ProjectExplorer: Add missing fromString() functions
... for newly added architectures and binary formats.
Amends 1caff90686.

Change-Id: I35607d7bf97270db9689a8c0f4ec2c756fdabcdf
Reviewed-by: hjk <hjk@qt.io>
2019-03-11 10:15:37 +00:00
Przemyslaw Gorszkowski
f7625e82e9 bare-metal: adjust conversion from BinaryFormat to QString in Abi
Change-Id: Id5a1c1d8c7f1048539550939f39a25efe13e2246
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-03-10 10:23:38 +00:00
Denis Shienkov
1caff90686 bare-metal: Add support for IAR EW toolchain
This patch adds support for the toolchains, provided by
IAR Embedded Workbench:

 *  https://www.iar.com/iar-embedded-workbench/

Now QtC's compiler page have additional 'IAREW' selector
which allows to user to choose a desired C/C++ compiler
from set of the IAR EW toolchains.

In this case the QtC will tries to detect the compiler ABI,
in which was added the additional MCS51 architecture (which
includes all family for Intel x8051 MCU's):

 * https://en.wikipedia.org/wiki/Intel_MCS-51

Also, now the ABI has an additional proprietary UBROF binary
format type which is produced by some of IAR EW compilers:

 * https://netstorage.iar.com/SuppDB/Public/UPDINFO/011281/ew/doc/EW_MigrationFromUBROF.pdf
 * https://netstorage.iar.com/SuppDB/Public/UPDINFO/013556/ew/doc/UBROFRecordTags.pdf

Currently are supported the following architectures:

 * ARM
 * 8051 (aka MCS51)
 * AVR

In addition, were added changes to the QBS Project Manager
plugin to make it work with QBS 1.13 (where previously were
added support for IAR toolchain).

So, now do not need to do an additional 'hacks' into the
'qbs.toolchain' property of QtC IAR kit.

Following features are not implemented yet:

* C-SPY debugger integration.
* Compile output parsers.
* Toolchains auto-detection.

Change-Id: I4a7794efe8dc15652f5a7f1f3dd966c367943484
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-03-07 14:38:51 +00:00
Ivan Donchevskii
1f804e7fc7 ProjectExplorer: Add MSVC2019 flavor support
It is promised to be compatible with prior versions.

Change-Id: I85e433382a66c82e9880401c3a983fef06c03606
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-08 14:04:06 +00:00
Michael Kopp
7e45ccc99b determine gdb target ABI by parsing 'gdb --configuration'
Currently, the gdb target ABI is determined by running
`gdb -version`, which for recent gdb's does not reproduce
the target ABI string -- yet this string is searched in
the output.  This obviously fails, and qtcreator uses a
fallback behavior, that is not suitable when using gdb
for debugging on targets (like avr microcontrollers).
With this change, QtCreator calls `gdb --configuration`
if that is supported by gdb and extracts `<string> from
`--target=<string>` in the output.

For older versions of gdb (which do not support the
`--configuration` flag, but still have the target
information in the output of `--version`, the output of
`--version` is parsed.

If both methods fail, no ABI is set for gdb.

Change-Id: Ib406f6700b63e2cedb46bd4ec8cc0d215677ecdc
Reviewed-by: Michael Kopp <kopp.michael@yahoo.de>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-12-13 21:35:28 +00:00
Tobias Hunger
383f0b9fcc Qmake: Use target-specific extension for deployment
Add file extensions to execatables about to be deployed based on the
OS found in the toolchain's targetAbi instead of using the hostOs().

This should fix deployment from windows to non-windows machines.

Task-number: QTCREATORBUG-21608
Change-Id: I83678bda1d56ff24848b7b498b95081d00b5a5f0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-12-02 09:34:58 +00:00
Alessandro Portale
8d19333075 ProjectExplorer: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init
modernize-use-equals-default
modernize-use-transparent-functors

Change-Id: Iebed22caa2e733d292f334e956e3d16b844e14e3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-16 10:01:53 +00:00
Christian Stenger
10d4792c85 ProjectExplorer: Fix compile for gcc4.9
Change-Id: I60a85f39183cd7855d8aa2093e67dbbe8478a70f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-21 12:03:23 +00:00
Tobias Hunger
55aab0e910 Abi: Allow for user-defined OS flavors
Allow for user-defined OS flavors to be registered by plugins.

Make sure the GenericFlavor and UnknownFlavor are always listed
last to keep the UI happy.

Keep the Abi::OsFlavor enums for compatibility. All of them are
pre-registered in the OSes they were available before.

Task-number: QTCREATORBUG-19899
Change-Id: I9bf6ef8b256cf42abd5fa1fe536cbe5dfadd3dd0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-21 11:10:04 +00:00
Tobias Hunger
23e27ead9e Abi: Only have one "generic" flavor
Replace GenericLinuxFlavor, GenericUnixFlavor, GenericDarwinFlavor,
GenericQnxFlavor and GenericBareMetalFlavor with GenericFlavor. They
can all be distinguished from each other by the OS property, so having
separate enum values for all of them is not necessary.

Remove a unit test that made sure that each flavor (with exceptions)
is only listed for one OS, which no longer is the case now.

Change-Id: I88dad5d37eaa4c288568e40b95337a39b78a8352
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-18 09:35:18 +00:00
Tobias Hunger
4ceed778f8 Abi: Clean up constructors
Only have one constructor. Get rid of implicit conversion from QString
to Abi -- that seems rather non-obvious. Use Abi::fromString(...) instead.

Change-Id: Ic638d3d4022c465123449089b0679197a5eb445d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-15 12:12:01 +00:00
Tobias Hunger
ca97be6a13 Abi: Add xtensa architecture
Also add an "rtos" OS flavor to baremetal, which is popular with xtensa.

Task-number: QTCREATORBUG-20147
Change-Id: Id4d22ebfc59f123a76dc3de898c7c57bb3be8a38
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-04-16 14:20:35 +00:00
Tobias Hunger
5c4abeaffe Abi: Allow for roundtrips enum->string->enum
Add all static methods to turn the various Abi enums into a string
and back.

Use these methods in the Abi constructor.

Add a unit test that does round-trips between Abi enum, string and back
and fix the code to actually handle this.

Change-Id: Icb56cce07d36152dbee7bbf9dd119a753444ada9
Reviewed-by: hjk <hjk@qt.io>
2018-04-10 09:37:55 +00:00
Tobias Hunger
4ba5e402dc Abi: Fix switch statment when guessing ABI based on target triple
Some entries were duplicated. Fix fallout in gcc toolchain test
caused by this change.

Change-Id: I63c7a5fdba93e903888b2daa99a87e0a07c28acd
Reviewed-by: hjk <hjk@qt.io>
2018-04-10 08:04:56 +00:00
Orgad Shaneh
eea6a7c3b3 Utils: Purge qtcfallthrough.h
No longer needed.

Change-Id: I9b0bee014df89d4c567f1d2431b5ff9404f5f925
Reviewed-by: hjk <hjk@qt.io>
2018-04-09 09:04:13 +00:00
Eike Ziller
0df84b45e5 Merge remote-tracking branch 'origin/4.5' into 4.6
Conflicts:
	src/shared/qbs

Change-Id: Ib734825a302efe41021307d7d64eb7b453262dc4
2018-01-25 10:16:46 +01:00
Tobias Hunger
d3bed44f5f ProjectExplorer: Remove QTC_CPU override
QTC_CPU was broken in qmake and never worked there. Qbs never implemented
the override properly, so neither did it work there.

Use QSysInfo to retrieve information on CPU that Qt was built for and use
that in the hostAbi.

Change-Id: I298c15b2263c9eaf343a93037229de64e90c36ef
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-24 14:51:32 +00:00
Friedemann Kleint
f482270432 Introduce Q_FALLTHROUGH()
Silence g++ 7.X warnings.

Change-Id: I9d06d04b496c9ec060e13e1be6f43d8fbadb1f3b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-01-24 14:50:43 +00:00
Tim Jenssen
562fd0a040 ProjectExplorer: code sugar
Change-Id: Ia78fd000a4836fa54567bc57ef401eedb3dcc7b4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-17 09:17:35 +00:00
Tim Jenssen
451f4a1e73 ProjectExplorer: fix testFlavorForOs()
Change-Id: I7e6e784c233159beead616149b7aeeb0f95225fe
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-04 16:15:27 +00:00
Orgad Shaneh
c562dce322 Abi: Support Atmel AVR architecture
Change-Id: Ib2c894311d7318a9226ca2ac40001c4f96606f6e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-08-02 10:39:30 +00:00
Orgad Shaneh
f240abd214 Abi: Some more cleanup
* Replace << with initializer lists
* Replace C-Style cast

Change-Id: Ie308e9975a755cccae0fa5ad2655a83a082b4ec7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-07-27 11:40:32 +00:00
Orgad Shaneh
94ba1b8b5d Abi: De-noise
* Remove QLatin1String except on return
* Remove unneeded qualifications

Change-Id: Ic7c928c7d53c03c398fddc7353dd9e08a125e701
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-26 13:17:38 +00:00