Commit Graph

158 Commits

Author SHA1 Message Date
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
Jake Petroules
3158c125c1 Recognize mips64 toolchains from the Android NDK
Adapt a couple mips64-related tests at the same time.

Change-Id: I9313419cfe561c7e949f343d2008f7b370ad2b39
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-29 23:17:56 +00:00
Tobias Hunger
e71fc39885 Abi: Make MSVC2015 match MSVC2017
Task-number: QTCREATORBUG-17740
Change-Id: I846f2a6a3c9819975c5ded2a447f8a38a098aa6b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-05 11:00:48 +00:00
Orgad Shaneh
d186d85bcf ProjectExplorer: Fix clang ABI detection
Change-Id: I809f8b747ffb64ed128fd0f957d13d670604d050
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-07 08:27:23 +00:00
Orgad Shaneh
5828205418 Abi: Detect also "windows" as OS
Clang reports x86-pc-windows-msvc

Change-Id: Ibaed516e6d63bc8d99298f72c862d7ac07ca37f9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-07 08:24:47 +00:00
Tobias Hunger
7da1e233eb ProjectExplorer: Add missing breaks to switch in Abi class
Change-Id: I6c855d221e7a4d81f7338bc119c7ecff815e7ea6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-27 11:54:09 +00:00
Orgad Shaneh
da7cb91446 Merge remote-tracking branch 'origin/4.2' into 4.3
Change-Id: I4931dcc81be872d7712e67123e94d15ee696459f
2017-03-14 16:20:14 +02:00
Samuel Gaist
4033471aa9 QRegExp include cleanup
This patch adds the missing include statements for QRegExp.

Change-Id: Ibb03b929940adb84ae190b5090cb6b88653cc14c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-03-13 22:05:30 +00:00
James McDonnell
e69c2eb2d5 Make QNX a separate OS type
Limits conflicts with Linux tool chains and debuggers.

Change-Id: Ie6408aecbc2828e8be53c46cf579441ccaba19bb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-03-13 14:32:11 +00:00
Friedemann Kleint
467c478dda Abi: Detect MSVC2017RC as MSVC2017
The binaries have a minor linker version >= 10.

Amends change 0a9414d467.

Task-number: QTBUG-57086
Change-Id: Ib9493bc3f87e6100377632b85991ce94f3025f28
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-16 11:02:27 +00:00
Friedemann Kleint
840e787175 Use QString::splitRef() instead of QString::split()
Avoid string allocation where it seems feasible.

Change-Id: I61b23d4ef8a459f5aa77727a75f4e1d2b140da3b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-25 11:32:47 +00:00
Friedemann Kleint
25745f4330 Add missing break in COFF parser
Fixes MSVC2015 builds being detected as MSVC2017.

Amends change 0a9414d467.

Task-number: QTBUG-57086
Change-Id: Ia795819d3c915d0be3e57ef16006e29aa98ee266
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-25 10:17:07 +00:00
Friedemann Kleint
0a9414d467 Abi: Handle MSVC2017 in relevant places
Fixes kits forgetting the compiler.
Amends change 4c29f5fc8f.

Task-number: QTBUG-57086
Change-Id: I853dc91fd40ddbd8726fcb1a682753b163a63cf6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-24 07:43:36 +00:00
Friedemann Kleint
4c29f5fc8f Add support for Visual Studio 15.0 (MSVC2017)
Extend ABI by flavor and add look-up.

As with each major update, rewrite the the MSVC toolchain
autodetection.
Previously, the detection looped over the entries in "VC" registry
section and checked in the "VS" section whether a valid installation
belonged to the entry. MSVC2017 no longer has an entry in the "VC"
section.
Introduce a struct describing the installation including version
number and rewrite the loop to run over the "VS" section and retrieve
the VC path from the "VC" section only for versions <= 14.0.
Also, the various .bat files for the target architecture are
now in a single folder instead of spread around various bin/XXX
subfolders. Introduce an array of structs for the platform that
has the prefix and .bat name and uses the prefix only for
versions <= 14.0.

Task-number: QTBUG-57086
Change-Id: I947edd885c0a379f196440041c07d60cd4244d9c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-21 13:42:49 +00:00