2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 Tim Sander <tim@krieglstein.org>
|
|
|
|
|
// Copyright (C) 2016 Denis Shienkov <denis.shienkov@gmail.com>
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2013-09-12 18:46:35 +02:00
|
|
|
|
2022-10-10 14:36:17 +02:00
|
|
|
#include "baremetalplugin.h"
|
|
|
|
|
|
2013-09-12 18:46:35 +02:00
|
|
|
#include "baremetalconstants.h"
|
2017-07-07 18:49:26 +02:00
|
|
|
#include "baremetaldebugsupport.h"
|
2019-05-08 13:49:19 +03:00
|
|
|
#include "baremetaldevice.h"
|
2017-07-07 18:49:26 +02:00
|
|
|
#include "baremetalrunconfiguration.h"
|
2022-10-10 14:36:17 +02:00
|
|
|
#include "baremetaltr.h"
|
2013-09-12 18:46:35 +02:00
|
|
|
|
2019-11-04 00:51:58 +03:00
|
|
|
#include "debugserverprovidermanager.h"
|
|
|
|
|
#include "debugserverproviderssettingspage.h"
|
2014-12-20 19:10:02 +00:00
|
|
|
|
2019-02-21 17:38:22 +03:00
|
|
|
#include "iarewtoolchain.h"
|
2019-03-07 18:22:22 +03:00
|
|
|
#include "keiltoolchain.h"
|
2019-03-19 22:45:36 +03:00
|
|
|
#include "sdcctoolchain.h"
|
2019-02-21 17:38:22 +03:00
|
|
|
|
2019-05-08 13:49:19 +03:00
|
|
|
#include <coreplugin/actionmanager/actioncontainer.h>
|
2013-09-12 18:46:35 +02:00
|
|
|
#include <coreplugin/actionmanager/actionmanager.h>
|
|
|
|
|
#include <coreplugin/actionmanager/command.h>
|
|
|
|
|
#include <coreplugin/coreconstants.h>
|
2019-05-08 13:49:19 +03:00
|
|
|
#include <coreplugin/icontext.h>
|
|
|
|
|
#include <coreplugin/icore.h>
|
2013-09-12 18:46:35 +02:00
|
|
|
|
2019-10-04 11:47:22 +02:00
|
|
|
#include <projectexplorer/deployconfiguration.h>
|
2022-06-22 15:43:33 +02:00
|
|
|
#include <projectexplorer/projectexplorerconstants.h>
|
2019-10-04 11:47:22 +02:00
|
|
|
|
2017-07-07 18:49:26 +02:00
|
|
|
using namespace ProjectExplorer;
|
|
|
|
|
|
2022-10-10 14:36:17 +02:00
|
|
|
namespace BareMetal::Internal {
|
2013-09-12 18:46:35 +02:00
|
|
|
|
2019-10-04 11:47:22 +02:00
|
|
|
class BareMetalDeployConfigurationFactory : public DeployConfigurationFactory
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
BareMetalDeployConfigurationFactory()
|
|
|
|
|
{
|
|
|
|
|
setConfigBaseId("BareMetal.DeployConfiguration");
|
2022-10-10 14:36:17 +02:00
|
|
|
setDefaultDisplayName(Tr::tr("Deploy to BareMetal Device"));
|
2019-10-04 11:47:22 +02:00
|
|
|
addSupportedTargetDeviceType(Constants::BareMetalOsType);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2019-05-08 13:49:19 +03:00
|
|
|
// BareMetalPluginPrivate
|
|
|
|
|
|
2019-02-21 14:59:57 +01:00
|
|
|
class BareMetalPluginPrivate
|
2018-01-26 17:23:45 +01:00
|
|
|
{
|
|
|
|
|
public:
|
2019-02-21 17:38:22 +03:00
|
|
|
IarToolChainFactory iarToolChainFactory;
|
2020-02-11 08:46:52 +01:00
|
|
|
KeilToolChainFactory keilToolChainFactory;
|
2019-03-19 22:45:36 +03:00
|
|
|
SdccToolChainFactory sdccToolChainFactory;
|
2019-02-20 19:13:28 +01:00
|
|
|
BareMetalDeviceFactory deviceFactory;
|
2018-01-26 17:23:45 +01:00
|
|
|
BareMetalRunConfigurationFactory runConfigurationFactory;
|
|
|
|
|
BareMetalCustomRunConfigurationFactory customRunConfigurationFactory;
|
2019-11-04 00:51:58 +03:00
|
|
|
DebugServerProvidersSettingsPage debugServerProviderSettinsPage;
|
|
|
|
|
DebugServerProviderManager debugServerProviderManager;
|
2019-10-04 11:47:22 +02:00
|
|
|
BareMetalDeployConfigurationFactory deployConfigurationFactory;
|
2023-01-06 13:19:43 +01:00
|
|
|
BareMetalDebugSupportFactory runWorkerFactory;
|
2018-01-26 17:23:45 +01:00
|
|
|
};
|
|
|
|
|
|
2019-05-08 13:49:19 +03:00
|
|
|
// BareMetalPlugin
|
|
|
|
|
|
2013-09-12 18:46:35 +02:00
|
|
|
BareMetalPlugin::~BareMetalPlugin()
|
|
|
|
|
{
|
2019-02-21 14:59:57 +01:00
|
|
|
delete d;
|
2013-09-12 18:46:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool BareMetalPlugin::initialize(const QStringList &arguments, QString *errorString)
|
|
|
|
|
{
|
2018-01-26 17:23:45 +01:00
|
|
|
Q_UNUSED(arguments)
|
|
|
|
|
Q_UNUSED(errorString)
|
2013-09-12 18:46:35 +02:00
|
|
|
|
2019-02-21 14:59:57 +01:00
|
|
|
d = new BareMetalPluginPrivate;
|
2018-01-26 17:23:45 +01:00
|
|
|
return true;
|
2013-09-12 18:46:35 +02:00
|
|
|
}
|
|
|
|
|
|
2014-12-20 19:10:02 +00:00
|
|
|
void BareMetalPlugin::extensionsInitialized()
|
|
|
|
|
{
|
2019-11-04 00:51:58 +03:00
|
|
|
DebugServerProviderManager::instance()->restoreProviders();
|
2014-12-20 19:10:02 +00:00
|
|
|
}
|
|
|
|
|
|
2022-10-10 14:36:17 +02:00
|
|
|
} // BareMetal::Internal
|