[Qt-creator] QtC vs BareMetal vc CMake

Tim Sander tim at krieglstein.org
Fri Mar 20 21:47:54 CET 2015


Hi Wolfgang
Am Freitag, 20. März 2015, 15:52:05 schrieb Wolfgang BETZ:
> I am absolutely new to this mailing list, so pls. excuse me if I am telling
> bullshit ...
Welcome on board :-)

> I am in the process of trying to understand why the hell I am not able to
> get the BareMetal plugin to debug an openOCD device (in a project using
> CMake). It seems as if I am always ending up in the standard GDB engine
> process and therefore never come to the point where my custom init commands
> (specified under BareMetal device) would be executed.
> Giving a look at the
> qt-creator sources (at 'https://gitorious.org/qt-creator/qt-creator.git') I
> have found the following piece of code (on the master branch): 
> // NBS TODO implement more than one runner
> static IRunControlFactory *findRunControlFactory(RunConfiguration *config,
> RunMode mode)
 {
>     return ExtensionSystem::PluginManager::getObject<IRunControlFactory>(
>         [&config, &mode](IRunControlFactory *factory) {
>             return factory->canRun(config, mode);
>         });
> }
> 
> Not sure how crucial this piece of code is, but in case it plays a role in
> my case in running the debugging process it seems to me that it will always
> use the first IRunControlFactory in the global list of available factories,
> which in my case seems to be the standard DebuggerRunControlFactory rather
> than the desired BareMetalRunControlFactory.
> Again, what I am observing
> might not be the right piece of code also because as far as I understand
> the BareMetal debugging works for Qbs projects, which actually confuses me
> a lot because the above piece of code (which btw can be found in file
> qt-creator/src/plugins/projectexplorer/projectexplorer.cpp, line #1870)
> seems not to be build system dependent. Any enlightenment is welcome!
I am not using the cmake stuff myself so i don't get around to test this very 
often so it might be that there is an error lurking somewhere.

That said it might be that there is another generic run control configured for 
your kit or either that your kit type is wrong?

So please check at first that you have really the baremetal kit configured. 
If the kit is baremetal, check the run config of your project. You can create 
different run controls and there should be a baremetal runcontrol
in the list available.

With 3.4 there is also generic project manager support (via import existing 
project) aka makefile support for baremetal.

Best regards
Tim




More information about the Qt-creator mailing list