[Qt-creator] BareMetal Target Plugin Configuration

Tim Sander tim at krieglstein.org
Sat Jan 4 04:43:29 CET 2014


Hi Freddie

Am Donnerstag 26 Dezember 2013, 21:19:36 schrieb Freddie Chopin:
> Tim Sander <tim <at> krieglstein.org> writes:
> > So you are using the qmake build system. I would recommend you to use the
> > qbs build system where you don't need a fake-qt setup.
> 
> I'm trying to do mostly the same, but I just use "import other project",
> which has its own Makefile etc. Will that work with bare metal plugin?
Thats untested.
> Actually that is the same part that gives me trouble... I really don't get
> the last step that should be made... I have the kit and bare metal device,
> but how do I actually start the debug session? If I do "connect to remote
> server" I have to enter the settings all over again (port, address,
> executable, ...), and the GDB commands configured in bare metal device
> ("reset halt" and so on) are not sent to OpenOCD. If I start debugging with
> F5 it obviously does not work (I just enter the path to .elf file)... So
> what exactly do you mean by "run settings", where should you enter them and
> how to properly start the debugging?
Mh, i have not tested make based builds with the bare metal plugin. So i guess
the problem is that qtcreator does not display the baremetal plugin run
configuration. I know that its working with qmake and qbs based builds. There
is a sample qbs file below so you could use to see the baremetal run config
options. 

If your project is in the open, i could take a look?

> As a side note - I know it can work, because if I manually do "reset halt",
> flash the code and then start debugging on remote gdbserver it mostly
> works...
What does mostly works mean? You have not provided a gdb log.

Best regards
Tim

sample qbs file:
import qbs 1.0

Product {
    type: "application"
    Depends { name:"cpp" }
    cpp.positionIndependentCode: false
    cpp.debugInformation: true
    cpp.commonCompilerFlags: ["-mthumb","-mcpu=cortex-m4","-mfloat-abi=hard","-mfpu=fpv4-sp-d16",
                                                        "-fdata-sections","-ffunction-sections","-fno-inline","-nostdlib"]
    cpp.linkerFlags:[
                "-mthumb","-mcpu=cortex-m4","-mfloat-abi=hard","-mfpu=fpv4-sp-d16",
                 "-Wl,--gc-sections","-T",path+"/linker_skript_for_my_board.ld"]
    cpp.includePaths: ["put your relative include paths here"]
    files: [
        "put your files for build here"
    ]
    Properties {
        condition: qbs.buildVariant === "debug"
        cpp.defines: outer.concat(["DEBUG=1"])
    }
    Group {
        qbs.install: true
        fileTagsFilter: "application"
    }
}



More information about the Qt-creator mailing list