Several independent classes were mashed together in mcusupportoptions.cpp
This patch moves McuToolChainPackage together with McuPackage,
McuTarget to its own header+source pair, and
McuKitManager to its own header+source pair.
Task-number: QTCREATORBUG-26890
Change-Id: I0b51da4e1cae5a976201dffd290a665eaa318b33
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Introduced Package interface for mocking purposes.
Made some functions visible in headers for testing.
Added basic test skeleton for mcu plugin.
run cmd: `qtcreator -test McuSupport`
Change-Id: I1011d49052bd8c894da393d8a285b241682f1f94
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
In proactive, the color depth was never changed after setCMakeOptions
was called. This change makes it clear that it is also not intended to
be changed: a board does not suddenly change color depth, and for a new
board configuration a new target is created.
Change-Id: Ie5b99726d833efcdf129655b8e70120a033914e6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
And make more use of switch statements without a default case, so each
type is handled explicitly. (Ok, there is a default, but that is
Q_UNREACHABLE).
Change-Id: I30ccc447e55a5aeebebe1a9879ea3136545f5e68
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <piotr.mucko@qt.io>
This implies that those properties are now passed into the constructor,
and their setters are removed.
Change-Id: I34b4d9d7450897e6a7a72b8edaffdc05961546d1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <piotr.mucko@qt.io>
Also move `packagePathFromSettings` so it can be used from multiple
places. This function will probably move into a separate utility file
in future changes.
Change-Id: I208a5a7bc8aa689829178809a1f4053a961d93be
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <piotr.mucko@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
... into a single class.
This makes passing them around as a whole easier, and opens a path
to have "generic" filters in form of a lambda or such.
Change-Id: Ibf644b2fedcf0f1a35258030710afff8f5873f88
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
On 1.x SDKs, if the desktop kit description is missing
we still create a desktop target from a library that is
distributed with the SDK, through a fallback function.
On 2.x SDKs, the library has been renamed, but we don't
want to create the fallback. The kit description is
mandatory. Therefore, we shouldn't show the error
for failed fallback.
Task-number: UL-5092
Change-Id: I469269b2286d33f0f13335eef09ea2467c59be2e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
If QtCreator is installed via the Qt Installer, sensible defaults are
provided at installation time. For not provided software, $HOME
is not a useful default. Leaving the field empty signals the
user that they need to provide one manually, more clearly than
providing an invalid path.
Task-number: UL-4939
Change-Id: I8ef79e563366ebdbea53df8183a1eca82bd7be4a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This is a quick fix for the current situation. Proper
support will need a rewrite of part of the plugin code.
QtQuickUltralite SDK 1.x relies on environment variables
for the dependencies. SDK 2.x uses CMake variables for that purpose.
Some of the variables have been renamed, others grouped together.
Here a mapping between those is hardcoded as an urgent solution.
A proper implementation should make the plugin independent of
the existence or lack of specific environment variables. Also,
all the hardcoded information needs to be moved to the json kit
files in the SDK. Otherwise, compatibility breaks between versions
every time the built-in assumptions relating to that information change.
Task-number: UL-4396
Change-Id: I7f40a694a773881f20b29bae9d02c7c1c8bd747b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The library filename has changed in recent versions of the
SDK, which was causing false negatives.
Fixes: QTCREATORBUG-25469
Change-Id: Ie98c75a57efc5384262dbfd17f729b34cdd5f577
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
- added IAR toolchain factory similar to ARM GCC one
- extended kitName with used compiler name
- added Unsupported toolchain type to fix crash after creating kit with not
recognized toolchainID
Fixes: QTCREATORBUG-24898
Change-Id: I28b8376ca4bc88d3d75e17bd242ac49f0ee09845
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <christiaan.janssen@qt.io>
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>
Previously whole SDK configuration for Renesas RH850 was hard coded.
Now configuration is read form the json file - same as for the other
SDKs. This changes adds new boardSdk params:
- name: sets the name for the SDK. If not set existing logic for
generating name as "MCU SDK()" is used
- defaultPath: path where to look for the SDK if env variable is not set
Change-Id: Ia4b92c95bdc3302309cea4b935afbdd2e0bcadbe
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
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>
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>
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>
Instead of from a hard-coded list.
Task-number: QTCREATORBUG-24296
Change-Id: Ib74fd854f035d561b8a568987984a2a2cb730175
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
ghs-renesas-rh850-d1m1a.json lists "boardSdk/envVar": "RGL_DIR".
However, that dependency is already handled as vendorSdk. This and the
other board SDKs differ so much, that we simply keep "RGL" as vendorSdk
and skip it when creating board SDKs.
Amends c43ef81d4f
Task-number: QTCREATORBUG-24201
Change-Id: I052d50f413ecc5f318d4146c207ab690acf1b1f5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
In order to access target specific APIs/services, one needs a vendor
specific SDK. In Qt for MCUs, these SDKs get integrated to the build
system by a couple of environment variables.
Some examples: EVKB_IMXRT1050_SDK_PATH, STM32Cube_FW_H7_SDK_PATH,
STM32_CUBE_L4_INSTALL_PATH, etc.
This patch adds a path chooser for MCU/Board Sdk installations to the
McuSupport Kit creation settings page. The selected path is set as
environoment variable in the Kits settings.
A fix in parseDescriptionJson was needed to read the boardSdk/envVar.
Task-number: QTCREATORBUG-24201
Change-Id: I4ceb9ce0f54e321646bbdeb256703011583feefb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reduce the confusion around the Qt for MCUs version that is currently
supported in this Qt Creator version.
Change-Id: I21e88bfacc7502244aec49e829a1dfff0075226f
Reviewed-by: hjk <hjk@qt.io>
Due to the missing .json file for desktop targets, the Desktop target
was only listed in the target chooser if at least one hardware target
(which do have .json files) was installed in the SDK. This prevented
using of Desktop-only Qt for MCUs installations.
This change causes the Desktop target to be listed if the respective
library exists. With a Desktop-only Qt for MCUs installation, this means
that we blindly trust that the selected Qt for MCUs SDK version is
supported.
On the other hand we make the version checking stricter (in case we do
find .json files). If the version of one targets does not match, the
whole SDK installation is deemed invalid and no target is listed, also
none for Desktop.
Change-Id: I9d83b22255c19c5f8c6360e0b6137ce40311f8c4
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
- 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>