Commit Graph

72 Commits

Author SHA1 Message Date
Eike Ziller
423ea729f8 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/mcusupport/mcusupportoptions.cpp

Change-Id: I3fd0d0a6a3ff30bb990da3dc0f78e69f9e1247ef
2020-09-23 10:11:44 +02:00
Jacek Nijaki
08541305b6 McuSupport: Add support for desktop backend JSON file
Starting from Qul 1.5 json kit file will be shipped for desktop platform.
This change is backward compatible with previous Qul version - if no
desktop specific json file is found a legacy code is executed.

This change removes "desktop" toolchain, instead "msvc" and "gcc"
toolchains are introduced.

Additional parameter was introduced to the josn kit file: "platformName"
which enables using different strings in kit name and in QUL_PLATFORM
cmake variable.

Change-Id: Ie0a212aaad47a8033e9a81467f60a23c2bc19a51
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-22 08:32:00 +00:00
Christian Stenger
c2d49bfa5f Mcu: Fix compile
Amends: 6400aab190

Change-Id: I0c027b4f02f9f1472f3a1b938844e9ffb8c611b0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-17 11:52:41 +00:00
hjk
6400aab190 McuSupport: Some code cosmetics
Namespaces, spacing, connect object guards, ...

Change-Id: I64bcab14f52d990adab938ebcdef535f1c09b061
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-17 10:14:55 +00:00
Alessandro Portale
bbbb7d421b McuSupport: Use platform specific case for referencing "Path" value
... in the build environment of the generated Kit.

Change-Id: Ia0b8f8dba03a9a91c8435a3b2a4a1410f3459da8
Reviewed-by: hjk <hjk@qt.io>
2020-09-01 11:23:54 +00:00
Alessandro Portale
4e1434d51a McuSupport: Grant kits a Qt version on non Windows host
The qul libraries for the Desktop Backend are statically linked against
Qt on Windows. Also, the qul host tools are shipped with the Qt runtime
libraries (on Windows).

Not so on Linux, so a Qt version is required, there.

Change-Id: Id49ed2ef01926abc71291751eae03263317a56d4
Reviewed-by: hjk <hjk@qt.io>
2020-09-01 11:23:48 +00:00
Eike Ziller
2a05186194 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	CMakeLists.txt

Change-Id: I799060da2cb299bb0c49a3da3530fad18427a23c
2020-08-21 10:08:55 +02:00
Jacek Nijaki
8c227dea1d McuSupport: Update json kit processing to match Qt for MCUs 1.4
FreeRTOS backend is now a separate platform and requires dedicated json
kit file. Starting form Qul 1.4 there is no option to produce BareMetal
and FreeRTOS kits out of one json file.

This change is backward compatible with Qul 1.3.

Change-Id: Ic50b566a7f1a01fad4b00c07e723dfe1343fc2b0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-08-18 14:31:49 +00:00
Federico Guerinoni
cf025f550a McuSupport: Make string translatable
Change-Id: I522700d383cc79bad79ade73fe3cebcbe7b451b1
Reviewed-by: hjk <hjk@qt.io>
2020-07-15 08:43:05 +00:00
Eike Ziller
b18711da91 Merge remote-tracking branch 'origin/4.12' into 4.13
Conflicts:
	share/qtcreator/debugger/lldbbridge.py

Change-Id: Ia444f6424fb35b9a539e157afcee868161535272
2020-07-06 16:23:13 +02:00
hjk
e1c88116b3 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 11:15:18 +00:00
Alessandro Portale
dd505ef413 McuSupport: Change version checking from exact == to >= minimum
So far, one Qt Creator version supported exactly one Qt for MCUs
version, mainly because of incompatibilities in-between Qt for MCUs
versions.

The compatibility of 1.2 with 1.3 and further is now deemed stable
enough to loosen the version checking.

This change replaces the exact versions comparison (between Qt for MCUs
SDK version and what Qt Creator supports) to a minimum version check of
what Qt Creator supports.

One limitation that remains is that you can only have one kit per target,
across the supported Qt for MCUs versions. To mend this, UI changes are
required (in a separate commit).
Workaround for now: If you want e.g. Desktop Kits for different Qt for
MCUs versions at the same time, you need to work with kit clones.

Task-number: QTCREATORBUG-24293
Change-Id: Ifd31cd2eadbc1d7fa02415e1928d0047cf007f7c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 08:24:20 +00:00
Alessandro Portale
6fec04d6de McuSupport: Find default FreeRTOS dir inside pre-installed board SDK
Qt for MCUs 1.3 ships the board/MCU SDKs, and also adds the subdir to
the FreeRTOS component inside the board/MCU SDKs as "boardSdkSubDir" to
the .json files (see: UL-2760).

Task: Qt Creator needs to lookup that "boardSdkSubDir" value and use it
to construct a default path for the FreeRTOS path.

Task-number: QTCREATORBUG-24300
Change-Id: Ie3c8186b76443d5fe3640226ea61aa8b14779d54
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 07:51:48 +00:00
Alessandro Portale
dccdd41ab9 McuSupport: Adjust license headers
Change-Id: I00ce0c63c59f6d20f8244ea9c693259044d0f7b8
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2020-07-03 07:48:51 +00:00
Alessandro Portale
a6bf71a327 McuSupport: Bump supported Qt for MCUs version from 1.2 to 1.3
Task-number: QTCREATORBUG-24203
Change-Id: I259a4bfba49624d313fd1a2562f6288e047a16da
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-30 12:47:46 +00:00
Alessandro Portale
97ac63b401 Android, McuSupport: Change "download" icons to "online"
The download icon might suggest that clicking that button causes an
automated download/installation. Since we have similar automation in the
Android settings, that could be misleading.

Change-Id: Ia1e4f1cfe15f79daf090546ee7c991f93b23fd13
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-06-26 11:18:40 +00:00
Eike Ziller
8b8ecfa28f Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/cmakeprojectmanager/fileapiparser.cpp

Change-Id: I39f8c2be859be043f506bef77de9bb5b42d38165
2020-06-15 11:30:34 +02:00
Alessandro Portale
e4ded6a08f McuSupport: Enable resetting of path choosers to the default path
This change adds a "reset" button to the path choosers. Pressing it
sets the path to the default path.

The default path is now overwritable by the system settings value (if
present). This way, there is only one and only default path, which
allows us to again simplify McuPackage::writeToSettings().

Task-number: QTCREATORBUG-23860
Change-Id: I192663f3487250b9eba4773d2510abf3f9e66127
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-11 09:47:04 +00:00
Eike Ziller
623e607b23 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I19a7406f7e387b53f1e7b3f08a0b4c89a377ab82
2020-06-08 08:22:10 +02:00
Alessandro Portale
81e0d9da11 McuSupport: Fix a bug in the writing of settings
The plugin wants to only store settings if they differ from the defaults
(e.g. a path was edited by the user).
The original attempt failed. If the user changed the path, stored it,
and then changed the path back to the default, the last change was not
stored.

Therefore, this change actually removes the settings entry if it equals
either the default or the install settings value.

Task-number: QTCREATORBUG-24048
Change-Id: I6ab11f276ae270bb8bbf50ad6d2bc7ea3dba2d7b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-04 06:59:57 +00:00
Eike Ziller
aa2aa9bf2a Merge remote-tracking branch 'origin/4.12'
Change-Id: Id1c063ae716c3acf5e6201c15663637040aa9a35
2020-06-03 12:22:18 +02:00
Alessandro Portale
2ba2a0d1d4 McuSupport: Qul v1.2 adjustments
- Bump supported version from 1.1 to 1.2
- Look in Qul_DIR/kits for boards json files (UL-2390)
- Remove "pragma main;" from app template main qml (UL-1708)
- Add a main.cpp for BareMetal and FreeRTOS each (QTCREATORBUG-24063)
- Removed ambiguous armgcc download link (QTCREATORBUG-24052)

Task-number: UL-1708
Task-number: UL-2390
Task-number: QTCREATORBUG-24063
Task-number: QTCREATORBUG-24052
Task-number: QTCREATORBUG-24079
Change-Id: Ieb3d0c22b9099b12f91096b5a90c6e84698be788
Reviewed-by: Christian Kamm <mail@ckamm.de>
2020-05-27 11:47:57 +00:00
Eike Ziller
52b7ec058b Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/mcusupport/mcusupportsdk.cpp

Change-Id: I1583fa81adc0218ad4657baa347c08e9e29f88e6
2020-05-15 14:49:11 +02:00
Alessandro Portale
f08fe165ab McuSupport: Read supported targets from SDK .json files
... Replace the current hard-coded list of supported (non-Desktop)
targets.

Task-number: UL-2012
Change-Id: I65851d11eea9f62635d56c42788caeae8a77a4f3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-14 13:37:46 +00:00
Eike Ziller
20ef5c6de3 Merge remote-tracking branch 'origin/4.12'
Change-Id: Ibbf9f16677a58bdcdd3ce63701ffa34db6f44916
2020-05-11 11:36:22 +02:00
Alessandro Portale
eccf1269ac McuSupport: Add support for creating FreeRTOS kits
Besides Baremetal, Qt for MCUs also supports FreeRTOS for a few targets.
This change:

- shows the FreeRTOS source path chooser
- set the FreeRTOS source path as kit environment variable
- sets OS=FreeRTOS in the kit CMake configuration and kit meta data

Task-number: QTCREATORBUG-23938
Change-Id: I69cbd4f9b6b4a842788a8dad57905ef517b8b1d5
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-05-06 16:36:24 +00:00
Eike Ziller
e9661e43cb Merge remote-tracking branch 'origin/4.12'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp

Change-Id: If6963d1ef7b5a1ea6343f68c8e7ce6fb5f482f21
2020-04-28 15:48:36 +02:00
Alessandro Portale
185f03cb33 McuSupport: Identify existing Kits for MCU Targets via meta data
... instead of just by kit name.

Although the Kit name is quite verbose, it is missing some of the
information needed to realiably identify Kits for MCU Targets. Use the
Kit meta data for that, instead.

This adds the color depth to the kit meta data.

Change-Id: I39bc9a681a423a4309290b0f47298dbcb83b2e54
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-04-28 08:51:41 +00:00
Alessandro Portale
db0d7a2669 McuSupport: Make some functions in McuSupportOptions static
There is no good enough reason to have them non-static, and upcoming
changes will have it a bit easier with static calls.

Additionally, make McuTarget::m_toolChainPackage const.

Change-Id: I002d5d56606d3b43c4c7a2f63c59e97a81342c69
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-04-27 10:26:36 +00:00
Alessandro Portale
5795ce2aae McuSupport: Remove outdated Qt for MCUs kits
Add a version to the generated Qt for MCUs kits. That version will
increase with every change to the way Qt for MCUs kits get generated.

If there are auto-detected Qt for MCUs kits with a different version
than the current, remove these kits when a "fresh" gets generated.

Task-number: QTCREATORBUG-23891
Change-Id: Iafcd2342d458f9c77ada47180cb61b3b4b090598
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-04-27 10:26:23 +00:00
Eike Ziller
602d690bab Merge remote-tracking branch 'origin/4.12'
Change-Id: Ie35e9959693b6f6f78509eea5b259d6493ef87f2
2020-04-17 08:09:55 +02:00
Alessandro Portale
f2f65be346 McuSupport: Fix RH850 kit issues
- Let user provide Green Hills Software Compiler and
  Renesas Graphics Library
- Set GHS_COMPILER_DIR and RGL_DIR instead of ARMGCC_DIR and
  SEGGER_JLINK_SOFTWARE_AND_DOCUMENTATION_PATH
- Don't set Kit compilers
- Do not set CMAKE_CXX_COMPILER and CMAKE_C_COMPILER
- Set ghs.cmake as CMake toolchain file

For the RGL package, McuPackage::updateStatus() was extended to be able
to work without a provided "detection path".

Task-number: QTCREATORBUG-23822
Change-Id: I5b666c258a965ce55047111fbbeca80271170892
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-04-14 12:51:40 +00:00
Alessandro Portale
f0f12fabd6 McuSupport: Fix Desktop kit issues
- Use "Desktop" instead of "Qt" in kit name
- Set the right kit toolchain (and debugger)
- Unset Qt Version (and hide it from kit)
- Prepend Qul_DIR/bin to environment PATH (if no CMake fileApi)

This also gets rid of the ugly mcuTargetIsDesktop() function
in favor of the new McuToolChainPackage::TypeDesktop

Task-number: QTCREATORBUG-23820
Change-Id: I5af61d5b0f414b4441239494e99b0b15088eee76
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-04-14 12:45:03 +00:00
Eike Ziller
deb0eaf795 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp

Change-Id: I34c3d1fd5be90537e37d15e00b1a0d455d1bf81d
2020-04-14 09:47:38 +02:00
hjk
68c539bb9d Utils: Replace FileChooser::path() by filePath().toString()
Keep the old method for now to ease downstream porting.

The change is kept mechanical, there's a lot of cleanup possible now
on the user code side.

Change-Id: I936baedd45b7ba057f1c789a1bec896886f48eff
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-04-09 17:45:06 +00:00
Alessandro Portale
c1f08cca86 McuSupport: Add SDK version to kit name (and to kit data)
First step towards Qt for MCUs SDK version handling.

Task-number: QTCREATORBUG-23823
Change-Id: I125fe841d9355aa26b4e4701ac9a5fec31987e08
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-04-07 08:26:16 +00:00
Alessandro Portale
a02b6e3e7d McuSupport: Register Qt for MCUs examples
This change introduces the registration of examples (or rather demos) of
the Qt for MCUs SDK at the launch time of Qt Creator.

This presumes that either the SDK installer set the Qt for MCUs SDK path
(which is the default use-case) or that the user selected/changed the
SDK path in a prior run of Qt Creator.

Task-number: UL-1218
Change-Id: I6484d3e3065f501da4cd6faccfe02605003f6cbf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-04-06 14:12:46 +00:00
Alessandro Portale
23dc065327 McuSupport: Register Qt for MCUs .qch files
At plugin initialization and along with the creation of a Qt for MCUs
Kit (which currently happens when the user presses "Apply"), these .qch
files get registered:

  <Qul_DIR>/docs/quickultralite.qch
  <Qul_DIR>/docs/quickultralitecmake.qch

In order not to duplicate the code for retrieving package paths (e.g.
the one for "QtForMCUsSdk") from the settings, some refactoring was
done.
As a result McuSupportOptions::qulDirFromSettings() has been introduced.
It will be also used in further changes.

Task-number: UL-1685
Change-Id: I82e638e129120cdadcf2f4812f467fce34b32ec9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-25 12:05:02 +00:00
Alessandro Portale
7675296fcf McuSupport: Make hardcoded target list "semi data-driven"
This change pushes the hard-coded list a bit towards a "data-driven"
approach. That way, the planned switch to the .json files based apporach
(see UL-2012) becomes less of a change.

Some target entries are added to match the current target list in Qt
for MCUs packages.

If we don't manage to get the .json-based target listing in place, this
could even serve as fall-back.

Task-number: UL-2012
Change-Id: If39e5d581ac19468b6f52ed221ec2d39bfab9f80
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-03-19 08:42:04 +00:00
Eike Ziller
9e0009803c Fix lupdate issues
Change-Id: I26f08ae82354c178f6d26f9138796328b50bfba8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-03-18 10:45:15 +00:00
Alessandro Portale
550e4bb98c McuSupport: Prepare for dynamic targets detection of SDK
Move around some code to keep the following changes understandable.

Task-number: UL-2012
Change-Id: Ib05699b893d2f7d1cf846507adb198b893187954
Reviewed-by: hjk <hjk@qt.io>
2020-03-17 09:29:21 +00:00
Alessandro Portale
8652188ac9 McuSupport: Restructure UI to reflect the data hierarchy
1) User selects the Qt for MCUs sdk dir
2) User chooses which board to configure
3) User provides paths for dependencies
4) User creates Kit

Change-Id: Ia30ca7e245e2500c7650d12ea6768ab6e60d99c7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-03-09 18:51:05 +00:00
Alessandro Portale
daa9804699 McuSupport: Prepare support for more toolchains than GNU Arm Embedded
Move all hardcoded arm-specific strings and code into the new
McuToolChainPackage class (which will later support IAR and KEIL).

In the same change: Adjust paths in CMake options to latest Qul path
changes in the master branch.

Change-Id: Iefa205729588a3efa783eb9eaaa339ed9f8e2813
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-03-03 11:23:29 +00:00
Alessandro Portale
888d804826 McuSupport: Adjust Kit parameters to changes for Qul 1.1
Qt for MCUs 1.1 gets a new directory and build system structure. Sha
807a3d2 in the Qt for MCUs repository introduces the change.

This patch adjusts the parameters of the generated kits accordingly,
which means that Qt Creator (master/4.12-beta1) will from this commit on
not support Qt for MCUs 1.0.1, anymore.

Change-Id: I20ded1bc28a2ffe30b59e8bce4a17bc38bb76a79
Reviewed-by: hjk <hjk@qt.io>
2020-02-10 12:32:43 +00:00
Alessandro Portale
fcfb0fbf80 McuSupport: Remove Engineering packages/targets
The resulting kits are at the moment not functional. They will be revamped
as soon as the new QUL 1.1 package structure is in place, the plugin is
able to parse the upcoming meta data and when I am understanding how
exactly an engineering kit needs to look like.

Change-Id: If21bc6f5301369e4bba077faad32d934c04409a2
Reviewed-by: hjk <hjk@qt.io>
2020-02-06 17:33:00 +00:00
Alessandro Portale
8ee93c3a46 McuSupport: Use Utils::InfoLabel in McuSupportOptionsPage
Task-number: QTCREATORBUG-23346
Change-Id: I75cd156db4715b3d55b11e665f46a2f31bbb6b1a
Reviewed-by: hjk <hjk@qt.io>
2019-12-19 16:16:21 +00:00
Alessandro Portale
9eed77fe86 McuSupport: Set jom via CMAKE_MAKE_PROGRAM instead of adding it to Path
Let's add less to the Path variable of the Kit's build environment. If
jom.exe is present, define it via CMAKE_MAKE_PROGRAM, set the CMake
Generator to Jom and hide the CMake Generator setting.

Change-Id: I58de73dc631f753d3e5c1706e593afb923fcb588
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-06 20:08:13 +00:00
Alessandro Portale
efa857e693 McuSupport: Fix compilation
Change-Id: I5cd32e709e635e3f09c5787e18d1141cac2ddf4c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-11-28 20:14:05 +00:00
Alessandro Portale
5351652e88 McuSupport: Fix case of path variable in Kit environment
Linux calls it "PATH" and is case sensitive.

Change-Id: Ic53c0bd4a9135eef21dc5f771022ab5277fe35a8
Reviewed-by: hjk <hjk@qt.io>
2019-11-28 19:41:43 +00:00
Alessandro Portale
b0977c97f2 McuSupport: More robust search for installations in "ProgramFiles"
Search in 32-bit and 64-bit locations.

Change-Id: If267da24fa68e6d1b30e4ef6eb29b374e42693dc
Reviewed-by: hjk <hjk@qt.io>
2019-11-28 11:04:45 +00:00