Commit Graph

54 Commits

Author SHA1 Message Date
hjk
1fc83d2a56 Utils: Wrap various file system iteration flags and filters
... 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>
2022-01-26 13:13:41 +00:00
hjk
f9c97d23c7 Utils: Add optional recursion for file system iteration
Change-Id: Icded897b129aebd7132376cff55717e16dffc040
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-18 11:52:29 +00:00
Christiaan Janssen
6b3191c11e McuSupport: support for Renesas Flash Programmer
Task-number: UL-5082
Change-Id: I1eb4583fa2635adfc302f878301152c2358de446
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-12-09 08:55:27 +00:00
Christiaan Janssen
da10ed2483 McuSupport: skip error when failed desktop fallback
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>
2021-12-08 16:05:59 +00:00
Christian Kandeler
b2d63bf79e Fix various compiler warnings
Change-Id: Ib64f04f154b2c44dad3248ef038449c2ac628686
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-02 15:48:52 +00:00
Christiaan Janssen
4a50a582e7 McuSupport: default paths for 3rd party dependencies left empty
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>
2021-11-25 07:51:12 +00:00
Christiaan Janssen
983ca3106d McuSupport: avoid double-space strings in warnings
Change-Id: Ia40412154662ce9a22ae569c9f8abf31b419cbce
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-11-15 10:23:17 +00:00
Christiaan Janssen
0eeb6c6e5e McuSupport: support for SDK 2.0
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>
2021-10-26 16:00:30 +00:00
hjk
93a07e1c6e Mcu: Proliferate FilePath use in McuSupport
Change-Id: I0ae8bf1454d1715f251d88065b52e3bb6a242402
Reviewed-by: Christiaan Janssen <christiaan.janssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-05 08:47:00 +00:00
hjk
bd4a501f15 Replace some uses of HostOsInfo::withExecutableSuffix with FilePath
Change-Id: Id72e9fd04dd4995ff2775ee919f747018cbcc339
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 11:48:48 +00:00
Eike Ziller
2485c31a48 Merge remote-tracking branch 'origin/4.15'
Conflicts:
	doc/qtcreator/src/qtquick/qtquick-from-qmlproject-to-pro.qdoc

Change-Id: I906330addb7de31e6ed88f88af3fd2adbbe53e1f
2021-05-31 16:13:47 +02:00
Christiaan Janssen
4616c134aa McuSupport: default path for STM32CubeProgrammer for non-Windows
Task-number: QTCREATORBUG-25788
Change-Id: If29351eaee6f14315df2a2471d2de4c254ef1c8a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-05-27 08:00:56 +00:00
Erik Verbruggen
d98feae8f6 Add support for the Cypress traveo II kit
Fixes: UL-4242
Change-Id: I0b492a3edd6a1dce9d214e6490e174050c3fdb30
Reviewed-by: <christiaan.janssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-05-20 14:03:05 +00:00
Eike Ziller
4151f091e3 Merge remote-tracking branch 'origin/4.15'
Change-Id: If0dbebdf37b0ffea2528bf6ce6d34d88554f8dfb
2021-03-16 10:55:54 +01:00
Christiaan Janssen
2aead8b3e4 McuSupport: detect fallback lib when desktop kit missing
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>
2021-03-15 12:10:45 +00:00
Christiaan Janssen
b5781e6028 McuSupport: Improvements with version detection
Task-number: QTCREATORBUG-25261
Change-Id: I1b378eb4a4d132b64e4c36e0a0cdafd402570785
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-03-09 08:31:16 +00:00
Christiaan Janssen
65215b01e8 McuSupport: Better management of older Qt for Mcu SDKs
Task-number: QTCREATORBUG-25337
Change-Id: Ib0b2f6c75a41a2a897c128455c7b6f761832f5d4
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-03-04 10:12:25 +00:00
Christiaan Janssen
3e08210998 McuSupport: Detect dependency versions when building MCU kits
Task-number: QTCREATORBUG-25261
Change-Id: I79d24aa2e26a3f647bd2251c0407c7d09eea73b3
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-03-02 14:36:40 +00:00
Christiaan Janssen
4b6f1c1366 McuSupport: Display errors when generating kits automatically
Fixes: QTCREATORBUG-25260
Change-Id: I5e45a56d08920886b2f654a1c98a7451e1c9dc3f
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-10 09:29:56 +00:00
Christiaan Janssen
5b7a3fba27 McuSupport: Display errors when configuring Qt for MCUs SDK
Fixes: QTCREATORBUG-25258
Change-Id: I6f445bddb51f3bc1850793966f049c4b7ce7889f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
2021-02-09 13:10:07 +00:00
Jarek Kobus
cf010911f7 Don't allocate unneeded temporary containers
Fix clazy warnings: allocating an unneeded temporary container
[clazy-container-anti-pattern]

Change-Id: I4b4c2c634eea650bbdf3c12d982a17f899fc94ec
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-12-14 12:35:47 +00:00
Dawid Sliwa
3929917ecb McuSupport: Add support for kits with IAR compiler defined
- 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>
2020-11-20 12:50:11 +00: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
hjk
bedf7d74a4 Mcu: Extend workaround for missing JSON file for Desktop target to Linux
Amends 08fe165ab586e6.

Change-Id: I3c3d205f083a3b59ac0490bf7ff22f12fb613b62
Reviewed-by: Jacek Nijaki <jacek.nijaki@siili.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-08-20 15:03:37 +00:00
Alessandro Portale
90f050b2a1 McuSupport: Fix warning about missing field initializers
Change-Id: I466f679a5cb583c351e0231a60cd9ce766d58f5e
Reviewed-by: hjk <hjk@qt.io>
2020-08-19 09:59:14 +00:00
Jacek Nijaki
4f595be64a McuSupport: Read RGL configuration from json
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>
2020-08-18 14:35:28 +00: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
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
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
8017093ed5 McuSupport: Read *_FREERTOS_DIR values from .json
Instead of from a hard-coded list.

Task-number: QTCREATORBUG-24296
Change-Id: Ib74fd854f035d561b8a568987984a2a2cb730175
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
2020-07-02 14:31:12 +00:00
Alessandro Portale
349e525031 McuSupport: Skip Renesas' "RGL" board SDK
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>
2020-07-02 06:44:57 +00:00
Alessandro Portale
c43ef81d4f McuSupport: Add MCU/Board SDK package to kits
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>
2020-06-30 12:05:56 +00:00
Eike Ziller
7c329e1902 Merge remote-tracking branch 'origin/4.12'
Change-Id: I4935b6afdb13627f32e850a4c8b536de0269bc4b
2020-06-25 09:28:57 +02:00
Alessandro Portale
82bc519b7e McuSupport: Display the expected Qt for MCUs SDK version number
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>
2020-06-23 13:01:42 +00:00
Alessandro Portale
92139f18b0 McuSupport: Improve version checking, support Desktop-only installation
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>
2020-06-22 18:27:20 +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
8292807e0d Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/android/androidextralibrarylistmodel.cpp

Change-Id: Ica69c24e83deff819e640dcb4c2682a554d8a2d2
2020-05-19 15:23:16 +02:00
hjk
709b57481e Mcu: Remove unused functions
Last and only users are gone with f08fe165ab.

Change-Id: Id5ff577ce3d1c8c47269536eca2140c9340c5b03
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-05-19 06:39:48 +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
Christian Stenger
0767107c55 McuSupport: Fix compile for gcc 5.3
Change-Id: I389330addba4b4516eb5da8f72b41b56f612888a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-05-15 05:20:01 +00: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
Christian Kandeler
eb96f9900a Fix clang 10 warnings about unnecessary copies in range loops
Change-Id: I3b57869b5a04528518bc432b76768b01e3f53e81
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-12 13:45:43 +00:00
Alessandro Portale
a5074ac987 McuSupport: Add FreeRTOS variations to hardcoded list of targets
Task-number: QTCREATORBUG-23938
Change-Id: I73ca401bd323bd001fa5e05c33783307c94f10be
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-05-06 16:36:53 +00: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
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
7b188a6fff McuSupport: Use MCUXpresso IDE instead of SEGGER JLink for NXP kits
Qt for MCUs for NXP, now requires MCUXpresso in order to flash and run,
instead of SEGGER JLink. This change adjusts the kit creation
accordingly.

Task-number: QTCREATORBUG-23821
Change-Id: I0f5e375d052246ba033f0f2f81a7bad1805df02e
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:03 +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